G-Homa Wifi Smart Socket “EMW302WF“ and “EMW302WFO” with OpenHAB2
Manufacturers: REV Ritter, GAO, EverFlourish
http://www.rev.de/DE_produkt_13876.ahtml
http://www.rev.de/DE_produkt_13999.ahtml
https://www.rev.de/DE_produkt_15058.ahtml
http://www.g-homa.com/index.php/en/products
Technical data: 230 V~, 16 A, max. 3500 W
(Available in Germany at OBI, Saturn, Globus Baumarkt, Toom Baumarkt, ELV and so on…)
Prices for EMW302WF: OBI (9,99 EURO) (at my local OBI !), Saturn (15 EURO), Globus: (24,95 EURO), ELV (29,00 EURO)
Price for EMW302WFO: OBI (14,99 EURO) (at my local OBI !)
I got it running with openhab2! I have 9 of EMW302WF and 2 of EMW302WFO
Not tested: EMW302WF-CTL See here: https://www.rev.de/DE_produkt_15058.ahtml
Also could run, but has to be tested!!
They have mounted the following wifi module: HF-LPB100 or HF-LPC100 like Orvibo S20 or Silvercrest SWS-A1.
I tested Orvibo-Binding, but it was not running! Here is a different way how to get them running:
.
INSTRUCTIONS: (running nodejs 8.9.4 and java script version “ghoma 1.0.6”)
A new manual for later versions you can find here!
.
If you don’t want to use cloud based G-Homa App and need an integration into OpenHAB2, you can use your own “control server” written in nodejs.
See here: https://github.com/rodney42/node-ghoma
or here: https://www.npmjs.com/package/ghoma
Prerequisites: G-Homa App (available here)
Android: https://play.google.com/store/apps/details?id=com.everflourish.android&hl=de
iOS : https://itunes.apple.com/de/app/g-homa/id887296762?mt=8
nodejs (LTS Version)
see here: https://nodejs.org/en/download/
openHAB binding: http and transformation: map
Download also the following manual from here:
http://www.sabreadv.com/wp-content/uploads/HF-LPC100-User-Manual-V1.0.pdf
Important information:
FIRMWARE of ghoma wifi socket <= 1.0.06 (check if ‘manufacturing date’ on product packaging is 10.14 or before!), then see steps 1-12 and 14-19
FIRMWARE >1.0.06 --> no html-configuration available, then see steps 1-11 and 13-19
-
Install nodejs and including npm
-
Install ghoma (be sure that “net” and “express” also is installed!)
Also see tutorial here: https://www.npmjs.com/package/ghoma/tutorial -
you will get four javascripts in a subfolder ‘ghoma’: ghoma.js, example.js, config.js and express_example.js
-
modify line 69 in express_example.js
from res.send(JSON.stringify(plug)); to res.send(JSON.stringify(plug.state)); -
run express_example.js (e.g. from Windows-commandline: node express_example.js)
this will start a “mini-webserver” (port: 3000) and a g-homa-control-server (port: 4196) on your local machine -
confirm firewall-exception, if poping up.
-
plug your ghoma wifi socket into a power socket
-
press button on your wifi socket more than 3 seconds
-
connect your notebook or smartphone to wifi with SSID “G-Homa”
-
open a browser to address http://10.10.100.254 (user: admin, pw: admin)
-
if site in step 10 is not available, your firmware is >1.0.06, go to step 13
-
next steps (a - g) are for firmware <=1.0.06
a. go to “STA Setting”, scan and choose your local wifi
b. important: always press ‘save’ after you made changes, but do NOT reboot your wifi-socket!
c. fill in your SSID password and (optional) disable ‘Obtain IP Address automatically’)
d. (optional) fill in a manual IP-Address, Subnetmask, Gateway, DNS Server
e. go to “Other Setting’: fill in ‘Serveraddress’: this is where you started the express_example.js (in point 5 above).
f. go to “Work Mode” and choose “STA mode”, press “save” and NOW reboot your socket.
g. connect your notebook or smartphone back to your home-wifi. Go to step 14 -
next steps (a - h) are for firmware >1.0.06
a. open G-Homa App, add new socket, choose your wifi SID and fill in wifi password.
b. identify IP address of your new socket with your router web interface at network monitor. This will be ‘ghoma address’ in step c.
c. run config.js which you got in step 3:
node config.js ‘ghoma address’ ‘control server address’ ‘control server port’
(‘control server port’ has to be: 4196)
e.g. node config.js 192.168.100.55 192.168.100.44 4196
d. if you want to use DHCP for your socket, all done, go to step 14.
e. if you want a static IP address for your socket, go to step f.
f. comment line 40 and line 41 in config.js
//send(new Buffer(“AT+NETP=TCP,Client,”+controlPort+","+controlServer+"\r"));
//send(new Buffer(“AT+NETP\r”));
g. fill in 3 new lines after line 41
send(new Buffer(“AT+WANN=static,192.168.100.229,255.255.255.0,192.168.100.1\r”));
send(new Buffer(“AT+WANN\r”)); // See the network settings
send(new Buffer(“AT+Z\r”)); //reboot socket192.168.100.229 = static IP address of socket, 255.255.255.0 = subnetmask,192.168.100.1=gateway`
then run step 13 c. again, (now use your NEW static IP-Address of the socket in the command!)
h. reboot your socket, power off and power on again -
open a webbrowser with address: http://IP-Address:3000/list where IP-Address is IP of your local machine in point 5.
-
now you will see something like that: [{“id”:“3ef996”,“state”:“off”}], where “id” is the short-MAC of your ghoma wifi socket.
-
in openhab2 install the following Add-on: http
-
in openhab2 install the following transformation: map
-
create an onoff.map containing the following:
“on”=ON
“off”=OFF -
items-file:
Switch GHoma1 "G-Homa Socket 1" { http=">[ON:GET:http://192.168.100.44:3000/on/3ef996] >[OFF:GET:http://192.168.100.44:3000/off/3ef996] <[http://192.168.100.44:3000/state/3ef996:60000:MAP(onoff.map)]" }
where <192.168.100.44> has to be replaced with ‘IP-Address of your mini-webserver’
and <3ef996> has to be replaced with “id” of your ‘ghoma wifi socket’ (in step 15) and 60000 = milliseconds time interval. (=every 60 seconds)
Have fun!