tinytuya: Timeout Waiting for Device from RPi but not from another Ubuntu device
Hello,
I’m facing a weird beaviour and I’m pretty sure that I missed something.
Running the command python -m tinytuya scan on my Ubuntu machine is fine (but the machine is not up 24/7)
olivier@olivier-ubuntu:~$ python3 -m tinytuya scan
TinyTuya (Tuya device scanner) [1.12.0]
[Loaded devices.json - 1 devices]
Scanning on UDP ports 6666 and 6667 and 7000 for devices for 18 seconds...
Frigo CR 328 AZD Product ID = keyjup78v54myhan [Valid Broadcast]:
Address = 192.168.0.44 Device ID = ab3961c448d2979e55sean (len:22) Local Key = b7bd599d6dbbfa2f Version = 3.3 Type = default, MAC = fc:67:1f:cb:12:58
Status: {'1': True, '9': 0, '17': 4, '18': 289, '19': 653, '20': 2362, '21': 1, '22': 551, '23': 25500, '24': 14219, '25': 2930, '26': 0, '38': 'on', '39': False, '40': 'relay', '41': False, '42': '', '43': '', '44': ''}
Scan completed in 18.0572 seconds
Scan Complete! Found 1 devices.
Broadcasted: 1
Versions: 3.3: 1
>> Saving device snapshot data to snapshot.json
Running the same from my RPi (which is up 24/7), it fails (tinytuya) pi@hassbian:/etc/tinytuya $ python -m tinytuya scan
TinyTuya (Tuya device scanner) [1.12.0]
[Loaded devices.json - 1 devices]
Scanning on UDP ports 6666 and 6667 and 7000 for devices for 18 seconds...
Frigo CR 328 AZD Product ID = keyjup78v54myhan [Valid Broadcast]:
Address = 192.168.0.44 Device ID = ab3961c448d2979e55sean (len:22) Local Key = b7bd599d6dbbfa2f Version = 3.3 Type = default, MAC = fc:67:1f:cb:12:58
Polling 192.168.0.44 Failed: No response
Scan completed in 18.0742 seconds
Scan Complete! Found 1 devices.
Broadcasted: 1
Versions: 3.3: 1
>> Saving device snapshot data to snapshot.json
What I already did:
- Look if ports are not in use on the RPi.
- Tuya device is reachable
(tinytuya) pi@hassbian:/etc/tinytuya $ ping 192.168.0.44
PING 192.168.0.44 (192.168.0.44) 56(84) bytes of data.
64 bytes from 192.168.0.44: icmp_seq=1 ttl=255 time=80.2 ms
From 192.168.0.100 icmp_seq=2 Redirect Host(New nexthop: 192.168.0.44)
64 bytes from 192.168.0.44: icmp_seq=2 ttl=255 time=122 ms
64 bytes from 192.168.0.44: icmp_seq=3 ttl=255 time=144 ms
64 bytes from 192.168.0.44: icmp_seq=4 ttl=255 time=37.9 ms
64 bytes from 192.168.0.44: icmp_seq=6 ttl=255 time=61.1 ms
64 bytes from 192.168.0.44: icmp_seq=7 ttl=255 time=98.8 ms
64 bytes from 192.168.0.44: icmp_seq=8 ttl=255 time=119 ms
64 bytes from 192.168.0.44: icmp_seq=9 ttl=255 time=128 ms
^C
--- 192.168.0.44 ping statistics ---
9 packets transmitted, 8 received, +1 errors, 11.1111% packet loss, time 8040ms
rtt min/avg/max/mdev = 37.892/98.930/144.054/34.180 ms
- Tuya device is answering on port 6668
(tinytuya) pi@hassbian:/etc/tinytuya $ telnet 192.168.0.44 6668
Trying 192.168.0.44...
Connected to 192.168.0.44.
Escape character is '^]'.
Connection closed by foreign host.
I’m running out of idea 😢
Please help
P.S.: Trying in python directly
(tinytuya) pi@hassbian:/etc/tinytuya $ python
Python 3.11.2 (main, Mar 4 2023, 12:59:45) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tinytuya
>>> d = tinytuya.OutletDevice('ab3961c448d2979e55sean','192.168.0.44','b7bd599d6dbbfa2f')
>>> d.set_version(3.3)
>>> print( d.status() )
{'Error': 'Timeout Waiting for Device', 'Err': '902', 'Payload': 'Check device key or version'}
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (4 by maintainers)
Let me close that issue here, I’ll try to find help in the appropriate forum. Thank you for your help.