There have been quite a few requests for the code for my MQTT posting IOT project for testing PH and Temperature of my hydroponic towers. This code is several years old and I haven’t looked at it for at least 2. But, I figured I would put it out on GitHub.
The main purpose of this code is to monitor the PH and temperature in a water tank for my hydroponics and then use MQTT to post to io.adafruit for a dashboard.
Here is a quick project that I did to control lighting for our seedlings. I wanted something that could be controlled via MQTT and then managed in Thingsboard. On this initial prototype, I am using Adafruit’s IOT http://io.adafruit.com. It works pretty well, but is limited in some of the features that I want (like scheduling events on a timed basis).
The components of the project are:
- NodeMCU ESP8266 module. I am developing in c++
- Visual Micro plugin for Visual Studio. Much easier for debugging and features than just the straight Arduino IDE
- IOT Relay (See on Amazon): This is an enclosed relay for both AC and DC switching. And it has a simple port that allows you to control from a microcontroller.
NOTE: I have sample code below the video. Continue Reading →
I finally put the sensor platform out in the garden. I am streaming it currently on io.adafruit here: https://io.adafruit.com/bwharton/garden
NOTE: I will be moving this stream next week to Azure. but for now, I am using MQTT to send data to adafruit’s solution.
You can see the box that I got. It is a bit overkill. I also got a “power stake” so that I can easily run power to both a pump and the sensor platform. The box is very very big. I imagine that I will get a smaller one for future versions that I will use in marine environments. Continue Reading →
Ok, this might be a round about way to do something, but I really wanted to experiment with MQTT and Azure Event Hubs. I wrote a bridge that would bridge data between several MQTT brokers and then queue that data up on an Azure Event Hub. These MQTT brokers are fed by data from several ESP8266 boards reporting different environmental conditions (temperature, etc).
After I got the MQTT to Azure Event Hub bridge done, I then found Adafruit’s io.adafruit.com dashboarding service (http://io.adafruit.com). It is pretty cool. So, what I then wanted to do is write a bridge between my Azure Event Hub to Adafruit to show data on a dashboard.
1. Creating my MQTT listener to bridge data to Azure
Continue Reading →