Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Can I get webserver to show a temperature graph?
Can I get webserver to show a temperature graph?
I have a bunch of temperature sensors, in almost every room in the house and the cabin, and I would like to be able to see in the webserver page how the temperature has changed over time on a few of them (mainly outdoors and indoors at the cabin when we're not there). At the moment the server shows the current temperature, but I have no idea how to creat a graph for this. Is there any code anywhere that can help me do that?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Can I get webserver to show a temperature graph?
There are several ways doing this. I personally use SwitchKing (SK) in a test drive since a while.
I have configured a data source in SK for each sensor of interest. Then I am using the SwitchKing plugin for EG to send data via the REST interface.
Below is a picture from SK showing one of my sensors ( a modified one for measuring the light level). Also below, see some screens as well as the python script from my EG configuration.
Below, configuring the SwitchKing plugin for EG Define a macro that captures the event and evaluate, format and send to SK The script
Best regards,Walter
I have configured a data source in SK for each sensor of interest. Then I am using the SwitchKing plugin for EG to send data via the REST interface.
Below is a picture from SK showing one of my sensors ( a modified one for measuring the light level). Also below, see some screens as well as the python script from my EG configuration.
Below, configuring the SwitchKing plugin for EG Define a macro that captures the event and evaluate, format and send to SK The script
Code: Select all
def eventHandler(base, pload):
try:
if str(base).find('THGN122/123, THGN132, THGR122/228/238/268 id: 7940') > -1 :
m = str(pload).split(' ')
h = str(m[6])
#print h
eg.plugins.SwitchkingTellStick.DSSet(u'', u'Ljussensor', h, 0)
except:
pass
eg.event.suffix_copy = eg.event.suffix
eg.event.payload_copy = eg.event.payload
eventHandler(eg.event.suffix_copy, eg.event.payload_copy)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Can I get webserver to show a temperature graph?
Thank you very much! I'm going to play with this in the weekend. 