No announcement yet.

Shelly, Sonoff and Tuya power monitoring devices

  • Filter
  • Time
  • Show
Clear All
new posts

    Shelly, Sonoff and Tuya power monitoring devices

    I have accumulated a variety of smartplugs/adapters that have power monitoring capability. Those that I am discussing here are rated at 16 Amps and have one channel of power monitoring. The Shelly 1PM, Slitinto NX-SP201, BNLink BNC-60 and Sonoff S31 were all obtained from Amazon. From the factory each provides a setup oriented to their proprietary smartphone app.

    I do not know for certain, but I believe the CPU Tuya plugin will be able to communicate with the Tuya firmware in the Slitinto and BNLink and achieve non-cloud control. The Shelly 1PM is natively more DIY-friendly with local HTTP and MQTT protocols. This device can be interfaced with AK Shelly or BIG5 using HTTP or any of the MQTT plugins such as mcsMQTT using MQTT. The Sonoff S31 has no non-cloud integration solution using factory firmware.

    After some initial evaluation I installed Tasmota firmware in all the devices.

    I attempted to use the MQTT capability of the Shelly using factory firmware, but was not able it using the Shelly Android App. Shelly later informed me that MQTT cannot be enabled from the App, but only from a browser communicating with the web server running on the Shelly 1PM. I was going to go back and install the factory firmware to evaluate the factory MQTT implementation, but Shelly indicated that they do not provide the Shelly 1PM binary for user flashing.

    The Shelly and Tuya devices have glued cases so not possible to open them and then close them without some damage to the case. Shelly provides an access port to make changing firmware easy. Tuya devices were flashed without opening the cases using Tuya Convert. Future versions of Tuya factory firmware may not allow use of Tuya Convert. The Sonoff S31 is a snap-fit case that is easy to disassemble and reassemble. The through-hole connections for flashing are well labeled and flashing was not difficult.

    I have seen HLW8012/BL0897 as the power monitoring chip in the Tuya devices. Sonoff S31 uses CSE7766 which provides more stable readings. I was not able to find schematic for Shelly 1PM so not certain what power monitoring device is installed, but likely the HLW8012 since Tasmota operates the same with it and the Tuya devices.

    I did not find any calibration mechanisms with the factory firmware. I did not test the Tuya or Sonnoff devices before installing Tasmota, but I did test the Shelly 1PM. The Shelly was reporting about 5% less power use than what showing on my meter. With different frequencies and voltages all over the world I suspect that the factory just calibrated so some happy medium. Tasmota does provide calibration capability so for those that care about actual power, current and voltage levels then Tasmota becomes a good avenue.

    The Shelly and Tuya firmware do provide for accumulation of energy use totals. Both provide this capability by letting the cloud server accumulate the individual readings. In the Shelly 1PM case this is still true so the Shelly 1PM will not accumulate total power usage even when using its non-cloud HTTP or MQTT servers. Of course one can setup their own local database, but this adds a complexity. Tasmota firmware uses internal flash to store the accumulated power. As long as the same appliance is connected to the plug then this provides a good way to view total power use. The total can be reset in Tasmota so the device can be moved to another appliance and accounting restarted.

    All firmwares provide instantaneous power readings with cycles times dependent upon the internal polling rates. Tasmota uses 200 millisecond interval for its readings. I was surprised when I first looked at the reporting from the Shelly as it was very high and then in a few seconds stabilized. It looks like the Shelly has some filtering to smooth out the reported power. I am not able to tell if this filtering was done in the cloud or done in the device. It was something I wanted to test, but not able to reload the firmware for the test.

    Another good automation use of power monitoring plugs/adapters is to detect patterns of consumption. Detection of these patterns can then be used as event triggers. For example, it is easy to monitor the energy use of a washing machine to detect which part of the wash cycle it is in and in my case when the spin cycle has completed. Tasmota rules do really well for the pattern matching/event trigger capability.

    What is common for all these devices is that digital ground and mains ground share a common circuit with the power monitoring chip. This means that one should not even try to take advantage of other GPIO on the ESP8266/ESP8265 for some DIY enhancements. It is just not safe to have hot ground connected to anything outside the case.