Monitoring using a python script and wemo insights and merros energy outlets


I have used emoncms in the past already but was local hosting allways and used to use wemo insights and smart maginon plugs to read watt usage of the outlets and send the data to emoncms using input api.

Now i’ve moved to new appartment and due to energy crisis i wanted to get a view again on my consumption so i still had my wemo insights and searched for new devices similar to them. I found the merros outlets which can monitor energy usage from devices hooked up to it. Wemo insights can be accessed using soap but there exists a library pywemo which can do an SSDP discovery of the devices and also read its data. This is way better than the app i had created myself in the past as the wemo insights can switch their ports where the webserver is running on.

I also found another python library that can read the data from merros outlets, well actually it reads it from the merros cloud instance (thats actually running off an MQTT instance). It’s called merrosslot. These 2 libraries is also what is used by the components from home assistant.

Anyway i basically made a simple python script that for both type of devices does a discovery of new devices, reads out KWH values from the wemo insights and watt usage of merros devices and then send it to the cloud instance using input api & api read / write key. Its working fine and the good thing is each device uses its own input and new devices get autodetected and added as well as new input. It can read values about once every 30 seconds but it’s not always exactly 30 seconds and i also had heard merros actually banned devices / accounts from people who do too much polling so will need to see how that goes in the long run. The script is running of a raspberry pi that’s running pi-hole 24/7 and a twitter bot anyway (no need for my nuc anymore, it’s not even hooked up).

But anyway long story short i’m back on monitoring my energy usage using emoncms although all in the cloud emoncms instance now and i no longer use home assistant either but i might again in the future on another rapsberry pi.

so this is a small dashboard i made to see energy (kwh) usage per device attached to my outlets.