jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
956 stars 172 forks source link

{'Error': 'Network Error: Device Unreachable', 'Err': '905', 'Payload': None} #355

Closed nscoo closed 1 year ago

nscoo commented 1 year ago

I'm sorry to hear that you encountered an error while running the code, and you're unsure how to resolve it.

import tinytuya

d = tinytuya.OutletDevice(
    dev_id='eb3acc083a68236498sysw',
    address='192.168.*.***',      # Or set to 'Auto' to auto-discover IP address
    local_key="********'", 
    version=3.4)

data = d.status() 
print('set_status() result %r' % data)

d.turn_on()

d.turn_off()

my snapshot.json

{
    "timestamp": 1684910603.4498143,
    "devices": [
        {
            "id": "eb225139b6c66947bei5kn",
            "ip": "192.168.*.***",
            "active": 2,
            "encrypt": true,
            "productKey": "************",
            "token": true,
            "wf_cfg": true,
            "name": "",
            "key": "",
            "mac": "",
            "ability": 0,
            "dev_type": "default",
            "origin": "broadcast",
            "ver": "3.4"
        },
        {
            "id": "eb3acc083a68236498sysw",
            "ip": "192.168.*.***",
            "active": 2,
            "encrypt": true,
            "productKey": "nwar6wovaqycxxzz",
            "token": true,
            "wf_cfg": true,
            "name": "Smart  Wi-Fi Dimmer",
            "key": "***********",
            "mac": "fc:67:1f:df:83:bc",
            "ability": 0,
            "dev_type": "default",
            "err": "No response",
            "origin": "broadcast",
            "ver": "3.4"
        }
    ]
}

and How can I troubleshoot the "No response" issue during the "Polling local devices" step when running python -m tinytuya wizard?

jasonacox commented 1 year ago

Hi @nscoo - You can turn on the debug mode:

python -m tinytuya wizard -debug
nscoo commented 1 year ago

I solved this problem by turning off and on the device! Thanks for your help. 😀