jasonacox / tinytuya

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

Key showing up in weird format after readding devices to Tuya #378

Closed murtazabasrai closed 1 year ago

murtazabasrai commented 1 year ago

As the device got reset after power outage, I had to re-add the devices to the Tuya App. After re-adding the devices, I ran tinytuya wizard which shows up keys in weird format for these recently added devices.


{
        "name": "Light bulb 1",
        "id": "xxxxxxxxxxxxxxxxxxxx",
        "key": "bYAp`PR-O9qNwLV",
        "mac": "xx:xx:xx:xx:xx:xx",
        "uuid": "xxxxxxxxxxxxxxxxxxxx",
        "sn": "xxxxxxxxxxxxxxxxxxxx",
        "category": "dj",
        "product_name": "Light Bulb",
        "product_id": "xxxxxxxxxxxxxxxxxxxx",
        "biz_type": 0,
        "model": "",
        "sub": false
        .......
}

This key value seems encoded? It's not working with controlling devices on local tuya lan via Homebridge or HomeAssistant.
Has anyone faced similar issue?
uzlonewolf commented 1 year ago

They're not encoded, they just started including symbols. #341 . Not sure why it isn't working for you, perhaps one of the symbols is getting interpreted as an escape character?

murtazabasrai commented 1 year ago

Yes, I think the issue was in the paste of the keys interpretted as different character. As the format of the key looked very different from the previous one, I was convinced that's the issue. Thanks for your quick response, it worked now!