What goes inEvent data field in Events:All node?

I’ve looked though several different tutorials and they all either gloss over this info or in some cases literally have a screenshot that doesn’t show this field. Older version? I dunno.

I’m using HASS CORE (emphasized since that seems to be a lot of my trouble) and when trying to set up connection between my HASS install and node-red, there’s a field for “Event data” with an ellipsis that leads to a json entry screen… but I can’t find a single example anywhere on the web of what’s supposed to go in that field, and attempting to save it while blank just results in an error notification.

To be clear this is NOT the “Event type” field. And the error specifically complains about the Event data info being missing.

What belongs there, please?

This is just a copy of what happens in HA, so take a look in the HA developer tools.

thanks, but I don’t have the slightest, tiniest idea what I should be looking for in the dev tools. Your answer is entirely opaque to me.

Click the event tab, put * in the listening field and start the listening.
Now you have what the output is and what event data is in the captured events.

You should not be getting an error from the events data field - it is optional. If specifying the event type is enough for you, then you can leave events data empty. What error are you getting?

And the reason there’s not much documentation on it is because it depends on the event type. There is no definitive list of values.

I am not specifying an event type. It says “leave empty for all events.”

All I’m trying to do is configure node red to work with HASS for the first time.

The error message is “Invalid properties: -eventData”

This is literally the first thing I’m trying to do in node red, following installation instructions.

event tab? Listening field?

I don’t know what those are, the instructions don’t mention them, and I’m very skeptical that this will assist me in the basic configuration I’m trying to establish. In fact, from the instructions I understand that once I’ve finished this configuration, I should delete this Events:all node.

Ahh yes. I was not entirely sure when I read your post, but now I see clearly - you are trying to get the HA websocket nodes to connect to HA for the first time. Yup, it can be confusing. Blindingly obvious once you know how…

For Node-RED websocket nodes to work, you need to set up

  • the HA websocket nodes by adding them to the pallet, if they are not already there
  • adding in the Node-RED Companion integration into Home Assistant
  • creating a new Home Assistant server by adding a HA server configuration node

The bit about ‘add a node then do this…’ is there to enable you to add the very first HA configuration node. It just so happens that the ‘Events:all’ node is the one used in the instructions.

