Vocore Temperature Logger
Overview
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 :-)