Author Topic: Logging temperature over time.  (Read 2126 times)

Offline nathanwinters

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Logging temperature over time.
« on: March 24, 2017, 03:34:19 am »
Hi,
I'm very new to this! I got a VeraPlus up and running a couple of days ago and now have an RFXCom module running a couple of plugs, a Greenwave Zwave Plug and, relevant to this, a couple of Everspring ST814 Temperature/Humidity sensors.
The end goal is to monitor the temperature to control too electric radiators, however in the short term I'd like to know how to do the following:

Continually record the temperature and humidity in a log which I can review / graph to see temperature fluctuations.

Hoping someone can point me in the right direction.
Thanks
Nathan

Offline jswim788

  • Hero Member
  • *****
  • Posts: 798
  • Karma: +58/-2
Re: Logging temperature over time.
« Reply #1 on: March 24, 2017, 09:51:52 am »
See this forum for information on the DataMine 2 plugin which should work for this:

http://forum.micasaverde.com/index.php/board,43.0.html

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1371
  • Karma: +36/-35
Re: Logging temperature over time.
« Reply #2 on: March 24, 2017, 06:40:22 pm »
And with the Weatherunderground plug-in, you can also track outdoor temperature, humidity, pressure, and wind speed, without additional hardware, to give you even more data.
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6199
  • Karma: +276/-70
  • "Less is more"
Re: Logging temperature over time.
« Reply #3 on: March 24, 2017, 07:09:00 pm »
And with the Weatherunderground plug-in, you can also track outdoor temperature, humidity, pressure, and wind speed, without additional hardware, to give you even more data.

Yes indeed, there's really lots you could do.  I ended up plotting things with Grafana...
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline nathanwinters

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Logging temperature over time.
« Reply #4 on: March 29, 2017, 09:47:38 am »
Wow, thanks everyone... lots of reading to do. No doubt I will be back with questions soon.
Cheers
Nathan

Offline sebby

  • Sr. Member
  • ****
  • Posts: 268
  • Karma: +9/-3
Re: Logging temperature over time.
« Reply #5 on: March 29, 2017, 10:28:45 am »

Yes indeed, there's really lots you could do.  I ended up plotting things with Grafana...

AK, how did you tie in DataMine (or DataYours) with Grafana? I've been noodling with the idea of doing something like this, but the information on how to integrate them is a bit lacking out there. 

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6199
  • Karma: +276/-70
  • "Less is more"
Re: Logging temperature over time.
« Reply #6 on: March 29, 2017, 10:55:08 am »
I wrote a Lua WSAPI CGI which responds to the /render and /metric requests.  It's actually built into openLuup, but could be modified to work with Vera, if you must.

You can find it here:
https://github.com/akbooer/openLuup/blob/master/openLuup/graphite_cgi.lua

It calls on some of the DataYours files also, and will additionally access a DataMine database, if that is where you have your data.

If you're not running openLuup, but have a spare machine of any sort, then the easiest thing would be to install a stand-alone copy of openLuup and simply use it as a graphite server for Grafana.  I actually run mine on the same machine as the Grafana server.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1371
  • Karma: +36/-35
Re: Logging temperature over time.
« Reply #7 on: March 29, 2017, 05:17:32 pm »
Running OpenLuup on my old PI3 is a winter project of mine - not sure which winter though  ;D
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa

Offline skogen75

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Logging temperature over time.
« Reply #8 on: February 20, 2018, 11:26:41 pm »
I've been using DataYours for some time now and would like to use it as a data source for Grafana...but, I'm not running OpenLuup. 

I'm running version 2016.01.04 of DataYours and logging the data to a nas. 

Can I use the Graphite_CGI.lua without OpenLuup, it didn't sound like it was currently running on Vera by itself.  What would it take to get it running on Vera?

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6199
  • Karma: +276/-70
  • "Less is more"
Re: Logging temperature over time.
« Reply #9 on: February 21, 2018, 03:07:32 am »
The problem here is in the HTTP requests which Grafana issues, which can't simply be picked up by Luup handlers because of the syntax.

Vera doesn't offer the WSAPI interface for CGIs, so some change would be needed.

You might be able to configure the lighttpd server to redirect these, but I don't know how.

If you use the AltUI plugin, you don't have to use DataYours at all to log data and can use a number of different standard databases which Grafana can attach to.  You also get a fabulous new UI to Control Vera.
« Last Edit: February 21, 2018, 10:40:09 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6199
  • Karma: +276/-70
  • "Less is more"
Re: Logging temperature over time.
« Reply #10 on: February 21, 2018, 10:39:08 am »
Additional alternative solutions might be:

  • HTTP server which runs stand-alone on Vera specifically to handle these requests
  • find out if lighttpd can, in fact, support WSAPI on the Vera
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 584
  • Karma: +9/-12
Re: Logging temperature over time.
« Reply #11 on: February 21, 2018, 09:30:50 pm »
I just bounce the data out to ThingSpeak. Not hard really. Grafana is much nicer but more work. I haven't delved into that as of yet.

Offline skogen75

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Logging temperature over time.
« Reply #12 on: February 21, 2018, 09:58:12 pm »
Thanks...you are on top of it.  I do have AltUI installed on my VeraPlus, but haven't had time to play with it much. I am also running a pi with both OpenRemote controller and LogitechMediaServer running...

So, without inventing a new method or significantly modifying anything...I have two options maybe 3 to get Grafana-type graphs:

1.  Run OpenLuup, perhaps on the pi; would I need to run a separate instance of DataYours on OpenLuup or continue to run DataYours on Vera (currency logging to nas)?

2.  Log variables with AltUI which Grafana can directly access the AltUI databases, is that right?  Does AltUI run a Whisper-type round-robin data aggregation scheme? (I like that, previously on DataMine it would crash my VeraLite due to too many data points, if it didn't crash graph load times took forever).

3.  Forget Grafana and use the built-in D3.js graphing in AltUI, anyone have any examples of doing that?

Maybe this is a new thread...

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6199
  • Karma: +276/-70
  • "Less is more"
Re: Logging temperature over time.
« Reply #13 on: February 22, 2018, 04:13:38 am »
You will need somewhere to run Grafana anyway.  I run that on one of my RPis along with openLuup.  You'd need a basic DataYours installation on the RPi (it's just one click from within openLuup) to access the nas, but it wouldn't need to do any logging itself.

AltUI has no built-in database but is configured to access thingspeak, emoncms, IFTTT.  I believe that Grafana can access some of those without needing Graphite_CGI or DataYours at all.

Can't help you with option 3... Don't do JavaScript myself.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 584
  • Karma: +9/-12
Re: Logging temperature over time.
« Reply #14 on: February 22, 2018, 09:42:32 pm »
Here's a quick chart that I use to look at my data. Could probably be made a whole lot better, but I swiped it and haven't taken the time to look into it. Grafana may be in my future, just not right now.

http://myeager.no-ip.biz/charts.html