Max Isom
Max Isom
Instead of specifying the CID there, you could try instead creating an instance with ```js new TuyAPI({ gwID: 'your-parent-device-id', id: 'your-child-device-id', ... }) ```
If you're using the event-based API I believe the current approach is to let you handle this yourself. I would be willing to accept a PR that attempts to reconnect...
@Shaun-R feel free to PR your changes. :)
Have you tried using the 3.1 protocol? Also, what kind of device do you have?
Hmm. It's possible that [this is related](https://github.com/codetheweb/tuyapi/pull/380). Could you try the [event-based example](https://github.com/codetheweb/tuyapi#asynchronous-event-based-recommended) in the README and see if you have the same issue?
Please post the full debug output. My guess is that another device (phone, server, etc.) is trying to control it at the same time.
This sounds very similar to the behavior described here: https://github.com/codetheweb/tuyapi/issues/389.
> I have the same problem if I set the IP of the device. If I do not set it, tuyapi waits for the UDP broadcast and then everything is...
Sounds like something on Tuya's end, let me know if I can help out at all.
Your devices are probably registered in a different region (through the app) than what the API supports. IIRC there's a way to set your region when signing up, try signing...