Looking for an 'open' Wifi smartplug

Pop your questions regarding Home automation Domotica hardware here.....
Post Reply
vanisher

Looking for an 'open' Wifi smartplug

Post by vanisher »

Hi Folks,

I'm quite some time busy with searching for a Wifi smartplug which can be managed directly with an API or with a cloudbased solution and API.

Until now the only think i can find are US based plugs with wrong sockets. Has anyone experience with the requested smartplug?

Things like zigbee/z-wave are not a solution.
theeuwke
Starting Member
Starting Member
Posts: 20
Joined: Tue Jul 03, 2012 9:24 am

Re: Looking for an 'open' Wifi smartplug

Post by theeuwke »

The ORVIBO S20 (with eu plug): https://stikonas.eu/wordpress/2015/02/2 ... 20-socket/
Kankun based (don't know if a EU plug is available; I think "Vengogo Smart Steckdose" is the same); http://homedash.org/
Boardlink SP2: https://github.com/torinnguyen/broadlink-android

If you are wiilling to spend a little bit more money:
Belkin WeMo: http://developers.belkin.com/wemo/sdk
Edimax SP-1101W: http://www.dib0.nl/code/508-control-the ... lug-with-c / https://gist.github.com/wendlers/a5fc0bf06bbe656c7291

I could find any info on the edup-ep-3703
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Interesting discussion! *subscribes* I am now using two Z-Wave plugs (Everspring AN158) + Aeon S2 stick with Domoticz, but this is a real pain in the *ss to get working stable (i think due to the Openzwave library which is quite buggy in my opinion). Maybe a WiFi smartplug will get my angerlevel a bit down :D

I have found the Edimax SP-2101W plug, it is the same as the SP-1101W that 'theeuwke' mentions, but the 2101 can also measure energy consumption of a device. Have a look on Google for 'SP-2101W script', 'SP-2101W api' or so, there are enough people that are fiddling around with it.

For WeMo you have the 'Ouimeaux' library for example, but it's not very stable i read somewhere, and the WeMo plugs aren't that cheap.
You also have the Fritz! plug, but i'm not sure if there is a API for that and if it can be used apart from a Fritzbox.

And ofcourse the Orvibo/Kankun/Broadlink plugs from China, but i don't trust these for heavy loads (like washingmachine/dishwasher), for me the primary goal of such a plug is measuring energy. For switching devices (not heavy loads) i use 433Mhz plugs together with RFXCOM. And not all of these China plugs feature a EU-outlet.

For me the SP-2101W from Edimax seems to be the only candidate that matches all my requirements. I think i will buy one soon. Will have to search where i can get one cheap.
vanisher

Re: Looking for an 'open' Wifi smartplug

Post by vanisher »

SP-2101W is inderdaad een goede.. Daar gaan we even mee proberen.

In short: I'm going to test this :D
Last edited by vanisher on Thu Jul 30, 2015 10:41 am, edited 1 time in total.
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Keep us updated, always interesting to hear how others fiddle around with such products.

P.S. I think you're supposed to talk English here :D
theeuwke
Starting Member
Starting Member
Posts: 20
Joined: Tue Jul 03, 2012 9:24 am

Re: Looking for an 'open' Wifi smartplug

Post by theeuwke »

Some extra information on the Orvibo: http://www.cnx-software.com/2015/07/30/ ... ls-for-16/

The Crerco Mini S also features measuring, but not sure if there is a API available yet. On banggood you can select EU plug:
http://www.banggood.com/Crerco-Mini-S-W ... 75269.html

btw: the Fritz! plugs are workig via DECT, so I don't think they work without DECT fritz!box.
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Ubiquiti mPower plug also seems highly hackable 8) :

http://forum.fhem.de/index.php/topic,35514.0.html (exploring the device over telnet)
https://blog.linitx.com/ubiquiti-mfi-mpower/ (controlling the outlets, reading power over SSH)
http://blog.vucica.net/2014/08/mfi-mpow ... oller.html (bash script example)
https://community.ubnt.com/t5/mFi/Comma ... d-p/418751 (another bash script example)

I think this one is even more interesting than the Edimax, have a look at all the info that they have grabbed from the device. You can access it through HTTP but also Telnet.... would be great for me to scrape the data with a Bash script and dump it into Domoticz.

I have ordered it, 45 euro isn't expensive, compared to Z-Wave plugs.
They also sell a 3-port version and a 6-port version

