FHEM Forum

FHEM => English Corner => Thema gestartet von: credulous am 24 November 2017, 00:04:42

Titel: [solved]Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 24 November 2017, 00:04:42
Hello All,

First let me start of by saying I am new to FHEM an still getting my head around it, so it is possible this is a dumb question .. but here goes.

I have recently bought 2 Ghoma wifi outlets in B&Q, got them set up and workign via their app with no bother (once I had worked out firewall ports for the app and the outlet), next was to control them without Ghoma cloud services, ideally through FHEM. I found FHEM a few weeks ago just after I got an LG smart TV and have this connected and working through FHEM.
When I discovered that FHEM has a ghoma module I figured this would be easy .. but it would appear not.
I have the socket set up to expect the ghoma server to be on my FHEM server on port 4196 .. when I configure FHEM to run ghoma on port 4196 I see FHEM send init1a and init1b (as per protocol), but nothing else. On the wire I can see the plug respond with the response to init1, which all looks good .. except FHEM does not appear to see this response and so nothing else happens :(

I found a nodejs implementation on github (https://github.com/rodney42/node-ghoma), if I run this then both my outlets connect and are registered successfully and I am able to control them via a simple webservice call.

Has anyone had similar problem getting started with FHEM and Ghoma?

Thanks

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: RaspiLED am 24 November 2017, 09:13:44
Hi Steve,
First if all welcome!

Did you made the prerequisites?
https://fhem.de/commandref.html#GHoma

I personally di not use g-homa but the modulauthor klausw may help ;-)
List if authors to find here
https://fhem.de/MAINTAINER.txt
Warm regards, Arnd


Raspi2 mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, Bravia, ...
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 25 November 2017, 14:14:29
Hello Arnd,

Thanks for the welcom and your reply.

Yes I have completed the pre-reqs, I have 2 new plugs both with latest firmware so I could not use the web server. I did the fake DNS response for plug.g-home.com and then the github nodejs code I linked to provides i mechanism to reconfigure the plug to use a personalised dns entry or IP address.

As I said the nodejs stuff works perfectly, so I know the plugs are fine.

It seems to me as though this is. FHEM config issue in that it is not actually getting the response, like perhaps there is no linkage between the TCP port (4196) and that possibly it is something to do with the way I have started the FHEM G-Homa server, or maybe something to do with the way FHEM handles TCP servers that I need to pre configure.

I will reach out to Klaus.

Thanks

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 26 November 2017, 21:09:57
Hello Steve,

possibly threre is another issue with newest firmware.
Outdoor sockets with german connector type are also not working at the moment due to some differrences in the protocol.
To implement this i need some more informations.


did you set verbose to 5 during init of the sockets?
If not, do you get more informations with verbose 5?
Can you post what you have sniffed during the init process.
Sniffing an working init, and switching process with the nodejs implementation would be also not a bad idea.


Klaus
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 28 November 2017, 00:24:28
Hello Klaus,

Thanks for the feedback, as I mentioned in my initial email I am very new to FHEM, can you explain how to set debug to 5 please?

I have the tcpdumps and will attach them tomorrow when I am home.

The nodejs implementation of your protocol reverse engineering appears to be based fairly closely on your Perl code, at it works without any problems.

Thanks

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 28 November 2017, 01:53:22
Hi Steve,

in "Unsorted" you will find a device called "global"
there you can set the Attribute verbose to 5, which means the highest loglevel

you can also set it directly via commandline input at the top of FHEM website:
attr global verbose 5

but you should do it only temporary ... otherwise you will get alot quite big logfile  8)

The tcpdump should be perfect for the first check.
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 30 November 2017, 00:13:02
Hello Klaus,

Apologies for the delay in my reply my day job got in the way !

Here is the TCPdump.
I will get around to testing again with debug set to 5 shortly

Thanks

Steve.
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 30 November 2017, 15:40:00
Hello Klaus,

and here is a copy of the log with debug level at 5

Let me know if you need any more.

Thanks

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 07 Dezember 2017, 01:30:11
Hello Steve,

sorry for the belated answer, to the end of the year it gets busy.

Can you record another tcp dump during switching of the plug?
The one youve attatched includes the first part of an init sequence only
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 08 Dezember 2017, 01:07:35
please find an updated Version here (https://forum.fhem.de/index.php/topic,32191.msg727785.html#msg727785)
I did some modifications bases on the informations provided by you and another person.
It may work  8)
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 08 Dezember 2017, 03:09:51
Hello Klaus,

It does, indeed, work.

Thanks for that

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 08 Dezember 2017, 16:02:06
right answer  8) , thanks for testing
tomorrow avaiable via update
please mark the thread as solved

thanks
Klaus
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: credulous am 09 Dezember 2017, 17:13:59
Hey Klaus,

Apologies for the really dumb question, but how do I mark topic as solved .. can't find it anywhere !

Thanks

Steve
Titel: Antw:Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module
Beitrag von: klausw am 10 Dezember 2017, 16:51:55
Zitat von: credulous am 09 Dezember 2017, 17:13:59
Apologies for the really dumb question, but how do I mark topic as solved .. can't find it anywhere !

just change the title an put [solved] at the beginning