I bought two Gosund EP2 smart plugs from Amazon and was able to integrate them into Home Assistant with the help of the manual.
Using the "configuration.yaml sample" found in the README, I can see the status and use the switch to toggle the plug, however the current consumption shows "not available".
The Gosund EP2's Product Key is wifvoilfrqeo6hvu - so not included in the list of known working devices.
There seem to be less DPs with this specific device:
DP1 = on/off [True]
DP2 = ? [0]
DP4 = ? [0]
DP5 = ? [0]
DP6 = voltage [2265]
DP7 = ? [False]
Environment
Localtuya version: I tried out the master and v3.0.3 commit of the GitHub project
Last working localtuya version (if known and relevant): none so far
Home Assistant Core version: 2020.12.1 (Frontend-Version 20201212.0)
[] Are you using the Home Assistant Tuya Cloud component ?
[] Are you using the Tuya App in parallel ?
Steps to reproduce
Integrate Gosund EP2 smart plug into HA via configuration.yaml or via config flow - doesn't matter
Unfortunately I was not able to get the tool to run but I guess the DPs are shown when adding entities via config flow!?
There does not seem to be a reasonable DP for the current consumption, only for the voltage.
EDIT:
I was trying out the DP dump tool (test.py) on my tower PC before, however I got it to work now via Wifi on my laptop.
It doesn't really seem to be quite helpful though. Could the problem maybe be something like that there might be a new firmware version (newer than 3.1 and 3.3)?
$ winpty python test.py x 192.168.178.56 y
INFO:localtuya:localtuya version 1.0.0
INFO:localtuya:Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 4 2021, 13:27:16) [MSC v.
1928 64 bit (AMD64)] on win32
INFO:localtuya:Using pytuya version '8.1.0'
INFO:localtuya:Detecting list of available DPS of device x [1
92.168.178.56], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"x","devId":"33670367
70039f60a9fa"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\xc43\x0f\x90\x08\x01N!\xe59\x92\xad\xed
$\x1f;\xc8\xbe\x83\xd0O\xd13#<\xbaB\x00+K`M'
DEBUG:localtuya.pytuya:'data unvalid' error detected: switching to dev_type 'typ
e_0d'
DEBUG:localtuya.pytuya:Re-send status due to device type change (type_0a -> type
_0d)
DEBUG:localtuya.pytuya:Sending command status (device type: type_0d)
DEBUG:localtuya.pytuya:paylod=b'{"devId":"x","uid":"336703677
0039f60a9fa","t":"1619693029","dps":{"1":null,"2":null,"3":null,"4":null,"5":nul
l,"6":null,"7":null,"8":null,"9":null,"10":null}}'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.56. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: timed out
INFO:localtuya:Detecting list of available DPS of device x [1
92.168.178.56], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"x","devId":"33670367
70039f60a9fa"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\xc43\x0f\x90\x08\x01N!\xe59\x92\xad\xed
$\x1f;\xc8\xbe\x83\xd0O\xd13#<\xbaB\x00+K`M'
DEBUG:localtuya.pytuya:'data unvalid' error detected: switching to dev_type 'typ
e_0d'
DEBUG:localtuya.pytuya:Re-send status due to device type change (type_0a -> type
_0d)
DEBUG:localtuya.pytuya:Sending command status (device type: type_0d)
DEBUG:localtuya.pytuya:paylod=b'{"devId":"x","uid":"336703677
0039f60a9fa","t":"1619693039","dps":{"1":null,"2":null,"3":null,"4":null,"5":nul
l,"6":null,"7":null,"8":null,"9":null,"10":null}}'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.56. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: [WinError 10054] Eine vorhandene
Verbindung wurde vom Remotehost geschlossen
INFO:localtuya:Detecting list of available DPS of device x [1
92.168.178.56], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"x","devId":"33670367
70039f60a9fa"}'
DEBUG:localtuya.pytuya:Failed to connect to 192.168.178.56. Raising Exception.
WARNING:localtuya.pytuya:Failed to get status: [WinError 10054] Eine vorhandene
Verbindung wurde vom Remotehost geschlossen
INFO:localtuya:TIMEOUT: No response from device x [192.168.17
8.56] after 2 attempts.
In my FritzBox, I put both devices on the black list for internet access.
Today, when I first tested them, I initially linked them with the Gosund Android app.
There, the current consumption was shown correctly.
The problem
I bought two Gosund EP2 smart plugs from Amazon and was able to integrate them into Home Assistant with the help of the manual. Using the "configuration.yaml sample" found in the README, I can see the status and use the switch to toggle the plug, however the current consumption shows "not available".
The Gosund EP2's Product Key is
wifvoilfrqeo6hvu
- so not included in the list of known working devices. There seem to be less DPs with this specific device:Environment
Steps to reproduce
Configuration
configuration.yaml
orconfig_flow
DP dump
Unfortunately I was not able to get the tool to run but I guess the DPs are shown when adding entities via config flow!?
There does not seem to be a reasonable DP for the current consumption, only for the voltage.
EDIT: I was trying out the DP dump tool (test.py) on my tower PC before, however I got it to work now via Wifi on my laptop. It doesn't really seem to be quite helpful though. Could the problem maybe be something like that there might be a new firmware version (newer than 3.1 and 3.3)?
Provide Home Assistant taceback/logs
home-assistant.log
Additional information
In my FritzBox, I put both devices on the black list for internet access. Today, when I first tested them, I initially linked them with the Gosund Android app. There, the current consumption was shown correctly.