Difference between revisions of "Vocore Temperature Logger"

From AD7ZJ Wiki
Jump to navigation Jump to search
(Created page with " ==Live Data== https://tinyurl.com/kingmangreenhouse")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Overview==
 +
[[File:Vocore_assembled.jpg|thumb|DIY Temp Logger]]
 +
[[File:Vocore_mounted.jpg|thumb|Mounted in the greenhouse]]
 +
Awhile back I bought a [http://vocore.io/ Vocore] because, well, who *doesn't* want a 1" square linux computer with built-in wifi? :-)  But after awhile sitting there on the shelf, this application popped up - monitoring temperature in my Dad's greenhouse. The biggest issue was getting DS18B20 one-wire temperature sensors to work with it. The stock OpenWRT image doesn't work with one-wire devices. A popular kernel module named w1-gpio-custom didn't have much luck either, each time triggering errors like "w1-gpio w1-gpio.0: gpio_request (pin) failed" and "w1-gpio: probe of w1-gpio.0 failed with error -22". After digging into the w1 kernel modules and adding a bunch of pr_debug() statements, I determined the w1-gpio driver needs an entry in the device tree file, as well as the selected GPIO freed up from the gpio-export driver. After making that modification and rebuilding OpenWRT, it works great. I posted the fix in more detail on the vocore forum [http://forum.vocore.io/viewtopic.php?f=11&t=3868&sid=435b7035297db418e764f8794dd635b1 here]. Of course then I had to upgrade to LEDE 17.01.04 and make a similar fix... :-)
 +
 +
Anyway, once that was working I wasn't sure what would be the most effective way to present the data.  There are two temperature sensors, one inside and one outside.  The whole "IoT" craze is really on a roll these days, so I decided to go that route and upload the data to a [https://thingsboard.io/ thingsboard] server. This makes the sensor side very easy, just hit a URL with curl and send a small JSON file.
 +
 +
I also log each point to a local text file in .csv format in case thingsboard shuts down or loses the data somehow. This is stored inside a folder served by LEDE's built-in web server so it's easy to access.
 +
 +
All that just proves the famous saying that "to invent, you need a good imagination and a good supply of junk".  Well, I'm not sure how imaginative this is but at least I have the supply of junk part :-)
  
 
==Live Data==
 
==Live Data==
https://tinyurl.com/kingmangreenhouse
+
https://ad7zj.net/greenhouse/view-chart.html

Latest revision as of 20:11, 28 December 2019

Overview

DIY Temp Logger
Mounted in the greenhouse

Awhile back I bought a Vocore because, well, who *doesn't* want a 1" square linux computer with built-in wifi? :-) But after awhile sitting there on the shelf, this application popped up - monitoring temperature in my Dad's greenhouse. The biggest issue was getting DS18B20 one-wire temperature sensors to work with it. The stock OpenWRT image doesn't work with one-wire devices. A popular kernel module named w1-gpio-custom didn't have much luck either, each time triggering errors like "w1-gpio w1-gpio.0: gpio_request (pin) failed" and "w1-gpio: probe of w1-gpio.0 failed with error -22". After digging into the w1 kernel modules and adding a bunch of pr_debug() statements, I determined the w1-gpio driver needs an entry in the device tree file, as well as the selected GPIO freed up from the gpio-export driver. After making that modification and rebuilding OpenWRT, it works great. I posted the fix in more detail on the vocore forum here. Of course then I had to upgrade to LEDE 17.01.04 and make a similar fix... :-)

Anyway, once that was working I wasn't sure what would be the most effective way to present the data. There are two temperature sensors, one inside and one outside. The whole "IoT" craze is really on a roll these days, so I decided to go that route and upload the data to a thingsboard server. This makes the sensor side very easy, just hit a URL with curl and send a small JSON file.

I also log each point to a local text file in .csv format in case thingsboard shuts down or loses the data somehow. This is stored inside a folder served by LEDE's built-in web server so it's easy to access.

All that just proves the famous saying that "to invent, you need a good imagination and a good supply of junk". Well, I'm not sure how imaginative this is but at least I have the supply of junk part :-)

Live Data

https://ad7zj.net/greenhouse/view-chart.html