My Father in law is using this G-Homa WiFi Plugs and proposed to me that I schould integrate them in HomeAssistant… HA… fml - Luckaly there is tig-robertgrundeken wich made himself a php script!
Took me several hours to get it working - But it finaly did.
to get the credentials you have to setup an older version on the g-homa app wich dont use https - that you can intercept the hashed password, and device ID (I used 2.2.4)
then we use the directions from the repo
as soon you finaly found the device ID and the hashed Password you just change this curl command wich I put into secrets
FUserAccount, FPassword, and FActionNo are the things to change.
secrets.yaml
curl_ghoma_plug1_on: curl -X POST -H 'Content-Type:text/xml' --data '<?xml version="1.0" encoding="UTF-8"?><v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body><service xmlns="http://www.thinkhome.com.cn/" id="o0" c:root="1"><json i:type="d:string">{"head":{"code":"120"},"body":{"authentication":{"FUserAccount":"[email protected]","FPassword":"PASSWORDHASH"},"action":{"FActionType":"5","FActionNo":"XXXXXXXX-xxxx-xxxx-xxxx-XXXXXXXXXXXX","FKeyNum":"0","FAction":"1","FValue":""}}}</json></service></v:Body></v:Envelope>' http://m.g-homa.com/wsi/action/ActionWebService.asmx
curl_ghoma_plug1_off: curl -X POST -H 'Content-Type:text/xml' --data '<?xml version="1.0" encoding="UTF-8"?><v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body><service xmlns="http://www.thinkhome.com.cn/" id="o0" c:root="1"><json i:type="d:string">{"head":{"code":"120"},"body":{"authentication":{"FUserAccount":"[email protected]","FPassword":"PASSWORDHASH"},"action":{"FActionType":"5","FActionNo":"XXXXXXXX-xxxx-xxxx-xxxx-XXXXXXXXXXXX","FKeyNum":"0","FAction":"0","FValue":""}}}</json></service></v:Body></v:Envelope>' http://m.g-homa.com/wsi/action/ActionWebService.asmx
switch:
platform: command_line
switches:
plug1:
command_on: !secret curl_ghoma_plug1_on
command_off: !secret curl_ghoma_plug1_off
Next thing i meight try to get the https endpoint
And here - my Feature Request you could vote on when you also have one of these plugs