The use of the ESP8266 in the world of IoT

User avatar
By nigeljohnson73
#91064 Ok, so I started with a Raspberry Pi with a few sensors attached, a nice front end, and some control logic, that was simply writing in PHP and eval'd to control triggers. The Pi buckled in running multiple senors and I moved that bit out to an ESP8266 chip connected over the wifi and everything is going swimmingly. The problem I have is that the ESP chip loses sync with the wifi from time to time, sometimes for a few minutes. This means comms are lost and this has a negative side effect on the control logic. Here is my example

Code: Select allH1 if [[S1.temperature]] < 24.5
C1 if [[S1.temperature]] > 25.5

H1 is a control trigger for a heater, C1 is a cooler, and S1 is a sensor that has a temperature.

So if the temp drops to 24.49, the heater kicks in, network connectivity is lost... my fish could boil and my tomatoes bake, so I want to move the control logic to the ESP.

I do not want to put a thermostat on the heater/cooler - this negates a big purpose of the controller.

I do not want to hard code this into the firmware as this makes configurations impossible to manage.

Therefore, I want to make a macro language to handle local control loops. Does anyone have anything like this that exists already I could leverage?

Any help much appreciated