Harmony EnitityID in Node-Red?

hello,
why i cant find the entity of my harmony activity in the list here?
image

image

Auto fill doesn’t always work. Just cut and paste. Should work fine.

hm. until now i found all my entities… ;(

i dont know if copy paste will work, or my nodes are wrong. try different nodes, but i cant
see the harmony states of my nodes (entities)

Have you restarted NodeRed yet?
When you add a new entity to HA it is not automatically populated in NR.
If you installed NR as an Addon in HA, a restart of HA will NOT restart NR.

So try and go into the addon settings and restart from there, or reboot the whole machine.

When a new entity is added to HA it is instantly added to NR. The users that don’t see this happen is because their browser is incorrectly caching the autocomplete results.

This can be fixed by turning off all caching for autocomplete results in the HA server config node in NR. or just refreshing the browser page.

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/FAQ.html#entities-not-showing-in-the-autocomplete-dropdown

1 Like

Awesome! Does this now also work for MQTT auto-discovered devices? Or Zigbee and Zwave?
I remember I had to sometimes restart NodeRed in order for new devices to show up.

@Kermit

When a new entity is added to HA it is instantly added to NR

@AlmostSerious
you are right. a restart of NR added my missed entities.

…but, i need help

my target: if i switch with my remote to the activity “LibreElec” my switch “Zigbee Kodi” should goes on.
if i switch off or change the activity the switch “Zigbee Kodi” should go off after 30seconds.

with my nodes nothing happens

You probably should add a switch node inbetween the State change node and the service calls. In there you can then filter for the activity messages

@AlmostSerious

like this ?

Almost, you would probably want to filter for the activity not the payload which just reflects on / off.
So in the switch node you can replace msg.payload by msg.data.new_state.attributes.current_activity and then in the outputs just add the names of your activities.
Additionally, you would need to connect the second output of the state_change node to the 30s timer.

if i do this, the timer will not work

Harmony Off --> one second later switch off

Ok just looking at it again, I see that your are using the trigger node for the auslöser 30s. I dont think this is doing what you expect it to do. I would recommend just making it easy and just to use a simple delay or stoptimer node as you just want a 30sec delay if i understood you correctly.

The reason why you need to add both switch and state_change node to this auslöser is the following:

In the state changed you filtered for the ON State. That means if your harmony hub is on, the message will be sent to the first output (TRUE). From there, the Switch node will take over in analyzing your message and will send it to the correct output based on which activity is currently activated.

The second output on the state change node, is when the Harmony Hub is OFF (FALSE), and because you also want to turn off the Kodi Switch when the Harmony Activity is off, this is the second connection that you need for the 30s timer.

Maybe you can just post your whole flow… (export in node red) that helps debugging this.

I would do it like this (you need to change all your entities and activities):

[
    {
        "id": "6eeab4cb.2f8e4c",
        "type": "server-state-changed",
        "z": "6b8efe0d.bc75e",
        "name": "Harmony Fire TV",
        "server": "2fba4297.e4145e",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "remote.bedroom",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 140,
        "y": 4000,
        "wires": [
            [
                "2830417c.948a5e"
            ],
            [
                "c8fd7702.d9a628"
            ]
        ]
    },
    {
        "id": "2830417c.948a5e",
        "type": "switch",
        "z": "6b8efe0d.bc75e",
        "name": "",
        "property": "data.new_state.attributes.current_activity",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Activity1",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Activity2",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 330,
        "y": 3960,
        "wires": [
            [
                "13cdd6cf.0099e9",
                "2db08e46.559392"
            ],
            [
                "c8fd7702.d9a628"
            ]
        ]
    },
    {
        "id": "c8fd7702.d9a628",
        "type": "stoptimer",
        "z": "6b8efe0d.bc75e",
        "duration": "30",
        "units": "Second",
        "payloadtype": "num",
        "payloadval": "0",
        "name": "",
        "x": 570,
        "y": 4080,
        "wires": [
            [
                "293e6ae.6756096"
            ],
            []
        ]
    },
    {
        "id": "293e6ae.6756096",
        "type": "api-call-service",
        "z": "6b8efe0d.bc75e",
        "name": "",
        "server": "2fba4297.e4145e",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "turn_off",
        "entityId": "switch.kodi",
        "data": "",
        "dataType": "jsonata",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 810,
        "y": 4080,
        "wires": [
            []
        ]
    },
    {
        "id": "13cdd6cf.0099e9",
        "type": "api-call-service",
        "z": "6b8efe0d.bc75e",
        "name": "",
        "server": "2fba4297.e4145e",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "turn_on",
        "entityId": "switch.kodi",
        "data": "",
        "dataType": "jsonata",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 810,
        "y": 3940,
        "wires": [
            []
        ]
    },
    {
        "id": "2db08e46.559392",
        "type": "change",
        "z": "6b8efe0d.bc75e",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "STOP",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 560,
        "y": 4000,
        "wires": [
            [
                "c8fd7702.d9a628"
            ]
        ]
    },
    {
        "id": "2fba4297.e4145e",
        "type": "server",
        "name": "Home Assistant",
        "legacy": false,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true
    }
]
1 Like