I have created 4 virtual devices (using the Arduino plugin) to control awnings, i.e. open, close, stop/favorite, and program. Each has two states on(100) and off(0). When I want to open the awning I set the open device to 100. An event is then resetting it back to 0. The reason I did not create a device with 4 states is because Alexa only understands on/off or dim but cannot distinguish between different states. In addition, if somebody uses the remote control HS gets out of sync with the state anyways as there is no feedback from the shade.
The problem I am having is that my event gets triggered twice. That happens both if I trigger the even manually or when I go to device management and set one of the 4 devices to on. How can I prevent the event from being triggered twice?
Below is the screenshot of the event as well as the logs when I have both the If and Or If statement and when I have the If statement only. *1 shows that the event was executed only once. *2 and *3 shows where the event is executed twice. I can kind of see why the event is executed twice. For instance when I trigger the event manually it sets the virtual device to the on state and that then triggers the event a second time because of the OR IF statement. However, there has to be a way to prevent this from happening when the source of the event and the target are the same.
IF only:
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
*1 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
Board 1, Device Ref = 774, API Input 4, Value = 3103
IF and OR IF:
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
Board 1, Device Ref = 774, API Input 4, Value = 3108
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
*2 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
Board 1, Device Ref = 774, API Input 4, Value = 3107
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
*2 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
*3 Event Trigger "Blinds Awning 2 - Stop/Favorite"
*3 Event Trigger "Blinds Awning 2 - Stop/Favorite"
Event Blinds Awning 2 - Stop/Favorite triggered by the event page 'Run' button.
The problem I am having is that my event gets triggered twice. That happens both if I trigger the even manually or when I go to device management and set one of the 4 devices to on. How can I prevent the event from being triggered twice?
Below is the screenshot of the event as well as the logs when I have both the If and Or If statement and when I have the If statement only. *1 shows that the event was executed only once. *2 and *3 shows where the event is executed twice. I can kind of see why the event is executed twice. For instance when I trigger the event manually it sets the virtual device to the on state and that then triggers the event a second time because of the OR IF statement. However, there has to be a way to prevent this from happening when the source of the event and the target are the same.
IF only:
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
*1 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
Board 1, Device Ref = 774, API Input 4, Value = 3103
IF and OR IF:
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
Sent to com port No:5 = 1 O 6 0 ,Output Set Command
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
Board 1, Device Ref = 774, API Input 4, Value = 3108
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
Board 1, Device Ref = 772, API Input 2, Value = 3, String = 3
*2 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
Board 1, Device Ref = 774, API Input 4, Value = 3107
Board 1, Device Ref = 772, API Input 2, Value = -3, String = -3
*2 Sent to com port No:5 = 1 O 6 100 ,Output Set Command
*3 Event Trigger "Blinds Awning 2 - Stop/Favorite"
*3 Event Trigger "Blinds Awning 2 - Stop/Favorite"
Event Blinds Awning 2 - Stop/Favorite triggered by the event page 'Run' button.
Comment