AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
204 stars 52 forks source link

Unable to detect device #51

Closed davidmuzi closed 5 years ago

davidmuzi commented 5 years ago

I was able to extract the device ID and key using Charles on iOS.

The device Id was extracted from the /api.json response under the key result[4].result[0].devId and the key under result[4].result[0].localKey

Using these values in the HomeBridge config.json, the logs state it cannot connect to the device.

[TuyaLan] Failed to discover Smart switch (xxxx) in time but will keep looking

Note: using the instructions to extract the keys using Tuya-cli did not work as the tool did not print anything to console. This was being run on an Intel Synology DiskStation

AMoo-Miki commented 5 years ago

Please give the latest rc release a shot by doing npm i -g homebridge-tuya-lan@rc. It includes logic to understand this newer API.

A known issue is that the current state is not reported by some devices; they however work fine as soon as you interact with them. I have reached out to Tuya for a solution.

The Setup Instructions have changed in case you need to obtain a fresh id and key.

davidmuzi commented 5 years ago

Worked, thanks!

AMoo-Miki commented 5 years ago

That is great news; thanks for confirming.