So, if this is of any help to you:

  1. Do you have the Home Assistant websocket nodes added to the NR pallet? Please check NR>manage pallet and look for node-red-contrib-home-assistant-websocket. What version are these? Should be something between 0.57.0 and 0.59.0
  2. Do you have the Node-RED companion added to HA? Check HA settings>integrations. If you don’t have it, then it must be installed (see +integration and look for ‘node-red companion’. This should be v3.0+, we can check the version later if required
  3. Now we need to add the HA server. The HA server is a Node-RED configuration node, so you can see it in the Node-RED debug tab by selecting the ‘configuration nodes’. In the list should be a block called ‘server’ with a node called ‘home assistant’. This is the node you need to add/configure. If it is not there it has to be added, and this can only be done by editing one of the HA websocket nodes.
  4. To create (add) an HA server node - drop any of the websocket nodes into a flow. It can be the first API node - which one does not matter. Yup, we are going to throw it away after we have created the server node.
    In this websocket node (in fact in all of the websocket nodes) you will see a UI field for ‘Server’ - this is the server configuration node we need. If it already exists, then this field will be populated with the name of that node (usually ‘Home Assistant’). If not, or if you wish to add a second server, the drop down list will have 'add new server’ as an option.
  5. Select either the existing configuration node, or ‘add new server’ and then click on the pencil edit - this magically opens up the configuration node (or a new one) for you to edit.
    Remember - this is the only way to add a new one. You can double click on an existing server configuration node in the configuration node debug window (it will open to edit) but if it does not exist, then you have to add a new one by doing these steps.
  6. Edit / setup your server configuration node:
    Check the name (default is Home Assistant)
    Tick the ‘Using the Home Assistant Addon’ if you are (gets more complicated if you are not)
    I suggest you tick ‘Enable Global Context store’ - this can be useful
    Click ‘Add’ - this will save your new Home Assistant server configuration node
    You will now return to the edit box for the ‘temporary node’ - click ‘cancel’ as we don’t actually need this node. This leaves the created server configruation node, and throws away the unwanted ‘any old websocket node’ we just used to get at the ‘add a new server’ option!
    Done.
  7. Check by looking in the Node-RED configuration node debug window that you now have your new server configuration node, and you can always double click this to open the node edit box.

That should work.
Subject to - what to do if you are not using the Addon, or if something else is not set correctly.

I sincerely hope this helps (subject to me getting the above correct that is).

I appreciate the thorough response, even though I can’t get past step 2. Again. I’m using CORE, and can’t install companion via integrations, apparently. It does not show up under the integration options.

I can confirm node-red-contrib-home-assistant-websocket is installed.

I have tried the instructions at Node red with HA core? but some of the instructions require instructions themselves, to whit:

2.set Node-Red to communicate with Home Assistant Core

2.1 Connecting Home-Assistant in Node-red

2.1.1 Install node-red-contrib-home-assistant-websocket.In the node red settings

2.1.2 Install Node-RED custom integration in Home Assistant

I have Node Red installed and can access it via the website. I apparently have the HASS integration installed in Node Red, as it shows all sorts of HASS stuff. But Node Red doesn’t seem to be talking to HASS.

Also, at step 6 of YOUR instructions, I again am left with no info on what to put in Events:All and the node complains of “Invalid properties: EventData” if I try to save it.

The debug window is blank.

Seems I’ve made some small progress, but looks like I don’t have Node Red Companion Integration installed in HASS and since I’m on CORE, I have to do it manually:

Manual

  1. Using your tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called nodered.
  4. Download all the files from the custom_components/nodered/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. Refresh your browser window (bug in HA where it doesn’t update the integration list after a reboot)
  8. In the Home Assistant UI go to “Configuration” → “Integrations” click “+” and search for “Node-RED”

I think I’ve been to this part of the rodeo before, and there’s an issue with my understanding of where the custom_components directory is supposed to be.

Is it /snap/home-assistant-hacs/104/ ? Doesn’t seem to be.
maybe /snap/home-assistant-hacs? Seems to point at the same 104 directory.

I bought off the shelf and have an Odroid running Home Assistant (supervised) and it fairly much works (and very well too). Therefore I am unlikely to be of much assistance to you if you are running CORE (as in your are independently installing HA on something) as I have zero experience in this area.

However, in the genuine spirit of trying to be helpful:

You must have Home Assistant installed on something and running. Yes? You presumably can see Home Assistant on ‘device-ip’:8123?

When you get into HA you must be able to go to Settings > Devices and Services (first tab is Integrations)

There is a nice ‘add integration’ button, and you need to search for ‘Node Red Companion’

You won’t find it, as it is not installed (yet) - you have to install it first, then it will show up in this window, then you can add it, then it should all work. (you can see I can find it, and I have already added it.)

On whatever you are running Home Assistant on, you must be able to get at the configuration directory. This, on my machine, is at /config

This is what it looks like

I have added samba share to my HA and configured it so that I can go in from my PC, and just find the /config folder. This is at the top level of my device. I just go in at //ip address/config

You must have access to this folder as it contains the configuration.yaml file and this is the most important user file in the entire system! Sorry - I can’t help with finding this, but it must be at the top level of whatever you are using to run your docker / system.

Once you have got into /config, you will see ‘custom_components’. If it is not there then you will need to add this directory.

When you get into this folder, it (for you) will have nothing in it, but this is where the extra custom configurations have to go, which are then added to the integration search list, so you can add them in the integration add box

This is my /config/custom_components folder

I have added three extra custom components - node red, octopus energy, and tapo

All you have to do is go to

https://github.com/zachowj/hass-node-red

on the RHS find the ‘latest’ release,
download the zip file,
open the zip file,
look for custom_components,
find ‘nodered’ and copy that folder into your /config/custom_components folder

And so, we are back to the question
Where is your HA configuration folder?

Now, if I type into Google “where is my home assisant configuration folder”
I get

Apparently If you use Home Assistant Core, you can find configuration.yaml in the config folder passed to the hass command (default is ~/.homeassistant).

I don’t use CORE, so I personally can’t help you any further, but I sincerely hope that this helps you find your /config folder

Good luck

In MY instructions

Step 4
Drop any HA WebSocket node into the flow. It can be the first API node
(you do not need to add the Events:all node at all)

Step 6
Edit /setup the server configuration node…
… you will now return to the edit box for the ‘temporary node’ - click cancel as we don’t actually need this node

I personally went through every single step of every single comment I posted to you and double checked it.
There is no Event:All node, there is no need to put anything into this node, and as I said if you cancel then the node does not exist and will not complain.

I don’t think that I can be of further assistance to you in this matter.

Best wishes.

Thanks but Node-Red can’t be installed like that in CORE.

I’m not familiar with HA CORE as I have HAOS, however as far as I understood things, HA runs somewhere, and Node-RED runs somewhere else. Either as an HA addon (ie in its own docker container, only supervised by HA on the same machine) or in another place on the same machine, or run entirely on a different machine.

Neither HA nor Node-RED know anything about each other, whatsoever.
The only connection between them is if you set up and use the Home Assistant WebSocket Nodes.

A) Once Home Assistant is running successfully, and
B) once Node-RED is running successfully (wherever that may be) -

if you want to ‘connect’ HA with Node-RED’ using the WebSocket nodes

C) Then you load the Node-RED Companion integration into HA (nothing to do with Node-RED).

D) Then you load the Home Assistant WebSocket nodes into Node-RED (nothing to do with HA).

E) Then you connect them up, which is what I thought you were tyring to do in your original post, and you were having some problem with.

I have just taken a working Node-RED running on a new Revolution Pi (quite separate to my Home Assistant Odroid), added the HA WebSocket Nodes, and set up the HA server connection between them. Took all of 10 minutes.

Now I have a sensor in my HA that I can update from Node-RED on my RevPi, and I have a flow in Node-RED on my RevPi that gets the state value from a different sensor in my HA.

This is my Revolution Pi telling HA that it is still working, and checking on my HA to see that it is still working.

It really does not matter where Node-RED is running.