dougstrickland
Junior Member
Posts: 54
Raspberry Pi: Yes
Other Device: Wemos, Arduino...
|
Post by dougstrickland on May 29, 2017 6:55:48 GMT -8
I like sparklines to show trends in data streams easily. I noticed when I turned on sparklines for the temperature panel it didn't work. I figured out that the feed from the SmartPlantPi.py script concatenates the Metric/US C or F to the end of the number so that Freeboard interprets it as a string. I fixed this by modifying the script, then adjusting the sparkline panel to display the units. On line 315 of SmartPlantPi.py I changed the myMessage code to look like this: myMessage["SmartPlantPi_Temperature"] = "{:4.1f}".format(returnTemperatureCF(state.Temperature) ) effectively removing this at the end: returnTemperatureCFUnit() Then set the Sparkline Units to "deg F" See my dashboard live at freeboard.io/board/Vlm3IMAttachments:
|
|
|
Post by SDL on May 30, 2017 9:09:18 GMT -8
Magic! Doug, you are rapidly becoming the expert!
BP
|
|
SeanJ
New Member
Posts: 6
Raspberry Pi: Yes
|
Post by SeanJ on Nov 23, 2017 11:01:45 GMT -8
I also just realized my sparkline (for temperature) is not working . All other sparklines are fine. I tried Doug's fix and unfortunately with my v16, that seems to break some pubnub related stuff (and maybe more). I am current set to report temp in Celsius (via the rotary dial option). I'm in the Great White North eh. Regardless, I've rolled back the change for now. I would love to get that sparkline working though someday. I am loving my new SmartPlantPi!! So much fun learning and testing!
|
|
|
Post by SDL on Nov 24, 2017 8:55:38 GMT -8
SeanJ,
Glad you are having fun. We have sold a bunch of these and people amaze us with their modifications!
BP
|
|