Hi, I’m trying to configure keyboad press automation on my second homeassistant server
I can see it listed in developer tools but it’s not showing up in node red debug from the event node
It works fine on my first HA server, but I can’t figure why it’s not showing up in this one.
Anything else I’m missing here?
Flows:
[{"id":"99e0eea13c445bc1","type":"server-events","z":"96ad8f5fbd98e935","name":"Keypad","server":"f4149317.d3794","version":3,"exposeAsEntityConfig":"","eventType":"keyboard_remote_command_received","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":130,"y":100,"wires":[["b870a12a7d884b34","653996b93cf02a8a"]]},{"id":"653996b93cf02a8a","type":"debug","z":"96ad8f5fbd98e935","name":"debug 13","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":560,"y":220,"wires":[]},{"id":"b870a12a7d884b34","type":"function","z":"96ad8f5fbd98e935","name":"function 1","func":"// Store the event object in a variable\nlet event = msg.payload.event;\n\n// Access the first and second properties (key_code and type)\nlet key_code = event.key_code;\nlet type = event.type;\n\n// Example filtering using if case based on key_code and type\nif (key_code === 128 && type === 'key_hold') {\n // Do something for key_code 128 and type key_hold\n msg.payload = { action: \"Key 128 Held\" };\n} else if (key_code === 128 && type === 'key_down') {\n // Do something for key_code 128 and type key_down\n msg.payload = { action: \"Key 128 Down\" };\n} else if (key_code === 78 && type === 'key_hold') {\n // Do something for key_code 78 and type key_hold\n msg.payload = { action: \"Key 78 Held\" };\n} else if (key_code === 78 && type === 'key_down') {\n // Do something for key_code 78 and type key_down\n msg.payload = { action: \"Key 78 Down\" };\n} else if (key_code === 70 && type === 'key_hold') {\n // Do something for key_code 70 and type key_hold\n msg.payload = { action: \"Key 70 Held\" };\n} else if (key_code === 55 && type === 'key_hold') {\n // Do something for key_code 55 and type key_hold\n msg.payload = { action: \"Key 55 Held\" };\n} else if (key_code === 55 && type === 'key_down') {\n // Do something for key_code 55 and type key_down\n msg.payload = { action: \"Key 55 Down\" };\n} else {\n // Default case if none match\n msg.payload = { action: \"No match\" };\n}\n\n// Return the message object\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":100,"wires":[["f0ea1b0095053592"]]},{"id":"f0ea1b0095053592","type":"switch","z":"96ad8f5fbd98e935","name":"Switch","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"Key 128 Held","vt":"str"},{"t":"eq","v":"Key 128 Down","vt":"str"},{"t":"eq","v":"\"Key 78 Held\"","vt":"str"},{"t":"eq","v":"\"Key 78 Down\"","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":470,"y":100,"wires":[["8b5b2ccc84daa91c"],[],[],[]]},{"id":"8b5b2ccc84daa91c","type":"api-call-service","z":"96ad8f5fbd98e935","name":"Turn off store lights","server":"f4149317.d3794","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.store_4g_switch1","switch.store_4g_switch2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":690,"y":80,"wires":[[]]},{"id":"f4149317.d3794","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]