Autor Thema: [solved]Can't get Ghoma wifi outlet EMW302WF-UK to register to FHEM Ghoma module  (Gelesen 758 mal)

Offline credulous

  • New Member
  • *
  • Beiträge: 9
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
« Letzte Änderung: Gestern um 19:12:16 von credulous »

Offline RaspiLED

  • Hero Member
  • *****
  • Beiträge: 1206
  • Es begann alles so klein ;-)
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, ...
Raspberry Pi mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, WifiLight2, Bravia, ...

Offline credulous

  • New Member
  • *
  • Beiträge: 9
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

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
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
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280

Offline credulous

  • New Member
  • *
  • Beiträge: 9
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

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
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.
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280

Offline credulous

  • New Member
  • *
  • Beiträge: 9
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.

Offline credulous

  • New Member
  • *
  • Beiträge: 9
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

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
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
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
please find an updated Version here
I did some modifications bases on the informations provided by you and another person.
It may work  8)
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280

Offline credulous

  • New Member
  • *
  • Beiträge: 9
Hello Klaus,

It does, indeed, work.

Thanks for that

Steve

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
right answer  8) , thanks for testing
tomorrow avaiable via update
please mark the thread as solved

thanks
Klaus
« Letzte Änderung: 08 Dezember 2017, 23:39:30 von klausw »
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280

Offline credulous

  • New Member
  • *
  • Beiträge: 9
Hey Klaus,

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

Thanks

Steve

Offline klausw

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1591
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
RasPi B v2 mit FHEM 18B20 über 1Wire, LED PWM Treiber über I2C, Luchtdruck-, Feuchtesensor und ein paar Schalter/LED\'s zum testen
Module: RPI_GPIO, RPII2C, I2C_EEPROM, I2C_MCP23008, I2C_MCP23017, I2C_MCP342x, I2C_PCA9532, I2C_PCF8574, I2C_SHT21, I2C_BME280