I have a homeseer HS-WD200 https://homeseer.com/wp-content/uploads/2018/02/HS-WD200-Manual-4.pdf
I am trying to use Blink in Status mode which is described as
Bitmask defines specific LEDs to enable for blinking:
Note: this decimal value is derived from a hex code
calculation based on the following:
Bit 0 = led 1, Bit 1 = led 2, Bit 2 = led 3, Bit 3 = led 4,
Bit 4 = led 5, Bit 5 = led 6, Bit 6 = led 7
IE: value of 1 = first LED, 64 = led 7
I have two motion sensors that detect if the two garage doors are open. In a rule I would like to be able to read the current state of the Blink in Status and turn on LED7 if Door 1 is open and LED6 if Door 2 is open.
so far I have
logInfo(“TEST”,"BlinkStatus: " + tv_led_blink_status.state.toString)
logInfo(“TEST”,"BlinkStatus3: " + tv_led_blink_status.state.toString)
I would like to be able to convert tv_led_blink_status.state to something i can do bit math on to set the just bit 5 or bit6 depending on which do has been open.
I thought i could do something like
int state = 32;
int door1 = 32;
int door2 = 64;
int newstate = state | door2
so i would have a value of 96 that I can use in tv_led_blink_status.sendCommand, but int newstate = state | door2 give me an error.
Anything thoughts on how to do this?