make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.24k stars 491 forks source link

Unexpected Payload From Device #2329

Closed sshaikh closed 2 hours ago

sshaikh commented 5 hours ago

Describe the bug

I'm trying to (re) add a Tuya smart socket that was previously working with TL but which I removed to test with the native app. As it needed a reset, a new local key (and device id?) have been ascertained already via development portal. The socket otherwise works fine in the Tuya app. Three other identical sockets still work (although they were not removed in the same way). The device is a Nooie PU13 UK smart socket.

To Reproduce Try adding the device via both cloud and manual flows, using all types of protocol (restarting HA each time to avoid the "Device Key" error. The cloud flow detects the socket (as the only one not already added) but fails after populating the manual form.

Expected behavior For the socket to be added.

Additional context

This error originated from a custom integration.

Logger: custom_components.tuya_local.device
Source: custom_components/tuya_local/device.py:451
integration: Tuya Local (documentation, issues)
First occurred: 20:58:41 (1 occurrences)
Last logged: 20:58:41

Test protocol error 904: Unexpected Payload from Device

Interestingly the cloud flow populates the incorrect IP address. I'm not sure if this is related.

make-all commented 3 hours ago

If the cloud flow populates an IP address, it is not incorrect.

sshaikh commented 2 hours ago

Seems my static IPs were incorrect - thanks for the tip. No bug.