rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
3k stars 565 forks source link

GivEnergy Plugs Being Indicated as ""Unavailable" #1329

Open nothernman opened 1 year ago

nothernman commented 1 year ago

Hi,

Several GivEnergy (aka Tuya) devices are being set up on the Givenery cloud and they are known by local Tuya however, the status being display LocalTuya is "unknown".

I provide the level debug that I am able to gather without help.

Is this a known problem with a solution please provide noting i have tried everything on the web, or is this a new bug?

Please help

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.3.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.10", "docker": true, "arch": "aarch64", "timezone": "Europe/London", "os_name": "Linux", "os_version": "5.15.84-v8", "supervisor": "2023.03.1", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "embedded", "run_as_root": true }, "custom_components": { "localtuya": { "version": "5.0.0", "requirements": [] }, "solcast_solar": { "version": "3.0.40", "requirements": [ "aiohttp>=3.6.2", "datetime>=4.3", "isodate>=0.6.0" ] }, "myenergi": { "version": "0.0.20", "requirements": [ "pymyenergi==0.0.24" ] }, "hacs": { "version": "1.31.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "integration_manifest": { "domain": "localtuya", "name": "LocalTuya integration", "version": "5.0.0", "documentation": "https://github.com/rospogrigio/localtuya/", "dependencies": [], "codeowners": [ "@rospogrigio", "@postlund" ], "issue_tracker": "https://github.com/rospogrigio/localtuya/issues", "requirements": [], "config_flow": true, "iot_class": "local_push", "is_built_in": false }, "data": { "device_config": { "friendly_name": "shauns room", "host": "192.168.1.40", "device_id": "bfbecfdb271b1100ea9fif", "local_key": "9d0d083e4c1133d7", "protocol_version": "3.3", "enable_debug": false, "manual_dps_strings": "1", "dps_strings": [ "1 (value: -1)" ], "entities": [ { "id": 1, "friendly_name": "shauns room", "restore_on_reconnect": false, "is_passive_entity": false, "current": 1, "current_consumption": 1, "voltage": 1, "platform": "switch" } ], "product_key": "keyjup78v54myhan" } } }

ichipek commented 1 year ago

Pretty much the same problem. I used localtuya for 3 power sockets and all stopped working after 2023.3 update. Restarting HA helps for few minutes but then they are gone… Cloud sees them fine.

yncki commented 1 year ago

same here , after few days after restart all overmax plugs are unavailable, after restart it works again for few days...

ichipek commented 1 year ago

debug from core: 2023-03-17 00:24:06.325 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf0...ef6] Sending payload: b'{"gwId":"*******************f6","devId":"*******************f6"}' 2023-03-17 00:24:06.327 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf0...ef6] Command 9 waiting for sequence number -100 2023-03-17 00:24:06.359 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf0...ef6] Dispatching message CMD 9 TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211, crc_good=True) 2023-03-17 00:24:06.360 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf0...ef6] Got heartbeat response 2023-03-17 00:24:06.360 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf0...ef6] ACK received for command 9: ignoring it and so it repeats, even if they are no t turn unavailable the value is not refreshing

ichipek commented 1 year ago

seems i overlooked an update in HACS to v 5.1.. just did that and although diagnostic still reads this...

"integration_manifest": { "domain": "localtuya", "name": "LocalTuya integration", "version": "5.0.0", "documentation": "https://github.com/rospogrigio/localtuya/", "dependencies": [], "codeowners": [ "@rospogrigio", "@postlund"

it looks socket are back online. so make sure you're up to date too.