ePrivacy and GPDR Cookie Consent by TermsFeed Generator Home Automation System - Gazebo lights and external temperature with Sonoff Basic | OpenHAB - SmartHome | DomoticsDuino - Computer engineer, Smart Home / OpenHAB, Flight Sim and others...
OpenHAB - SmartHome (224 posts)

16/06/2020

Home Automation System - Gazebo lights and external temperature with Sonoff Basic [Versione in italiano]

by Marco Lamanna

After a long time thinking about what type of lamp to place in my gazebo in the garden, thanks to the help of my sweet friend Piero, I finally decide to illuminate the gazebo with a couple of "self-made" lamps, or rather ... "piero-made"

obviously making them smart with yet another SONOFF Basic ... to which I decided to add a sensor for outdoor temperature, to monitor its progress and have a more "local" data than the one offered by online weather services.

The main power is already present in the gazebo so I have to configure the SONOFF as usual and connect the temperature sensor, which in this case is a DS18B20

Connection to SONOFF is very simple ... power and data pins ... in this case the pin is connected to the GPIO1 Serial out, easily accessible on the SONOFF Basic. Pay attention to use a 10KOhm resistor between Vcc and Data pin

Here is the TASMOTA module configuration

and this is the detected temperature

Last step is to connect the physical switch already present in the Gazebo, through a simple cable. To do this we use another GPIO (in this case the 3 - Serial In) and the GND signal that we can find at the bottom of the board

The cable is ready to be connected

This is the TASMOTA module configuration updated with the switch set to the GPIO3, setup with SwitchMode 0

Let's close the box, pass the main power cable inside and take out wires for the lamps and the temperature sensor

Here is the temperature sensor

Let's prepare the lamps

And it's done...

Next step: OpenHAB integration...

and GRAFANA (just for the temperature chart)