New to both HA an Node-Red and trying to migrate from another controller.
I try to create a flow that turned out to be too complicated for a new starter...or at least there is one thing that ruin my whole idea.
My idea is to have a flow that turns on and off light dependent on weekdays and take public holidays and vacation into account and also to have a guest mode.
For time conditions I use BigTimer with four schedules (that can be set with slightly different times for different rooms and outdoor laps):
Schedules (example times)
Mon-Thur (on 06:30-22:30)
Fri (on 06:30-23:30)
Sat-Sun (on 08:30-23:30)
Sun (off 22:30) (to switch off lights at same time as mon-fri)
I have configured two sensors via configuration.yaml:
Via them, I can distinguish between monday-thuresday, Friday, Saturday and Sunday and toggle my four BigTimer Schedules auto/stop to use the right BigTimer for the right days.
That also works for public holidays(!)
Then I use the toggle switch vacation to activate Sat-Sun timer and pause the other timers.
BUT - every time I toggle BigTimer auto/stop it sends its actual state as payload!!!
I only want payloads on programmed times.
Is there any way I can make BigTimer just send it's state as payload on configured time settings?
I looked at cron-plus while I started before I found out about possibility to configure workday sensor, as cron-plus could handle several exceptions.
But it was not as "graphical" to configure. I managed to do it, but it was much more difficult for future updates compared to the clear on and off fields in BigTimer.
Isn't there any other simpler time scheduling node with just on and off time and possibly weekday checkboxes? Or one in/off time node and one weekday node with like checkboxes for active days?
Node-RED looks to be very capable, to say the least, but just setting on-off looks quite complicated compared to what it is and how much it must be used. Doesn't everyone who control some simple labs need it, or do they just stick to standard not so graphical HA automations?
I also looked into the another time scheduling node, called node-red-contrib-light-scheduler but there you had to "draw" active hours and couldn't see them as time figures.
Bigtimer looks so good in almost all perspectives.
It's even easy to make a function that overrides the on time in the morning on special occasions, by just hitting a button or toggle a switch on my dashboard.
It is only the fact it always sends its state when toggled active/pause injecting auto/stop.
Keep in mind that most people on this forum do not use home assistant as Node-RED can do exactly the same things plus more.
The cronplus node can do everything you need, quite some effort has been put in to make it graphical, the flexibility comes in where you can control the whole thing via messages that arrive at the node. With most node-red nodes, it is essential to read the documentation of the node and there are many examples included as well to show how to use it (which can be loaded via the hamburger menu > import > examples).
For simple schedules the inject node can be used as well.
The problems with inject node I have run into is if I schedule it to do something at a specific time, it also does that when I deploy the flow and I have not been able to figure out how to prevent it.
I have tried to read the instructions and searched forums, but not been able to find solutions. I guarantee you I always spend quite some time on my own reading and experimenting before I ask on forums.
This gives me both the payloads I need for notification+mail (and I convert them to other payload identifiers for email with the Change node).
But the problem here is that it sends the notification on every change above the setpoint and that's pretty annoying if someone keeps the freezer open a bit too long and temperature rises in several steps and I get notificaitons for every degree.
I have a simple (home rebuilt) sensor that gives me the outdoor light level as a number between 14-90 (a temp/humidity sensor I rebulit years ago to take the humidity port for light, so it gives me light level in %RH, but that doesn't matter much. It works.
I want to:
switch on lights when light sensor goes below a setpoint (example 80)
switch off lights when light sensor goes above another setpoint (example 75)
I keep setpoints a bit appart to avoid "disco.-effect"
To do this I need a trigger node that can start my flow.
I have found both "Event: state" node and "Trigger: state" and none of them does exactly what I want.
With "Event: state" node
it sends my configured payload=on when passing from 80 to 79, but also from 79 to 78 etc
With "Trigger: state" node, it looks like I should be able to get a trigger only when light sensor passes my setpoint:
Now it looks to only turns on light when set value passes and not for every value below!
(I will add more conditions afterwards, like block light on in the middle of the night if for example neighbors car lights would hit the light sensor...or some kids joking...and it should trigger for it getting dark in the middle of the night.)
I have still not figured out how to do for the other question with fridge and freezer alarm where I want two payloads:
payload.text = text message
paylod.temp = entity state
I'm so much a beginner when it comes to code - but I would really like to learn!
However - the 3rd outlet from Trigger:state node might not be "right" to use, even though it works...
The 1st outlet sends payload. How do I write an expression that discards the payload and sends a string=on to switch the switch on?
I managed to create an object for the fridges and freezers, but I can't figure out how to create a simple string!
Just a note that I see that you are using Home Assistant. Most here don't use that as it is seen as something that just complicates things to no significant benefit. Most use node-red to do everything. The result is that will probably not get much useful help on HA related questions. Whether you will be able to get help when you need it from an HA forum I don't know.
You might like to consider whether to continue down this route, before you go too far to backtrack.
A further note about HA. When you post an image of a flow showing HA nodes then many here will switch off and don't bother reading further. So for further questions it may be better if you can post sample flows that don't use those. Use Inject nodes to simulate data coming from the HA nodes in order to demonstrate the problem.