Open jacobdoayee opened 2 years ago
are your tuya devices on static or reserved IP addresses? not super familiar with this code base yet but it looks like the integration is failing because it isnt able to connect to a device. the IP, key, and ID all need to stay the same otherwise you may have a device take another's IP and suddenly neither will work. its a problem that wouldnt manifest until a lot of devices power cycled or your router/dhcp server are restarted or hard-cycled
I have tried re-adding them and made sure the IP address of each of the devices is correct and matching to the ID and key. I can reserve them on DHCP in my router, but that wouldn't stop them from connecting in the first place.
Another thing to check is the local key, this apparently is not object specific... I added the same device twice in one week and got two different local key, id stayed the same. The IP also jumped with me so added mac/IP-combi to the router
I'm seeing the same issues and have reserved the IP on the router so that's not changing. The devices(both dimmer switches) show up after "registering" them but they aren't controlable and their status is often not accurate. I'm brand new to this integration so there could be more going on (used the flow control to discover/register the devices not the config). Not sure if this is of any help or not.
same problem
one thing i ended up noticing with devices of mine that weren't responding after adding them was the ID's. I had several lights for example that started in the 20's for controllable parameters and when they were set to the parameters in the single digits, showed up as uncontrollable. I ended up logging into the tuya cloud and going to the devices list to check all of them for their parameters individually, then filled them in to the yaml. I used the config flow for adding a device from the home assistant UI to make sure I had the correct ID's (DPC's i think, cant remember for sure and its late so forgive me)
go to cloud, select your project, then click on the devices tab that pops up. click on debug device (any will do) and in the resulting window you can clear the search parameter of the device ID in order to click through and view every device in your account. from there you can see every parameter min/max and capability of your device. With that information, coupled with the config flow in the home assistant local tuya UI, I had no problem accurately filling in all of the information for each light and switch. I ended up deleting all of the devices from the home assistant UI and then restarting to pick them up again. It all worked like a charm once everything was set correctly. The biggest hurdle is the lack of meaningful or automatic error checking and correction but a little digging with the iot cloud and config flow can usually skirt most issues with this integration.
Im getting the same issue after a week long power outage. Followed all of the steps above with no joy. I can control the devices via my developer account and the smart home app but Home Assistant fails to see devices even though the IP is being pulled correctly and the local key is correct. I can add them and then they seem to become unavailable almost right away. all data is being populated.
I have the same issue. I can even poll and control the device using tiny tuya python software, but Home Assistant with HACS and tuya local just cannot find the device.
Could there have been an undocumented change in the hardware or API that just hasn't been addressed yet?
This started yesterday morning. All my preconfigured devices were unavailable to I’ve deleted them and reinstalled the integration, but now I see this error on every attempt to add a device.
This error originated from a custom integration.
Logger: custom_components.localtuya.config_flow Source: custom_components/localtuya/pytuya/init.py:669 Integration: LocalTuya integration (documentation, issues) First occurred: 18 March 2022, 12:03:24 (3 occurrences) Last logged: 09:38:54
Unexpected exception Traceback (most recent call last): File "/config/custom_components/localtuya/config_flow.py", line 283, in async_step_basic_info self.dps_strings = await validate_input(self.hass, user_input) File "/config/custom_components/localtuya/config_flow.py", line 189, in validate_input interface = await pytuya.connect( File "/config/customcomponents/localtuya/pytuya/init.py", line 669, in connect , protocol = await loop.create_connection( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') OSError: [Errno 113] Connect call failed ('192.168.0.9', 6668)