3 ms·
I use Node-RED to do home automation with Home Assistant, and I like it. As others have mentioned, it's easier to do than YAML automations - especially because
by peterhajas 5y ago
I use Node-RED to do home automation with Home Assistant, and I like it. As others have mentioned, it's easier to do than YAML automations - especially because you can throw in a JS "function node" when you need to just write a few lines.
Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop. Fingers crossed this can make its way into NR proper in a future release.
- sleavey 5y agoHow are you integrating Node-RED into Home Assistant? How does Home Assistant talk to Node-RED? I recently set up Home Assistant (love it) and an MQTT broker for some sensors and I can think of many ways in which Node-RED could also be involved but don't know which is considered canonical.
- danielsju6 5y agonode-red-contrib-home-assistant-websocket is considered the canonical, it's the one built into the community Node-Red plugin. https://github.com/hassio-addons/addon-node-red https://github.com/hassio-addons/addon-node-red
- vetinari 5y agoAnd if you are not using supervisor, for the other side of the pipe, companion component hass-node-red - https://github.com/zachowj/hass-node-red https://github.com/zachowj/hass-node-red.
- ryanianian 5y agoNot GP, but I just expose node-red flows via http and hit those from hass. There's probably a more elegant way, but having them communicate via http also lets me hit the flows via flic buttons or Apple Shortcuts without having to go through hass (which I never let see the public internet).
- Tomte 5y agoIf you're using the hassOS version of homeassistant, you can activate plugins, and one of those is Node-RED with the necessary integrations.
- sleavey 5y agoUsing Haas Core unfortunately.
- gregmac 5y ago> Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop. Out of curiosity, what do you need a for loop for? I've so far only created a single loop: it randomly changes the colors of a couple lights in my office. This uses a delay component and a switch (controllable from Home Assistant) called "office_lights_cycle". The switch both initially triggers and breaks the loop. When executed, it picks a random color for one light, sets the other to a complementary hue 90° away, sets them with a transition time of 300s (very slow fade), and the loop triggers again a few minutes later. https://i.imgur.com/XM53DO4.png https://i.imgur.com/XM53DO4.png
- ViViDboarder 5y agoInstead of looping through things I split items, process in parallel, and then join.
- peterhajas 5y agoI’m curious - how do you split items up and process them in parallel?
- traverseda 5y agoA map call? Not actually parallel, but I presume that's what they meant.