NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
446 stars 77 forks source link

Each routine executes the command 5 times #422

Closed Loginbug closed 3 years ago

Loginbug commented 3 years ago

I'm using homebridge-alexa and homebridge-cmdswitch2 to run some bash script. Each alexa routine executes the command 5 times. So, when i run 'light on the interruptor' routine, alexa light up the interruptor 5 times. Same thing for switch off routine. Thanks for any help.

Please note that interrupt state is not defined: { "name": "VI-P0-INC", "on_cmd": "removed", "off_cmd": "removed", "timeout": 60 }, { "name": "VI-P0-BIN", "on_cmd": "removed", "off_cmd": "removed", "timeout": 60 },

debug.log

NorthernMan54 commented 3 years ago

I looked at the backend logs and my skill received multiple unique requests from the Alexa backend, how are you controlling this from the Alexa side ?

Loginbug commented 3 years ago

Found a solution by myself. The problem was this: "timeout": 60 Alexa plugin thinks that command is timed-out so it send it 5 times. I have put "timeout": 1 and problem disappear.

Loginbug commented 3 years ago

Thanks anyway for your excellent work

NorthernMan54 commented 3 years ago

Alexa hangs up after 8 seconds, so you have a couple of seconds to play with. Maybe 5