Chris, The thing with the weekdays in the time automation, no, you don't need to specify all of the days of the week. If unspecified, it defaults to everyday. I only use that if I want an automation on certain days.
When I was getting started on Home Assistant, I wrote a number of automations in Node-RED because, at the time, it was easier than native automations. After the automations were working well, I would move them over to native automations. It worked well for me at the time, but now I write all my automations natively.
I'm going to piggy-back off your comment because, just like you, I was the exact same in regards to starting with NR automations over HA many years ago. About a year ago, I moved almost all of my automations from NR to HA. I still have them but they're disabled. I do have one automation still active in NR that I can't seem to get to work in HA. It's mainly because the syntax doesn't work quite the same since I was able to use some RegEx voodoo to get it to work in NR. Basically, whenever a light being turned on is triggered, the flow sets the appropriate color temperature and brightness to 100% for that light (just in case it was set differently when it was turned off.) When I was trying to replicate it in HA, there was two methods that should work (I forget the specifics), but one options would have a feature that the other would have and vice versa, but I needed both features. It dealt with templating the entities vs. the RegEx in NR. (Yes, I could hard-code everything and get the same result in HA but the goal of the automation was to not have to hard-code. It has been running for years in NR without any issues.)
I would love to see HA to create a flow chart view for automations like NR. Sometimes it's easier to visualize an automation than read through the steps.
Follow the traces. It took me building out some of the automations to really understand how to use the traces but they are very helpful in visualizing the steps.
I find it useful to rename the steps in automations rather than using the default generated one. Usually it will be like adding comments explaining to future me why I did it that way. I started with HA about the time the automation UI came out and back then it was very slow and clunky. I went to just editing separate files in yaml, but now any new automations are done with the UI. If I'm updating any older automations I will usually migrate them and disable the old yaml version
I agree. Automations need to be bulletproof and reliable. I treat HA like an organiser to bring views/dashboards together. I find the supervisor not so stable with many HACS integrations and ‘test in production’ approach means you’re at risk each upgrade. So if you don’t want your sprinkler to forget to turn off after 4 minutes, you need something that’s reliably going to take care of business.
It took me a long time to move to HA automation. I think both have their place and there is no "right" solution for everyone. This was a proof of concept and it has been good so far.
Some things I find useful are: You can rename those nodes in the automation to be more clear, i.e. instead of "run 3 actions in parallel" it can be like "parallel: Turn on hall light, wait 2 mins, turn off hall light" I've also moved quite a few things like this into scripts, so that I can re-use those a bit easier (i.e. script: Temp light on/off), so you can just pick the light(s) and delay before off.
Frenck messaged me and reminded me I could rename the sections of the automation. Already did that for a few so it is now easier to see what is inside those steps without opening each one up.
Did you 'deploy' the changes you made? Only then the timestamp buttons activate. I rely on node-red a lot, because of the complexity of the automations. It helps me to keep an overview. However Home Assistant is getting a lot better and some automations like mobile notifications are easier to make. Thanks for the video.
Yep. I deployed it all. Some of those NR flows hadn't been touched in years so it wasn't something I changed. As mentioned in the video, it wasn't a show stopper but i prompted me to try out native automation.
Moving most of my automations from NR to HA allowed me to start using timer entities and input booleans more easily which allowed me to change timer "settings" within my tablet-based dashboard.
@mostlychris... Done.. Took my time over the week and finally turned off Node-Red last night. Really great exercise because you take the time to look at your automations differently. How and Why I write them in a certain way in NR. Looking for optimizations removing redundant functions. Honesty think removing the NR layer also removed some of the latency in automations as well. Enjoy the videos! Thanks.
@@shaybyrne-ca Congrats! It was a big help looking at some long running automations I had in NR and refactoring them as I moved them so in addition to resource savings, you get some additional optimization.
it would be interesting to see an automation execution time comparison between Node Red and integrated. Any additional latency from using a 3rd party solution?
Thanks for this. There was recently an update in Node-Red that made me have to go add a bunch of JSON code to things where I was able to just select. Been thinking about this also because Node Red can sometimes be annoying.
3:24 - you need to deploy first, then it works 🤦♂🤦♂😊😊 I'm just doing the exact opposite. Moving everything to Note-RED. Good luck with troubleshooting within HA, it's impossible to do in timely manner.
Problem started without changing anything. I've had a few comments about deploying but I think whatever it is that happened at that point was unrelated the problem and just some recorded footage editing that put things out of order or removed some steps that would have made it more clear.
I agree that the automation features on HA has changed a lot over the years with a lot less reliance in knowing how to code in YAML, however I still feel its inferior to Node Red in terms of scalability and usability. With Node Red, its also a lot easier to troubleshoot automation flows, because its just a matter of visually following the path the automation, whereas with HA automation, you have to read through the lines of triggers, conditions, and actions which can get pretty exhausting ad confusing if the you're running a complicated automation. I also found that the ability to use JSON quite useful when you need to customize your flows to use functions that are not provided out of the box by the Nodes. Lastly, I think you are using the Inject node incorrectly. I am pretty sure you have to connect the inject node to the part of the flow you want to run manually if you want to use it as a trigger. Having it free floating like you had it in your video never worked for me. The another thing I found to be very useful in that I can use the Inject node to test just a part of my automation without having to run the entire automation.
I often use scripts instead of putting everything in actions in Home Assistant automations. It seems, for me, to make it easier to maintain, and like you, if you call a similar set of entitites in multiple automations, a script makes it easier to keep that block on entities and actions in one place. I think this is personal preference and one of the joys of Home Assistant. Many different ways to do similar things and none are right or wrong.
Very true. In NR, I finally created an alarm panel flow with a bunch of subflows for each of the alarm states. I did that all in one automation in HA. Those subflows would be the equivalent of using scripts to prevent duplication of work.
Great video Chris. The UI has come a long way in just the past year alone. Although I've never used node red, it was interesting following along, as I knew exactly how to accomplish the NR flows, using the UI. Someone else had mention it but I think it would make for a great video. Try to take some of your node red automations and feed them into Chat GPT or Claude Ai and ask them to convert to yaml. I've actually used both to consolidate and improve a few automations and they did a phenomenal job. I actually preferred Claude AI as the explanations were easier to follow.
In the NR representation , both the "open" and "close" port of your switch node, connect to several action nodes - Disarm Alarmo - Kitchen pendant on - Set Zooz light to red In the NR view, these things look like they happen in parallel (start at the same time, are triggered from the same event) in the HA view, it seems these things are in serial (happen sequential ?)
Good point. I need to look at that again. One difference in HA is that I can call all the entities from the same step rather than connecting them together as I did in NR.
@@mostlychris Thanks Chris. Not sure what you mean by "call all the entities from the same step, rather than connecting them together" Logically speaking both NR and HA have the ability to start actions from eachother or from a common trigger. (Series vs parallel) The difference is in how the user gets them into the system(programs them), and how the system represents them back to the user. In reality, I don't think NR nor HA actually do things in parallel. But in NR, when I see two actions spring from the same prior node, it is clear both two actions have no dependency on eachother. Thanks anyway. I will look out for possible updates. Would be very interested to see how convient it is to move a function node over to HA. I have some dificulty using flow variables, because they are hard to find back in case of trouble shooting. Not sure if HA handles that any better (helpers??)
@@oscargraveland I was referring to parallel vs series. I am not sure I followed my original NR parallel paths using HA so I'll need to go back and make sure. The move from NR to HA allowed me to clean some things up so that means I took away some perceived parallel actions and replaced them with series actions. One thing I suppose I should understand better is if the actions in HA actually occur in series and if one action fails, it stops the automation. If so, I need to definitely add some additional parallel paths to some of my automations.
@@mostlychris OK, got it. Yeah, that bit me in the hand a few times in NR. Once you have one node triggered by anoter node, just because you want one to happen before the other, you have the risk of the second one not happening if the first one fails. In several automations I had to put them in series (triggered by the same previous node) but put a delay node in between the one I want to happen later. (and then sometimes the ability to check wheter the other node has had some effect) I have no idea how convenient that would be to do in HA directly. Thanks for the good work always.
I started with node red initially, but as home assistant got easier, then my pi melted and my backup didn't work, I started over again using the native automations, there are some great blueprints and can be done a lot easier on a mobile device too
I fooled with Node-Red but never really got into it. This was interesting for me. chatGPT claims it'll translate between NR JSON and HA YAML. It'd be interesting to hear how successful it would be at converting this NR sequence. I doubt it would work perfectly but I'd be interested in learning whether it was more effort to fix it than to have converted it by hand.
Nope. It was a bug in the UI. From all I read about the issue, it doesn't affect the flows, it only affects inject and debug nodes being useable via the HA UI. If you go direct to the port, you can do everything just fine.
I don't understand why the HA crew don't make something like the "Homey Advanced Flow". It's kind of node red light, just so much easier to use and make the homey automations so good and easy to use. Automations is actually one of the things I hate most when I switched from Homey to Home Assistant
Its very difficult to track which section of the UI you are editing. Would be nice if the section and buttons could change colour to show the bit you are working on at the time.
@@mostlychrisit's pretty amazing how well it works. I've found Chat GPT and Claude to be the most accurate. Google Gemini is horrible. It seems to waste more time telling you what it can't do rather than provide solid solutions. Chat GPT and Claude have both helped me in learning some alternative options to structure some of my automations. They will explain how they arrived at the suggestions, which I find to be helpful. I've even fed it an Excel spreadsheet with energy usage data from Emporia. It analyzed & summarized it amazingly well. It used the data to provide a ready to use automation for dishwasher cycle notifications that worked perfectly!
@@mostlychris Indeed! don't get me wrong I love HA but I'm kinda tired of those "breaking changes" :/ I'll still use it for dashboard though. Great Content!
I have tried HA about 20 times, I truly don't understand that people like to work with it, it is a horrible interface, click right top, click left bottom, click right bottom, click here click there, go here go there. I have everything running in node-red. Note; i am primarly interested in true home-automation and not some dashboards where i need to control things manually. People fail to understand that you can do everything in node-red. All devices you can control with home assistant you can control with node-red - without running/using home assistant. But I have to say that even though that automation interface is also horrible, the trace view is really nice. That is also the strength of home assistant: state management with its history.
Thank you. Nice video. I could reproduce the Timestamp issue but once you link it to another node and deploy, it becomes active and works as expected.
Interesting. Thanks for the tip.
Chris,
The thing with the weekdays in the time automation, no, you don't need to specify all of the days of the week. If unspecified, it defaults to everyday. I only use that if I want an automation on certain days.
After recording and then editing, I figured that out. Thanks for letting everyone else know.
"I’m more of a visual type, so I find it easier to keep track in node red. The textual approach pushes me to my limits."
I was that way as well..maybe still am but it wasn't that bad using the HA automation UI.
I started to switch back from NR few years ago when HA automation UI became available. The final nail in the NR coffin was introduction of IDs in HA.
When I was getting started on Home Assistant, I wrote a number of automations in Node-RED because, at the time, it was easier than native automations. After the automations were working well, I would move them over to native automations. It worked well for me at the time, but now I write all my automations natively.
Same thing I did. Started with NR because it was so much easier.
I'm going to piggy-back off your comment because, just like you, I was the exact same in regards to starting with NR automations over HA many years ago. About a year ago, I moved almost all of my automations from NR to HA. I still have them but they're disabled.
I do have one automation still active in NR that I can't seem to get to work in HA. It's mainly because the syntax doesn't work quite the same since I was able to use some RegEx voodoo to get it to work in NR. Basically, whenever a light being turned on is triggered, the flow sets the appropriate color temperature and brightness to 100% for that light (just in case it was set differently when it was turned off.) When I was trying to replicate it in HA, there was two methods that should work (I forget the specifics), but one options would have a feature that the other would have and vice versa, but I needed both features. It dealt with templating the entities vs. the RegEx in NR. (Yes, I could hard-code everything and get the same result in HA but the goal of the automation was to not have to hard-code. It has been running for years in NR without any issues.)
I would love to see HA to create a flow chart view for automations like NR. Sometimes it's easier to visualize an automation than read through the steps.
Traces does that no?
Yes! You saved me typing. 😄
Follow the traces. It took me building out some of the automations to really understand how to use the traces but they are very helpful in visualizing the steps.
You are the king! Thanks for everything. As a new bee I wish you had a class on home assistant.
Lots to learn
Thanks. Welcome to the rabbit hole!
I find it useful to rename the steps in automations rather than using the default generated one. Usually it will be like adding comments explaining to future me why I did it that way.
I started with HA about the time the automation UI came out and back then it was very slow and clunky. I went to just editing separate files in yaml, but now any new automations are done with the UI. If I'm updating any older automations I will usually migrate them and disable the old yaml version
Nope. HA's approach to automation is abhorrent, will never use it for anything more complex than a keep-alive trigger. Ugh. NR is still king!
Very true!
I agree. Automations need to be bulletproof and reliable. I treat HA like an organiser to bring views/dashboards together. I find the supervisor not so stable with many HACS integrations and ‘test in production’ approach means you’re at risk each upgrade. So if you don’t want your sprinkler to forget to turn off after 4 minutes, you need something that’s reliably going to take care of business.
It took me a long time to move to HA automation. I think both have their place and there is no "right" solution for everyone. This was a proof of concept and it has been good so far.
Some things I find useful are:
You can rename those nodes in the automation to be more clear, i.e. instead of "run 3 actions in parallel" it can be like
"parallel: Turn on hall light, wait 2 mins, turn off hall light"
I've also moved quite a few things like this into scripts, so that I can re-use those a bit easier (i.e. script: Temp light on/off), so you can just pick the light(s) and delay before off.
Frenck messaged me and reminded me I could rename the sections of the automation. Already did that for a few so it is now easier to see what is inside those steps without opening each one up.
Did you 'deploy' the changes you made? Only then the timestamp buttons activate. I rely on node-red a lot, because of the complexity of the automations. It helps me to keep an overview. However Home Assistant is getting a lot better and some automations like mobile notifications are easier to make. Thanks for the video.
I had to jump over to my instance to confirm this "issue" was not real.
Yep. I deployed it all. Some of those NR flows hadn't been touched in years so it wasn't something I changed. As mentioned in the video, it wasn't a show stopper but i prompted me to try out native automation.
Moving most of my automations from NR to HA allowed me to start using timer entities and input booleans more easily which allowed me to change timer "settings" within my tablet-based dashboard.
Excellent!
Very timely I've been noodling on this for a few weeks now this might just push me to finally do the move!
Go for it.
@mostlychris... Done.. Took my time over the week and finally turned off Node-Red last night.
Really great exercise because you take the time to look at your automations differently. How and Why I write them in a certain way in NR. Looking for optimizations removing redundant functions.
Honesty think removing the NR layer also removed some of the latency in automations as well.
Enjoy the videos! Thanks.
@@shaybyrne-ca Congrats! It was a big help looking at some long running automations I had in NR and refactoring them as I moved them so in addition to resource savings, you get some additional optimization.
I made the switch from Node-Red to HA automations last year and couldn't be happier.
it would be interesting to see an automation execution time comparison between Node Red and integrated. Any additional latency from using a 3rd party solution?
All the times I’ve testing (and everything I’ve read) there’s do difference.
I really haven't noticed any difference. It probably does use slightly fewer resources on the server/device because the NR add-on isn't running.
Thanks for this. There was recently an update in Node-Red that made me have to go add a bunch of JSON code to things where I was able to just select. Been thinking about this also because Node Red can sometimes be annoying.
3:24 - you need to deploy first, then it works 🤦♂🤦♂😊😊
I'm just doing the exact opposite. Moving everything to Note-RED. Good luck with troubleshooting within HA, it's impossible to do in timely manner.
Problem started without changing anything. I've had a few comments about deploying but I think whatever it is that happened at that point was unrelated the problem and just some recorded footage editing that put things out of order or removed some steps that would have made it more clear.
I agree that the automation features on HA has changed a lot over the years with a lot less reliance in knowing how to code in YAML, however I still feel its inferior to Node Red in terms of scalability and usability. With Node Red, its also a lot easier to troubleshoot automation flows, because its just a matter of visually following the path the automation, whereas with HA automation, you have to read through the lines of triggers, conditions, and actions which can get pretty exhausting ad confusing if the you're running a complicated automation. I also found that the ability to use JSON quite useful when you need to customize your flows to use functions that are not provided out of the box by the Nodes. Lastly, I think you are using the Inject node incorrectly. I am pretty sure you have to connect the inject node to the part of the flow you want to run manually if you want to use it as a trigger. Having it free floating like you had it in your video never worked for me. The another thing I found to be very useful in that I can use the Inject node to test just a part of my automation without having to run the entire automation.
I often use scripts instead of putting everything in actions in Home Assistant automations. It seems, for me, to make it easier to maintain, and like you, if you call a similar set of entitites in multiple automations, a script makes it easier to keep that block on entities and actions in one place. I think this is personal preference and one of the joys of Home Assistant. Many different ways to do similar things and none are right or wrong.
Very true. In NR, I finally created an alarm panel flow with a bunch of subflows for each of the alarm states. I did that all in one automation in HA. Those subflows would be the equivalent of using scripts to prevent duplication of work.
Great video Chris. The UI has come a long way in just the past year alone. Although I've never used node red, it was interesting following along, as I knew exactly how to accomplish the NR flows, using the UI. Someone else had mention it but I think it would make for a great video. Try to take some of your node red automations and feed them into Chat GPT or Claude Ai and ask them to convert to yaml. I've actually used both to consolidate and improve a few automations and they did a phenomenal job. I actually preferred Claude AI as the explanations were easier to follow.
You're the third or fourth to mention this. I'm gonna try it!
In the NR representation , both the "open" and "close" port of your switch node, connect to several action nodes
- Disarm Alarmo
- Kitchen pendant on
- Set Zooz light to red
In the NR view, these things look like they happen in parallel (start at the same time, are triggered from the same event)
in the HA view, it seems these things are in serial (happen sequential ?)
Good point. I need to look at that again. One difference in HA is that I can call all the entities from the same step rather than connecting them together as I did in NR.
@@mostlychris
Thanks Chris.
Not sure what you mean by "call all the entities from the same step, rather than connecting them together"
Logically speaking both NR and HA have the ability to start actions from eachother or from a common trigger.
(Series vs parallel)
The difference is in how the user gets them into the system(programs them), and how the system represents them back to the user.
In reality, I don't think NR nor HA actually do things in parallel.
But in NR, when I see two actions spring from the same prior node, it is clear both two actions have no dependency on eachother.
Thanks anyway. I will look out for possible updates.
Would be very interested to see how convient it is to move a function node over to HA.
I have some dificulty using flow variables, because they are hard to find back in case of trouble shooting. Not sure if HA handles that any better (helpers??)
@@oscargraveland I was referring to parallel vs series. I am not sure I followed my original NR parallel paths using HA so I'll need to go back and make sure. The move from NR to HA allowed me to clean some things up so that means I took away some perceived parallel actions and replaced them with series actions. One thing I suppose I should understand better is if the actions in HA actually occur in series and if one action fails, it stops the automation. If so, I need to definitely add some additional parallel paths to some of my automations.
@@mostlychris OK, got it.
Yeah, that bit me in the hand a few times in NR. Once you have one node triggered by anoter node, just because you want one to happen before the other, you have the risk of the second one not happening if the first one fails.
In several automations I had to put them in series (triggered by the same previous node) but put a delay node in between the one I want to happen later. (and then sometimes the ability to check wheter the other node has had some effect)
I have no idea how convenient that would be to do in HA directly.
Thanks for the good work always.
I started with node red initially, but as home assistant got easier, then my pi melted and my backup didn't work, I started over again using the native automations, there are some great blueprints and can be done a lot easier on a mobile device too
Good point about blueprints. Some of my most complicated automations are Frigae camera alerts that I built from a blueprint. Those were never in NR.
I fooled with Node-Red but never really got into it. This was interesting for me. chatGPT claims it'll translate between NR JSON and HA YAML. It'd be interesting to hear how successful it would be at converting this NR sequence. I doubt it would work perfectly but I'd be interested in learning whether it was more effort to fix it than to have converted it by hand.
Someone else mentioned this. Now I want to try it.
The main reason I prefer Home Assistant automations is that I can easily tweak/fix them on my phone.
This is the biggest and only regret I have using NR exclusively. I have to just make a note to fix things the next time I’m at my desktop.
100 percent yes.
Thanks for this great video. What is the node that you use labeled 0800-2100. It looks like a switch node but it isn't a switch node. Thanks
time range node.
Time Range node.
I do not have that timestamp problem but I have not upgraded node-red to 18.1.1 yet. Was your problem that you did not deploy it?
Nope. It was a bug in the UI. From all I read about the issue, it doesn't affect the flows, it only affects inject and debug nodes being useable via the HA UI. If you go direct to the port, you can do everything just fine.
Are there automations that can only be accomplished with one and not the other?
I don't think so. There may be better use cases for one over the other though.
I don't understand why the HA crew don't make something like the "Homey Advanced Flow". It's kind of node red light, just so much easier to use and make the homey automations so good and easy to use. Automations is actually one of the things I hate most when I switched from Homey to Home Assistant
I've heard rumors that work is being done to improve automations even more, including stuff like you mention.
Its very difficult to track which section of the UI you are editing. Would be nice if the section and buttons could change colour to show the bit you are working on at the time.
Have you tried taking your node-red json and asking chatgpt to create an automation yaml for you?
I was wondering the same thing.
Nope. That is quite the interesting question. I might just try that.
@@mostlychrisHaven't had time myself to try it yet, but if you do looking forward to the video 😊
@@mostlychrisit's pretty amazing how well it works. I've found Chat GPT and Claude to be the most accurate. Google Gemini is horrible. It seems to waste more time telling you what it can't do rather than provide solid solutions. Chat GPT and Claude have both helped me in learning some alternative options to structure some of my automations. They will explain how they arrived at the suggestions, which I find to be helpful. I've even fed it an Excel spreadsheet with energy usage data from Emporia. It analyzed & summarized it amazingly well. It used the data to provide a ready to use automation for dishwasher cycle notifications that worked perfectly!
I like to have node-red running when I upgrade HA
And I'm doing the exact opposite lol :P
Good luck! NR is still awesome and personal preference is what matters.
@@mostlychris Indeed! don't get me wrong I love HA but I'm kinda tired of those "breaking changes" :/ I'll still use it for dashboard though. Great Content!
I have tried HA about 20 times, I truly don't understand that people like to work with it, it is a horrible interface, click right top, click left bottom, click right bottom, click here click there, go here go there. I have everything running in node-red. Note; i am primarly interested in true home-automation and not some dashboards where i need to control things manually. People fail to understand that you can do everything in node-red. All devices you can control with home assistant you can control with node-red - without running/using home assistant. But I have to say that even though that automation interface is also horrible, the trace view is really nice. That is also the strength of home assistant: state management with its history.