Nodered with Bigtimer help needed

So to start I am new to home assistant and to node red…so thanks for being patient.
I have outside lights controlled by a zwave light switch and outside decorations controlled by a sonoff basic that I want to integrate into a nodered flow to turn the lights and decorations on 30 minutes before sunset and then off at 10:00pm. The nodered flow that is attached works as described. However if someone turns the zwave light switch on manually then 1 minute later when bigtimer runs/updates the lights turn off. I understand why it is doing this…just can’t wrap my brain around how to modify the flow to keep the lights on (at least for a period of time) if someone manually turns on the zwave outside light switch.

Thanks for any assistance you may provide.

I wouldn’t use BigTimer for this.

I find Schedex much simpler for this. I do something similar. It doesn’t require any input on it.

image

@flamingm0e Thanks! Implemented schedex and it looks like it is working great!

Out of curiosity…since this is new to me are you willing to share your code in the function block?

Thanks,

Dan

I had the same situation with my automation and found a simple solution.

  1. All my lights get switched off based on a timer (https://flows.nodered.org/node/node-red-contrib-mytimeout) .
  2. I detect if the light was switched on by an event-change node, restarting the timer

With this approach you still can switch-off the light manually before the timer is doing it but trust me, soon your family will never switch off the light manually again :wink:

Honestly, this function node doesn’t need to exist. I could use a switch and change node, but I like writing my own from time to time.

var state = msg.payload
if(state == 'on'){
    msg.payload = {
        service: 'turn_on'
    }
} else if(state == 'off'){
    msg.payload = {
        service: 'turn_off'
    }
}
return msg;

I use this node to set a timer.

I have an MQTT switch labeled ‘Notifications’. When I want to mute all notifications from Home Assistant (happens a lot when I am out doing yard work), I turn on the switch, which sets off the timer for an hour, and the output from the second line on the node is fed to a function to convert seconds to minutes, and that feeds an MQTT sensor on my HA panel, to display how much time is left before notifications come back on.

image

I use BigTimer in a few places, and I am confused by your statement, above. (Or is that the crux of your question?) BigTimer doesn’t care what is going on with the light. It sends an on message when it starts and an off message when it times out. Post your flow so that we can see your parameters.

Have you unchecked “Repeat output” at the bottom of the Big Timer node properties? It’s on by default and repeats the message every minute instead of just when the output changes.

4 Likes

@stevemann that is the crux of my question…I think Skeletorjus below has the solution. Repeat output was checked. So the issue was when bigtimer was off and my wife manually turned the outside light switch on…since it was in the off time period a minute later it would send off. It looks like unchecking that is my solution…however in the meantime I switched to the Schedex node referenced above and all is working well.

Skeleorjus…you are correct I see the “Repeat Output” and it was checked…so I believe that was the issue.

Thanks to everyone!
Dan

Can anyone assist with setting a bi-weekly Thursday trigger

Try light scheduler node

Oh wow thanks this node looks great! :smiling_face_with_three_hearts:

Check out @TheHookUp videos on yt - shows example config. Made me switch from big timer (that seemed to switch on at wrong time for me)

Any way you can share this flow?

Did you ever figure out the bi-weekly timer?

I didn’t I went with a Google calendar in ha triggering speak Action much easier

I just got the 3.10 OS update and a HUGE sigh of relief, as Node-Red and my automations became functional once again. bigtimer was doing this UTC thing where I am -5 hours (Eastern).
I could not figure out what went wrong. Clearly something was missing.

So far, seems everything is running on 0.105.2 HA and HassOS 3.10