You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope someone can help me as I am struggling.
I have a door contact sensor from Dragino LDS02 I am trying to write a fun expression
to output a true false value if door is open closed. What I Have that obviously is not working.
fun (Fields, <<Status:8, Bat:8, Mod:8, Events:24, Duration:24, Alarm:8>>) -> Status2 = if Status band 80; true -> 1 end, Fields#{status => Status2} end.
In Node-Red I tried this with the untouched output and it works but can not replicate it with a fun.
var door = msg.payload.status & 0x80 ? 1 : 0
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered:
Hope someone can help me as I am struggling.
I have a door contact sensor from Dragino LDS02 I am trying to write a fun expression
to output a true false value if door is open closed. What I Have that obviously is not working.
fun (Fields, <<Status:8, Bat:8, Mod:8, Events:24, Duration:24, Alarm:8>>) -> Status2 = if Status band 80; true -> 1 end, Fields#{status => Status2} end.
In Node-Red I tried this with the untouched output and it works but can not replicate it with a fun.
var door = msg.payload.status & 0x80 ? 1 : 0
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: