Exporting nodered to home assistant yaml

#1

Hi. new to nodered so be patient please. I have it installed and running on a Rpi with Hasio. When I drag the nodes into the working area and deploy, how do I get the code into Hasio with the correct formatting, spaces etc.

Thanks

0 Likes

#2

Hi David,

could you explain a little more what you would like to do. I sI presume you refer to: www.home-assistant io?

There are 3 nodes (e.g. https://flows.nodered.org/node/node-red-contrib-home-assistant ) and a sample flow here: https://flows.nodered.org/flow/d3439d33e85b76b5832ac2a0212ef567

You could give it a try by installing the node and copy & paste the flow.

From what I saw in the description: the NodeRED integration isn’t about designing (design as in: floorplan) your home-assist, but to send and receive commands to automate things. Like an incoming message in NodeRED triggers a switch on/off of a light (e.g. Your router signals your departure from home to NodeRED and you switch off all lights).

Makes sense?

0 Likes

#3

Another option if you want to add one more level of abstraction and increase your flexibility is to use a MQTT broker as a communication bus off Node-Red then you can use it to communicate with HomeAssistant and other points of integration. This is assuming you are wanting to use Node-Red as your rules engine for HomeAssistant.

0 Likes

#4

I am taking baby steps with Nodred and have got it installed on the Pi with Home Assistant Hasio with the pallet and the node for HA. I think I have the idea of how to get the info out to the config Yamil file by just selecting all the nodes and exporting it to the clip/b, is that correct?
after doing that the formatting (indenting) seems wrong. Any ideas or am I on the compleatly wrong track here and Nodered replaces the Yamil file. I have a MQTT broker installed.
Thanks guys.

0 Likes

#5

Unless I’m mistaken the Node-RED flow/code cannot be imported into Home Assistant.

What you can do is share data between HA and Node-RED.

Perhaps you could give us a slightly more in depth explanation of what you are trying to achieve.

0 Likes

#6

I am trying to achieve the automating of most of my home devices, lights on at sunset audio control and the like. I have done this to some degree with the Yamil files but would like a more graphic approach to rather than text based. So how do I set Nodred up to talk to H/A.

0 Likes

#7

I’d start by looking at the nodes that @Stwissel suggested or looking into the approach that @rgerrans mentioned.

0 Likes

#8

@david_c This might help. This is a tutorial I put together when I used to be on OpenHab for how to use Node-Red as a replacement rules engine for OH (similar to what it sounds like you are trying to do for HomeAssistant) that I just reposted to these Forums.

0 Likes

#9

Thanks I will give it a go and post my results, be they good or bad.

1 Like