Teardown of the 6-ports version: http://hilo90mhz.com/ubiquiti-mfi-mpower-pro-teardown/
Description of the API: http://community.ubnt.com/t5/mFi/mPower ... -p/1076449
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Got my Ubiquiti mPower plug today. First i was a bit disapointed because i couldn't access any webpage on the plug like they showed in blogs, but it turned out it had a really old firmware (1.2.6)
I upgraded the firmware over SSH, with this tutorial: http://www.fhemwiki.de/wiki/Ubiquit_mFi ... r_Firmware
Be careful to take the time for it, i waited around 5 minutes. You don't want to brick the device. When done, it has firmware 2.18 and after logging in (ubnt/ubnt) i could see the power consumption of the load on the internal webserver + turn it on/off :D

Now i can see the usage in the webinterface (https://IP_OF_PLUG/power)
Image

and also access the JSON output at: https://IP_OF_PLUG/sensors

Code: Select all

{
    "sensors": [
        {
            "port": 1,
            "output": 1,
            "power": 45.691894292,
            "enabled": 0,
            "current": 0.199029862,
            "voltage": 230.170126676,
            "powerfactor": 0.997405968,
            "relay": 1,
            "lock": 0,
            "thismonth": 0
        }
    ],
    "status": "success"
}
(Valid JSON according to http://jsonlint.com/)

I also need a way to kill the watchdog, the plug does a kind of restart or so every few minutes, because it can't reach the controller software. You can see this when having a ping running constantly to the device.
There was some way to work around this, i thought it was something like connecting to the controller, then shutting down controller software. Will take a look at this later.

But the measurements seems very promising, look at that accuracy behind the comma! :shock:

I used the code from here: http://piatwork.blogspot.nl/2015/07/blog-post.html and adapted it, so it sends its data to Domoticz:
Image

You can find my code here: http://pastebin.com/9pNShAeg
I will later have a look on how to add the consumption data (kWh) to Domoticz, i'm not sure how to do that, ideas are welcome. The JSON only contains a 'thismonth' value, i'm not sure how to translate that to a Domoticz understandable reading.
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

It seems the plug isn't monitoring the usage in kWh, it is still zero after two days (load is using 40W constantly, so it should have +1 kwh at least).

Maybe it only does this when it is connected to the controller software... :( will have a look at that later.
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Ok, today i attached it to the controller software, which was quite a pain in the ***, because it doesn't run with latest Java. I used a 32-bit W7 VM with Java 7 (update 79) and managed to get it working.

The plug now measures consumption, it also spits this out through JSON. But i'm not sure what this number means. It is called 'thismonth'. It now has the value '75'.
The controller software says: 0,05kWh and 0,012 euro (unit price: 0,22euro/kwh).

I have no clue how to translate the 'thismonth' to a kWh reading or so....

In this post: http://forum.fhem.de/index.php/topic,35 ... #msg279888 the 'thismonth' value is also filled, but does not correspond to any of the values that can be seen in his screenshot. I couldn't find any API documentation either...
The FHEM module does something with this field, but i don't understand what. See here: https://github.com/mhop/fhem-mirror/blo ... MP.pm#L572
The value seems to be multiplied by 0,3125 but what does that number mean? If i do that calculation by hand, the outcome is still a number that doesn't make any sense to me.

And i am interested in if will continue monitoring if i shutdown the VM...

By the way, when you link the plug to the controller, three extra fields are added (marked red below). As you can see the existing fields will shift.
In my script i could get the voltage reading with

Code: Select all

MPVOLTAGE=$(echo $SENSOR | cut -d "," -f6 | cut -d ":" -f2 | awk '{printf("%.3f\n", $1)}')
(position 6, -f6) but the field has now changed to position 9 (-f9)
Same for power, power factor etc.

Image
ThinkPad
Member
Member
Posts: 75
Joined: Sat Nov 15, 2014 1:49 pm

Re: Looking for an 'open' Wifi smartplug

Post by ThinkPad »

Ok, i got it i guess..... the '0,3125' from: https://github.com/mhop/fhem-mirror/blo ... MP.pm#L572 makes sense now.
When i access https://ipofplug/sensors it says: "thismonth":13333
But in the webinterface it shows 4,17kWh

The formula is: (value*0,3125)/1000 = kWh for this month

(13333*0,3125) = 4166,563
divide it by 1000 = 4,1666 which rounds to 4,17 kWh

Now i can edit the script to use a electricity counter in Domoticz :mrgreen:
sincze
Starting Member
Starting Member
Posts: 47
Joined: Sat Jun 14, 2014 7:18 pm
Location: Breda

Re: Looking for an 'open' Wifi smartplug

Post by sincze »

So the MPower is still the 'best' option if you don't have a z-wave stick ?? :)
Post Reply

Return to “Questions & Discussions Forum”