Help please with ha and node red

hi all
please someone help with this as after read the info i could see about ha and node red.
all i could find was to do with node red.

here is my problem:
1. i like to turn a light on and off and contol my tv with a tablet and not use a remote( have ha do that) or get out bed to turn on/off the light( node red for this).
2. so i have to run two pies which one runs node red only and the other runs ha with node red. i can link the two node reds toghter but can`t link ha to node red to turn on the light.

please help
thank in advence

Why ? The 2 Node RED ?

I’m also confused about the need for 2 pis here… or 2 nodereds if you will. Why?

Also, are you using nodered dashboard just to toggle the lights, and lovelace for the tv remote? If so, you might find it easier to keep all the UI stuff on one dashboard.

I prefer to use lovelace ui for all UI interaction. 99% of my automations are done in nodered, but no nodered dashboard. One place to interact, one place to implement automations… keeps it simple®.

There is absolutely no need for a second node red installation that too on a second pi. Node red addon which you have installed in HA is capable of doing all within itself. And node red dashboard is not a mandatory thing when you have lovelace dashboard. To link the node red addon with HA you would also need to install the node node-red-contrib-home-assistant-websocket. Have you done that in node red running in HA?

i have a hat running well on node red that ha don`t run
and the olny reason to goto ha is the tv

if i could i would run once os but ha didn`t run my lights
whose is Energenie light switch

Hello and welcome to the forum. That with the 2 pi’s and the 2x NodeRED is a mystery to me, but what I don’t understand is

There is the NodeRED addon, install, set up, done …

I am even more confused how nodered can run lights but ha cannot? I am pretty sure this isn’t the nodered addon… because with that setup it is the other way around (nodered can’t do anything without ha entities).