Community
OpenEnergyMonitor

Community

Integrating SONOFF-POW into EmonCMS?

Tags: #<Tag:0x00007fedc6b7b900> #<Tag:0x00007fedc6b7b7e8> #<Tag:0x00007fedc6b7b6f8>

Just recently discovered ITEAD/SONOFF devices, basically income WIFI relay switches marketed as IOT. They have some basic ones that can do ON/OFF over Wifi.

https://www.itead.cc/sonoff-pow.html

However I have noticed they have a version which does real time power monitoring.

Anyone managed to connect the powering monitoring on this to EmonCMS as an additional feed?

I would like to add these inline to some of my devices (computers, servers, Amps, etc) to remotely kill power, but it also makes sense to monitor power if I can.

1 Like

I’ve been using several Sonoff S20 plugs in my home for a while now. Their really great.

I re-flashed the units with Sonoff-Tasmota firmware to give MQTT support, this works really well:

Looking at the wiki it look like Sonoff-Tasmota supports Sonoff-POW and reporting power value to MQTT:

https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-Pow

Once the data is in MQTT it’s easy to log to Emoncms. Either post to emon/<node-name>/<feed-name MQTT topic and the data will appear in local emoncms (emonPi / emonBase) or just node-red to forward the data to Emoncms.

Node-red and MQTT are pre-installed and configured on all emonPi / emonPi. See MQTT user guide:

1 Like

After a few hours I found the final solution to the above question

1: configure tasmota to use emoncms mqtt server
2: use a rule, like: rule1 on energy#power do publish emon/sonoffpow/test %value% endon

This way you will get the power in emoncms in input section. Then you can modify it as you see fit

1 Like

That is an excellent solution Every day a learning day.

I’d never thought of using a rule to do that. I process everything from Tasmota devices in Node-RED to get it into a format for emonCMS. This is the second thing I have seen done using rules recently - really need to investigate them more. Thanks.