Hello
I have a home assistant here, ESPhome, Node-Red, mqtt installation.
I’m a complete beginner and just learning how to use it.
My first Node-Red steps where I can switch LEDs via mqtt on the ESPhome device works.
I have 3 different LEDs there, all of which can be dimmed via PWM.
I would now like to switch all 3 of them on/off automatically and dim each one later.
I wanted to use a scheduler like the light-scheduler or BigTimer for time-controlled ON/OFF switching.
but I only find 1 topic in it… I can only switch 1 LED with a scheduler.
What else do I need? or what is best suited for this?
a function node?
Example: Node Red
3x different switches (on, off, auto) ====> Scheduler ===> Dispatcher or function send 3 different topics to the ESP ===> mqtt-out
With NodeRed it is easy to have multiple output by just dragging more flow lines.
This will send a msg to each of the nodes that will then run as separate flows.
The important thing to remember then is that merging flows is a lot harder, because the flows is separate, so even if two or more flow lines go into the same input of a node, then it will be treated as separate flows one after each other.
There is a merge node to merge then again, but there are so many pitfalls that you need to avoid, so be careful with that node.
Take a look at the function node. In this you can write a javascript function to generate as many mqtt messages as you like. They can all exit via the same flow path or you can have multiple outputs. You can have a different topic for each or all the same.
sorry maybe i describe it wrong.
I need exactly this ==> cron-plus
because i need different topics…
and sometimes i have for all different the same on/off time, but sometimes i need different on/off times für any topic.
In cron-plus is that perfect… i test it now and works exactly what i looking for
BUT… a Card like from Lovelace or any oother … i think is not possible to get this
or?
Because if i have to change any time or any date then i have to use Node-red… but later i would like change the on/off Time on my dashboard in HA
Yes, like a function
is this possible in a function
if come ID7 then use the payload from this ID7 and send all to the ID7_Topic
now i install in Node-Red already cron-plus and test it… that is exactly what i need
i can use any sek, min, hour, day, month, year and add this to any topic
i can add the xx different topics with xx diferent ON/Off times , with different payloads
The reason is.
I would like to have a system later in which I
can say
Turn on lamp 1, at 70% brightness on June 01, 2023 at 12:00 p.m. and off at 2:00 a.m. Repeat until September 3rd.
Exactly that, for example, but then for 10 different lamps. So far I’ve only seen cron-plus which can do this 80% of the time. That’s very good.
but I can’t find a card for this, e.g. from Lovelace, like a scheduler where I can later change the times or something else comfortably on the dashboard. I always have to go to Node-red for this
if come ID7 then use the payload from this ID7 and send all to the ID7_Topic
Yes. For example, here is a function which sends 3 mqtt messages, each to a separate output connector. There are three different topics and payloads, and all are specified within the node.
It also logs a message to the HA Node-RED log so I can trace the event.