Open psmedley opened 1 month ago
OK... this is due to my blinds having:
"version": ""
in devices.json
Have you connected your blinds to tuya online for more than a day or two. Some of that stuff only populates after some time?
If so then I'd suggest you just replace "" with "0.1" or something (in that file). It's not critical. Will make a fix for it if you confirm that your devices has been connected to the paltform long enough.
they've only been connected for 24 hours or so. I did regenerate devices.json this evening. I did change it to "0" and the error went away, but now I'm seeing:
2024-05-29 19:34:27,753 - tuya_mqtt - INFO - Starting tuya_mqtt...
2024-05-29 19:34:27,753 - tuya_mqtt - INFO - Creating device threads...
2024-05-29 19:34:27,753 - tuya_mqtt - INFO - Starting device threads...
2024-05-29 19:34:27,754 - tuya_mqtt - INFO - Initialising device instance for Gateway...
2024-05-29 19:34:27,754 - tuya_mqtt - INFO - Gateway connecting to mqtt...
2024-05-29 19:34:27,755 - tuya_mqtt - INFO - Connecting to Gateway...
2024-05-29 19:34:27,755 - tuya_mqtt - INFO - Gateway connected to MQTT...
2024-05-29 19:34:29,595 - tuya_mqtt - ERROR - Cound not connect to Gateway
2024-05-29 19:34:32,754 - tuya_mqtt - INFO - Initialising device instance for Paul's Blind...
2024-05-29 19:34:32,754 - tuya_mqtt - INFO - Paul's Blind connecting to mqtt...
2024-05-29 19:34:32,755 - tuya_mqtt - INFO - Connecting to Paul's Blind...
2024-05-29 19:34:32,755 - tuya_mqtt - INFO - Paul's Blind connected to MQTT...
2024-05-29 19:34:37,755 - tuya_mqtt - INFO - Initialising device instance for Julie's Blind...
2024-05-29 19:34:37,755 - tuya_mqtt - INFO - Julie's Blind connecting to mqtt...
2024-05-29 19:34:37,756 - tuya_mqtt - INFO - Connecting to Julie's Blind...
2024-05-29 19:34:37,756 - tuya_mqtt - INFO - Julie's Blind connected to MQTT...
2024-05-29 19:34:37,756 - tuya_mqtt - ERROR - Cound not connect to Julie's Blind
2024-05-29 19:34:50,757 - tuya_mqtt - ERROR - Cound not connect to Paul's Blind
Is it connecting using the cloud api or local? the blinds don't have a local IP address, only the gateway does.
Renamed this issue. Can you make a separate issue for the 2nd part please.
Actually try update your devices file again. Or set version to 3.1. It's actually important.
I think both these issues are related. These are zigbee blinds - so support RF and zigbee control. They don't have a local IP address (and hence (I think) don't have a protocol version).
i'm assuming you're using local control, which may not work with these blinds as they don't have IP addresses. In my case, I'll need to use cloud control. I'll take a look at server.py over the weekend...
Yes, I have started to agree. If the devices don't support local control (via local connections) it's not going to work. I've set this project up to use local connections as connecting via cloud is slow and the number of API requests are limited.
Check if the gateway doesn't expose controls for the attached devices? Also fetch the devices file again after a day or two. Maybe you're lucky.
I'll probably change the code to not connect if the device doesn't have a valid version.
Actually also look at this: https://github.com/jasonacox/tinytuya/issues/117
Try the different scan options and check those.
With python 3.11, I'm seeing the following when running server.py: