Chicken soup for the little snitches

For the last few days, I've been working on the software that will manage the snitchboxes, but not all snitches will be the same, so I'm taking some time to build a flexible foundation. And one of my biggest concerns while doing that? How to tweak and adjust them once they've been deployed, without having to drag them all back to my workbench to do it.


Each different growing system has different parameters to monitor so will require a different constellation of sensors. Some measurements, like light brightness, air temperature/humidity, and pH balance, will be common to all setups, but some (like Kratky tanks) will have a water depth or EC to keep an eye on, while a drip tower might have a trickle rate, and other systems might have circulatory pumps, aeration pumps, vapor densities, etc. If each kind of snitchbox will have a different set of sensors, with different operational ranges, the firmware will need a flexible way for me to describe the sensors and configure their defaults. But what if those parameters change during the course of an experiment? It's one thing to set sensible parameters when I've got the box on the bench at build time, but what about when those values need to change later, once the box has been deployed?

In order to facilitate unsupervised data collection, I'm already building the snitchboxes around the ESP8266, so the boxes can send data regularly to the LabMom for collection over the built-in WiFi chip. But that same chip also allows the snitchbox to host a tiny web server, so I'm going to use that to display a simple device configuration panel. Then, no matter where the snitchbox is physically located, I'll be able to alter its configuration by visiting its config screen in a web browser.

Another consequence of this architecture is that if I ever have a lab with dozens of these devices scattered about, I can fix bugs or deploy new features on all the devices at once, simply by posting new firmware to the LabMom. As each device calls mom to report, it will see the new version, download it, and update itself. Just like getting chicken soup from mom when you're not feeling well.

The code for managing the configuration screen is almost finished. Once I have that done, and get the chicken soup system implemented, the snitchbox foundation will be complete and I'll be ready to start building the first one — which will be the one for Kratky tanks.

Comments