I want to control my sonoffs (Sonoff TH16 & POWR2) through my Raspberry Pi3 model B V1.2 using Blynk for an automated indoor greenhouse

Please help me to do all this with Blynk and Raspberry pi 3 model B V1.2 using Sonoff switch sensors.

Though I am new to raspberry pi and Sonoff products, I have written some code in the past in python. I unfortunately had an accident where i was impaled with a two inch rock in my frontal lob area and have bad memory now. I wish to have a cabinet for growing food in my home. I have purchased three Sonoff switches (POWR2) as well as a TH16 Sensor switch for temp and humidity.

I want to program the raspberry pi to receive data and log temp and humidity as it differs throughout the day.
I want to be able to set the Th16 sensor to control a vortex fan to ventilate the grow room for heat with a high and low setting so it will turn on if the heat rises to a set temp and vent until the temp is at the low temp and turn off.

I want to make preset light times for lighting in vegetative stage 23hr on - 1hr off and Fruiting stage @ 12hr/12hr control of POWR2 switches.

I want to also control a pump with a hour:minutes: seconds so to control water flow from day to day and be able to increase time or decrease time on and off.

Can anyone help? And no I haven’t started to write code yet.

The Raspberry Pi is somewhat redundant in this equation. The Sonoff have more than enough processing power to handle this process, in association with the Blynk cloud servers.
However, if you need a robust system that will work without an internet connection then you have two main options:

  1. Use your Pi as a local Blynk server
  2. Use your Pi as an MQTT and Node-Red server (and possibly a local Blynk server too).

Option 2 (but using the Blynk cloud servers) is the way that I do things and if you look at most Home Automation systems you’ll see that they too use MQTT and Node-Red because it’s an extremely robust and simple to use system. Adding Blynk to this equation adds the icing on the cake.

Pete.

thank you for your input but where do I start lol that is the real question.?

i believe in redundant systems encase one fails or such!

Originally i planned to build a GUI and use a th16 sensor and 4channel relay board to accomplish the task but I Can’t remember how to half way through the project…My memory is good for a day or two then I need to be reminded what i was doing. It is like the movie 50 first dates just not that bad !

If you want to go down the MQTT/Node-Red route then read this:

Pete.