[{"id":"8a42ac99f845c177","type":"tab","label":"GX IO-Extender Input","disabled":false,"info":"","env":[]},{"id":"2b92418a1afac855","type":"victron-input-digitalinput","z":"8a42ac99f845c177","service":"com.victronenergy.digitalinput/10","path":"/State","serviceObj":{"service":"com.victronenergy.digitalinput/10","name":"Door alarm","communityTag":"digitalinput"},"pathObj":{"path":"/State","type":"enum","name":"Digital input state","enum":{"0":"low","1":"high","2":"off","3":"on","4":"no","5":"yes","6":"open","7":"closed","8":"ok","9":"alarm","10":"running","11":"stopped"}},"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"conditionalMode":false,"condition1HysteresisEnabled":false,"condition1HysteresisThreshold":"","outputTrue":"true","outputFalse":"false","debounce":"2000","x":220,"y":380,"wires":[["8367c3a52d52e416","b4c29108efbbe9d1"]]},{"id":"e1c6f6a6e3cd8496","type":"victron-output-switch","z":"8a42ac99f845c177","service":"com.victronenergy.switch/50","path":"/SwitchableOutput/output_5/State","serviceObj":{"service":"com.victronenergy.switch/50","name":"GX IO extender 150","communityTag":"switch"},"pathObj":{"path":"/SwitchableOutput/output_5/State","type":"enum","enum":{"0":"Off","1":"On"},"name":"Output 5 state","mode":"both"},"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"conditionalMode":false,"condition1Operator":">","condition1HysteresisEnabled":false,"condition1HysteresisThreshold":"","condition2Enabled":false,"condition2Service":"","condition2Path":"","condition2Operator":">","logicOperator":"AND","outputTrue":"true","outputFalse":"false","outputOnChange":false,"debounce":2000,"x":830,"y":380,"wires":[]},{"id":"8367c3a52d52e416","type":"function","z":"8a42ac99f845c177","name":"wrangle input value","func":"v = msg.payload;\n\nv = parseInt(v);\n\nif (Number.isInteger(v))\n{\n /*\n 0 - low\n 1 - high\n 2 - off\n 3 - on\n 4 - no\n 5 - yes\n 6 - open\n 7 - closed\n 8 - ok\n 9 - alarm\n 10 - running\n 11 - stopped\n */\n v = v % 2; // because they're pairs from the input values 0-11\n}\nelse\n{\n v = 0;\n}\n\nmsg.payload = v;\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":380,"wires":[["e1c6f6a6e3cd8496","800405e231b0c35f"]]},{"id":"800405e231b0c35f","type":"debug","z":"8a42ac99f845c177","name":"debug ouput value","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":440,"wires":[]},{"id":"b4c29108efbbe9d1","type":"debug","z":"8a42ac99f845c177","name":"debug input value","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":770,"y":480,"wires":[]},{"id":"61765f16ddc0fb21","type":"global-config","env":[],"modules":{"@victronenergy/node-red-contrib-victron":"1.7.24"}}]
Lol, I can’t get the flow posting to work but the gist is use the Digital Input node, make sure you’re using one of the alarm state values for the input (the pulse counter doesn’t seem to allow access to the actual input state). Other wrinkle is that the input values are a bit odd and require some massaging (see that function)