homebridge-tuya-platform
homebridge-tuya-platform copied to clipboard
Scenes not working properly
Hi,
I'm using 1.7.0-beta 5
I have some scenes from tuya app that showns in homekit.
At the first time the scenes worked but now when I click on scene button from homekit, the button stay on and nothing happens.
Could you enable the homebridge debug mode to see if there's any failure logs? So when button is on, you can't switch it off now?
Thank you for replay.
As soon as I restart the bridge everything is fixed. Only after a few sessions it stops working. I didn't pay attention to the specific scenario.
In normal state: pressing the button run the scene and the button turns off automatically
In an incorrect state: the scene is not run and the button remains on. By clicking on it, it turns off, but from now on, every click on the button does not run the scene
I will activate the debug mode and update
OK, I will pay attention on this too. At present I didn't encounter this problem and almost every turn is success.
I have the problem again but now I have logs:
10:08:45HomeTuyaPlatformWARNING[TuyaOpenMQ] Message received with wrong order. 16/12/2022, 10:08:45HomeTuyaPlatformWARNING[TuyaOpenMQ] LastMessage: dataId = cc537583-211b-4139-b13b-b0b3b1f38673, t = 1671178125 16/12/2022, 10:08:45HomeTuyaPlatformWARNING[TuyaOpenMQ] CurrentMessage: dataId = b6f2d284-3314-4806-b110-158b1c5f0db6, t = 1671178124 16/12/2022, 10:08:45HomeTuyaPlatformWARNING[TuyaOpenMQ] Fallback to use API fetching the latest device status.
This warning I think may not relate to this issue, execute scene only fire an HTTP API, no mqtt event callback.
The HTTP API log is visible only when homebridge debug mode is on.
The code is here: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/src/accessory/SceneAccessory.ts#L21
There's an possibilty that if your network is not well, execute command is stucked, then the below code is not executed yet, then switch is not changed to off.
I have fiber mesh network. When I run from the tuya app everything works. Maybe it's something else in accessing the api.
All my switch works well I only have problem with the scenes
Fine, I have no ideas now.. If there's any http api logs about the failure, please let me know, thanks.
I started this discussion but I see that may be an issue on my part. In my case the scene executed but the button stayed switched on. I still think that if the button went off automatically after 1sec or so would be better (instead of waiting for response from Tuya API).