04-19-2020, 04:06 PM
A couple of quick questions with design and states. These are probably simple things I am missing. I guess this is what happens when you dont play with it for a while
I have had a system working for a while now, but had it shutdown for a bit and now I am working on it again.
Question 1:
I have an ELK panel, with colored icons based off of the state of the zone. For the front door icon, I have under image settings, one icon for false another for True. However, even when in the Driver it is showing the zone as open (shorted), it is still displaying the True Icon
Question 2:
I have a different icon trying to monitor a lutron light switch.
State Field: Lutron.LGHT#Sw_DiningRoomChandelier
And two different icons based off of true or false.
The icon is displaying though the error state. But when I go to the driver tab and I turn the light on and off, it toggles between true and false.
Question 3:
I am trying to make a button to turn the light on or off depending on the current state.
I believe I have the write part correct to set the light, but what is the proper way of reading the current state for an if/else. Below is what I have, but I know its wrong:
Thank you
I have had a system working for a while now, but had it shutdown for a bit and now I am working on it again.
Question 1:
I have an ELK panel, with colored icons based off of the state of the zone. For the front door icon, I have under image settings, one icon for false another for True. However, even when in the Driver it is showing the zone as open (shorted), it is still displaying the True Icon
Question 2:
I have a different icon trying to monitor a lutron light switch.
State Field: Lutron.LGHT#Sw_DiningRoomChandelier
And two different icons based off of true or false.
The icon is displaying though the error state. But when I go to the driver tab and I turn the light on and off, it toggles between true and false.
Question 3:
I am trying to make a button to turn the light on or off depending on the current state.
I believe I have the write part correct to set the light, but what is the proper way of reading the current state for an if/else. Below is what I have, but I know its wrong:
Code:
If
Devices::FieldRead
P1=Lutron.LGHT#Sw_DiningRoomChandelier
P2=%(LVar:DiningChand)
P3=True
Devices::FieldWrite
P1=Lutron.LGHT#Sw_DiningRoomChandelier
P2=False
P3=True
Else
Devices::FieldWrite
P1=Lutron.LGHT#Sw_DiningRoomChandelier
P2=True
P3=True
End