Having a quick look at Belkin's WeMo. I wonder if it would be possible to integrate the WeMo elements into emoncms either as switch control or energy usage monitoring.
I've long been interested in a plug-in device that could measure energy use and provide a switch functionality but I would rather it was via powerline rather than WiFi. This is the closest I have come across.
There is an opensource project to access and control WeMo. Just wondered if anyone had linked them to emoncms :)
Re: Belkin WeMo - integrate to emoncms
Great idea...
I've been playing with an out-of-the-box system called GEO Solo II which is easy to set up and provides ability to monitor consumption from a single CT clamp AND switch on/off and monitor up to 6 individual 13A sockets. The web-based reporting is not bad, but could be vastly improved.
You might find it interesting to have a quick look at
Re: Belkin WeMo - integrate to emoncms
I have looked for a well priced EoP based switch but have found nothing.
Re: Belkin WeMo - integrate to emoncms
I have been doing a little experimenting with managing the WeMo via the ouimeaux system and I am make some progress.
Re: Belkin WeMo - integrate to emoncms
I hope to get a wemo insight to play with. It would be interested in getting power consumption data into Emoncms.
It looks like ouimeaux should make this possible
http://ouimeaux.readthedocs.org/
It looks like it should be easy to control the plug and get the energy data via openHAB binding. Maybe openHAB could publish the energy data to MQTT
https://github.com/openhab/openhab/wiki/Wemo-Binding
Re: Belkin WeMo - integrate to emoncms
Looks like it's already been done:
https://openenergymonitor.org/emon/node/11612
Re: Belkin WeMo - integrate to emoncms
i have created a (windows) program in delphi that connects to the wemo insight and gets the usage data and posts it to emoncms. I have been using it with 3 wemo insights. It's not really that hard to do it.
My program only has one flaw though, the wemo insight siwtches don't work of a fixed port every once in a while they switch ports and i have to edit my program's config for that plug to adopt to the new port. I have not gotten the time nor the willingness to update the app to try and connect to a diffrent port after some failed attempts. Mostly because i have set up the program in such a way that it quits whenever it gets an error in combination with a batch file that restarts it indefinatly.
The ouimeaux thing does not have that problem as far as i can remember as it does a upnp scan to find the device instead of working with ip + port in the config. if i remember correctly home assistant also uses that same library.
Further on i had also modified the button widget and so that it changes a feed value from 1 to 0 and from 0 to 1. that in combination with node red to read the feed value and based on the value enable / disable the wemo insight switch. works ok but has a few flaws (espicialy if you also use home assistant). The nodes in node red also tend to have problems sometimes connecting to emoncms at least the ones i'm using and when looking at node red log.
I can try to upload the delphi sources to github if you want so you can see how i did it.
Re: Belkin WeMo - integrate to emoncms
Hi
The latest NodeRed Wemo node seems to handle the fact that the wemos sometimes change ports. Would that be an easier way to integrate a wemo into emoncms?
Regards
Ian
Re: Belkin WeMo - integrate to emoncms
If the wemo node allows reading the current useage watt useage it might be possible to create a flow that:
1) read value every X seconds / minutes from wemo
2) does an http get to emoncms using the input api and the key, or see if one of the emoncms nodes can be used as an output. Can't remember exactly if there was such one, but the http get / post does work from within node red
this way you only need node red, a wemo insight, and emoncms. It's probably not so hard to create that flow.
Re: Belkin WeMo - integrate to emoncms
I just checked and updated my node-red to see the new wemo nodes. Unfortunatly, there's a problem. They use a notifications system instead of polling system. For one thing, the notification system does not seem to work for me. It does not react to wemo insight being switched on / off. Besides that, there's another problem that makes it (currently) not possible to use node-red to read the wemo insight data and post it to an emoncms node. When I tested it, it's not possible to check every x seconds for the power. When you do get a notification from wemo insight, the object does contain the power value, but there's no way, or at least I could not find a way, to read it every X seconds and send it to emoncms. The emoncms nodes work just fine, you don't need the input api, the node does it for you.
So as far as i can see, without modifcations to the wemo nodes source, it's not possible to trigger / force read the power value on demand. It could be it's just a simple modification, but I would contact the author of the wemo nodes and ask them if it's possible to change it so a node can be triggered on demand and read the state of the wemo (insight) switch. Once that's available, it's possible to use node red to post wemo insight power values to emoncms. (might be a good idea the useage case like as in posting the data to emoncms (node))
Re: Belkin WeMo - integrate to emoncms
I emailed the author asking if it was somehow possible to get the state of the wemo insight by a trigger like a timer or a repeating message, explaining what we want to do.
If I get a message back, I'll report here.
Re: Belkin WeMo - integrate to emoncms
Nice, good work
Re: Belkin WeMo - integrate to emoncms
I haven't gotten any email back from the node read wemo nodes author, but i did upload my delphi xe source as well as a precompiled Release (exe) to github of the little tool i created. It's what i'm using for monitoring my wemo insight's on a intel nuc running windows 10. It has the flaw of having to change the ports manually whenever the wemo switches ports but, at least for me, it does not seem to happen that frequently and i get emails whenever there's no more input from emoncms.
https://github.com/joyrider3774/Wemo_Insight_Emoncms
nothing special and probably not so well coded but i did not want to spend much time on it and i might be switching to node red if the author of the node red wemo nodes makes it possible to ask the wemo insight info anytime you want