Moved everything over to NR finally. Really worth it

What is that shown in the image you posted? It looks like a conversation with a Home Assistant chatbot. I’m interested in learning more about it.

Have a look at the chatbot node palette. It’s freaking powerful.

1 Like

Just installed it and been through the tutorial. God it feels so dirty using a GUI :slight_smile:

I have to say, I like what I’m seeing

1 Like

Correct, it’s my test chatbot that just does climate. That’s what I really wanted, to be able to control climate through slack (which I have open all day anyway). I’m now playing around with added NLP so I can tell the house to do anything.

2 Likes

I have used chatbot to create menus of options for me to check status of things directly from Telegram, but haven’t had a lot of time to dedicate to creating what I really want in my chat bot. One day I will just ask my bot the status of my house, and it will automatically ask me things to do.

It has a lot of potential, I love that I can interact with it regardless of where I am and it’s not voice. It’s pretty quick to open up the slack app and type something vs trying my luck with voice control.

Two I’m testing in addition to climate are:

Usually when we leave it will shut things down but we’ve been burned with guests. Now when we leave it waits 30 minutes. If there is motion, the tv is on or doors are open it asks us via slack if the house should be in guest mode or if we just left stuff on. I can answer and it reacts accordingly.

The second is if we’re away from the house for more than 24 hours it asks if it should enable vacation mode (auto lights, alarm, etc).

After reading all of this, I would like to give NodeRed a try. What do I need to know (in terms of programming languages) to be successful, and where do I start?

The basics will be handled for you with the home assistant websockets palette, and the nodes that ship with Node-Red, but you can install any node palette you like to add functionality. The biggest help will be using the FUNCTION node and learning some basic javascript, but typically, anything you want to accomplish has already been done in Node-Red and there is probably a set of nodes for that thing. :wink:

Thank you. I’ve got Node Red installed and connected to Home Assistant. Now I can start to play, and have some fun!

I just want to say I was using them both, Node Red is in fact a million times easier. No manual coding language can compete with me setting up a device that alexa discovers on her own and can be control absolutely anything with 3 drag and drops.

Not to mention not ever having to restart, direct connection to mqtt and response time being greatly improved.

I don’t believe that response time can be drastically improved over local HA. NR adds some latency to communicate with HA.

As for Alexa I can do the same with HA. I tell her to discover new devices and it does.

And your 3 drag and drops is a couple lines of yaml. In fact if the yaml is done right it maybe even templated and nothing needs to be done…

I would think people are not adding automation so often that saving 10 seconds adding it makes a difference. I also think any latency any system adds is marginal and makes no difference overall, all systems are basically the same as far as speed is concerned.

This thread isn’t meant to convert people, if you’re happy with what you’re using there is no reason to change but it’s nice to know what else is out there if you’re looking for other options.

My experience with both Appdaemon and Node Red is that they both provide som overhead which results in very small lag compared to native HA. I once did a speed test between YAML, Appdaemon and Node Red, and there YAML was the fasted and Appdaemon pretty close and NR significantly slower. I did the test again with the current version of NR and now YAML is still fastest, but Appdaemon and NR was pretty much the same. My experience is that NR makes restarts significantly slower, but since restarts is not needed that often I don’t consider that a big problem. Appdaemon is much quicker in that regards on my system.

I think the overall reason to move away from YAML independently of if it is to Appdaemon or Node Red is the added possibilites. Personally I think it is really annoying to have two rules to turn on and off a light. In both Appdaemon and Node Red that is in the same flow. Also I use Telegram to control my HA instance outside of home and if you look at the official documentation the Appdaemon flow is more powerful, but actually also easier - but that is of course also a personal taste. NR has a guide on the forum, which shows it is also pretty awesome.

Everyone has a different experience and setup which makes it all but impossible to compare. If you’re running HASS.io and everything is running on the same machine (worse if it’s a pi) then it’s going to be slower because you’re added a whole new process (nodejs) which is going to command resources. On the other hand if you run them on separate machines (docker instances even) on metal you’re going to get much better results. There is zero lag in my instances but even when I can just hass on pi I always had lag. Another big factor is when you tried NR as there have been big improvements in the homeassistant library and it’s now using webhooks which is what appdaemon uses.

From an architecture standpoint both automatons and webhooks are HASS components so they both get the service calls the same way. Webhooks has the overhead of the network which on a lan is negligible. Then you can compare the languages and nodejs is much faster than python because of the v8 engine. I don’t think you can compare them though, if you’re experience lag then you’re overloading the system and you should break out into different hardware. I doubt any accurate benchmark would prove one noticeable faster than the other especially when we’re all dealing with really slow hardware anyway.

Flows in Node-RED are indeed a lot easier to build, maintain and extend than the ones in Home Assistant. What’s really good with Node-RED is that once you hit some limitation, it’s super easy to just use the “function” node and add some javascript logic in there (extract something, call multiples APIs, read/write files on disk).

Nevertheless, I think Home Assistant is great at combining multiple services together.

I see some performance comments here in the thread and I would suggest doing some benchmarks for workloads. It’s hard to believe that there’s anything measurable here, both Python and JavaScript will perform almost at the same speed for any ‘home automation’ related tasks :slight_smile:

I’m so glad I read the Home Assistant Community summary!

I’m no unix wiz, but it wasn’t too hard to get Node-RED installed on the Pi that runs HA, and setup with all of the https duckdns security that I have for HA. I have a standard HA Debian installation (no Hass.io). I needed to open up another port in my Pi firewall and router so that I can talk to Node-RED directly via duckdns. Node-RED doesn’t need an internet connection to talk to HA because I added a line to my /etc/hosts file routing duckdns to my local ip address.

I put in some time no doubt, but two days after finding out that Node-RED existed, I’ve removed the last of my automations from HA. They are all tested and working perfectly in Node-RED. Node-RED is amazing compared to what I had before! It’s going to be some much easier to add more complex automations, and maintain the existing ones.

The only downside I can see so far is that I have to maintain two git repositories now (HA and Node-RED). But that’s pretty painless.

Thank you ryanrdetzel.

1 Like

It’s probqbly late to ask, now that i have everything working with the websockets version “node-red-contrib-home-assistant-websocket 0.6.1” . What is the difference between the websockets version and “node-red-contrib-home-assistant 0.3.2”. The non-websockets version has more downloads.

the non-websockets version is old and not maintained any more. It doesn’t work with anything beyond HA 0.77 I believe.

Thank you. It would be great if someone could update the webocket version to tell people that fact. The old version is getting lots of downloads.

You learn really quickly after you install it when it doesn’t work at all.