Keyboard press not showing up

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}]

I see in devtools there are 5 listeners for nodered, do you have more than one ha server config node setup? Open the event node and in the sever drop down is there more than 1?

If yes in the debug panel at the top switch to home assistant. Look at the server entries. The number is how many nodes use it. If the others have nodes using it you will need to change those nodes so it only uses one.

image

I think those are probably from other flows i imported over the years.
How do i remove the ones that’s not related my HA server?

As I posted above each server will have a number next to it that indicates how many nodes use it. You will need to consolidate them all. Double clicking on a server node will open it’s dialog box, choose delete.

If other nodes were using it when you deploy you should get a message that there are unconfigured nodes and then give the option to view them. You will need to open them and then choose the right server then deploy.

When importing flows first run the code through the scrubber to remove additional servers so you don’t run into this again,