Reprogram a Sonoff SC and integrate it into Jeedom

In this new tutorial, we will reprogram a Sonoff SC with Tasmota to in order to integrate it into our Jeedom.

As you already know, I really like Sonoff products because they are ESP8266 based and very easily reprogrammable. This has several advantages, being in control of your data and being able to use the product very easily in our Jeedom health home automation box or any other “open” box like Domotiz.

To tell you the truth, the Sonoff SC is just an evolution of our homemade smart health connected temperature / humidity sensor. The software and firmware reprogramming is exactly the same as the one we will follow. Only changes the contact points of our USB / FTDI converter, let's see that in detail.

Prepare our Sonoff SC

I have always appreciated the Tasmota firmware, it is easy to set up, configure and use. The big advantage is that it is compatible with any module as long as it is an ESP.

We start by removing the 4 screws at the back of the module, this brings up the electronic card and the pads for reprogramming. Feel free to watch the ehealth or I completely disassemble the Sonoff SC.

Reprogram Sonoff SC prep 01 e1539705733759 768x1024 - Reprogram Sonoff SC and integrate it into Jeedom

We will start by removing the RX and TX jumper which allow communication between ESP and ATMEL. Then we connect our USB converter to the ESP respecting the connection direction 3v3> 3v3, GND> GND, RX> RX, TX> TX. Attention, small subtlety apparently the marking on certain version of the circuit is not correct, it is not necessary to reverse RX and TX.

And while we connect our converter to the USB port on our computer, we press the button on the back of the module. This will switch the ESP to reprogramming mode. An article is available on the Tasmota wiki on preparation.

Reprogram Sonoff SC with Tasmota

Now let's go to the reprogramming itself, for that we download Tasmota. Then we install Atom and PlatformIO, more details on these steps in the tutorial on the DIY smart health connected sensor.

All we have to do is enter an IP address and the information of our Wi-Fi access point before uploading the new firmware. The rest of the configuration will be done on the web interface.

And here in a few minutes how to reprogram a Sonoff SC with new open source firmware.

Configure Sonoff SC and integrate it with Jeedom

Once on the web interface, we will inform the module to use to retrieve the information.

Then configure the “MQTT” to communicate with our Jeedom and deactivate serial logging so as not to interfere with ATMEL.

This is the hard part, the rest of the available configurations are only details. The monitored items, temperature, humidity, brightness, sound level and air quality now appear on the main page.

On the Jeedom side, I use the plugin here "JMQTT". Because it is capable of interpreting information in JSON format and transcribing it into unitary information. As soon as the first data arrives, we will check the “parsejson” box and display only the interesting information.

We arrange the elements a little on the dashboard to our liking. And here we are with a new tile and to go further, we can create a scenario to alert us of an environment too polluted for example.

Reprogram Sonoff SC Jeedom 01 - Reprogram Sonoff SC and integrate it into Jeedom

Conclusion

And this is how we do to reprogram a Sonoff SC and run it on an open environment like Jeedom. In addition to that, the data in the cloud is unknown.

You see nothing very complicated and for the more daring, we can go further by adding options like a ring of RGB LEDs or more precise sensors.

All this is found on my tutorial to transform a Sonoff SC into a smart health connected night light, we will soon find ourselves for a new tutorial.

AB SMART HEALTH health home & BUILDING REVIEW