rospogrigio / localtuya

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

Light was reset, I repaired the light to the AP, shows up in Tuya app, same IP, same ID, still offline in HA #617

Open bobloadmire opened 3 years ago

bobloadmire commented 3 years ago

The problem

Light was reset, I repaired the light to the AP, shows up in Tuya app, same IP, same ID, still offline in HA

Environment

Only using Tuya Local, updated to latest from HACS

Steps to reproduce

  1. Working wall switch dimmer with Local Tuya
  2. Hold down switch to enter pairing mode. (your 3 year old toddler will do this for you)
  3. Pair switch to same AP as before, assign same static IP
  4. Confirm still works in Tuya app, tuya app discovered same device and appplied the same name and ID.
  5. Confirmed Tuya Local is still pointing to the same IP and ID.
  6. Tuya Local shows device offline, reboot HA, no fix.

Provide Home Assistant taceback/logs

Logger: custom_components.localtuya.common Source: custom_components/localtuya/pytuya/init.py:559 Integration: LocalTuya (documentation, issues) First occurred: 6:34:58 AM (114 occurrences) Last logged: 7:25:58 AM

[483...426] Connect to 192.168.0.36 failed Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 149, in _make_connection status = await self._interface.status() File "/config/custom_components/localtuya/pytuya/init.py", line 472, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 457, in exchange payload = self._decode_payload(msg.payload) File "/config/custom_components/localtuya/pytuya/init.py", line 559, in _decode_payload return json.loads(payload) File "/usr/local/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

-->

Additional information

wookie666 commented 3 years ago

Whenever anything is re added to the tuya app the key is reset The ID stays the same but