Define Night

In “My Modes” is there some way to define when “Night” begins and ends?

Not in the current UI. You need to do this through scenes/lua code

What about the Day/Night plugin? I have that and reference it in my LUA…

Or Reactor time conditions… sunrise/sunset, civil, nautical and astronomical dusk/dawn, all with offsets.

Yes and plugins. In my mind, somehow,lua code and plugins are the same but they really aren’t.

It’s just Lua code someone else wrote for you. Buy cake or make cake… still cake. :slight_smile:

1 Like

I know! It’s exactly why it got out of my mind. :laughing:

Is it possible to automate the shift from “Day” to “Night” and back?

If you’re referring to the luup.is_night() function, then it’s defined as

true if it’s past sunset and before sunrise, false otherwise.

Barring changing the earth’s orbit, then, no, you can’t alter it.

Perhaps you mean something different by: automate the shift from “Day” to “Night” ?

I sense that we’re missing something here, specifically quite what you want to do with this. If the current functionality is not what you need, there’s bound to be at least one other way to achieve what you need to do.

Perhaps you mean ‘is it possible to make the Vera go from $othermode to night mode and back again automatically’?
If so, then yes.
A scene with the Day or Night plugin as the trigger that activates the House Modes plugin. And vice versa
Reactor can also do it in one


I usually tied them to my alarm state:

  • Home: I’m home, no alarm inserted
  • Night: I’m home, but at the 1st floor, usually sleeping
  • Away: I’m away, alarm full inserted
  • Vacation: I’m away since 18 hours - more automations

I just activate different scenes/behavior, by combining logical state with day/night state - ie if I’m away, lights should activate randomly - during night (not Night mode), report external movements, and so on.
YMMV. I found them useful to a have something like a logical state, but I know other people are changing them automatically, to reflect the dusk/dawn cycle.

Catman, Yes automatically changing modes by schedule is my goal. I’ll have to figure out that plug in.

TheRealDB, I’m not sure that I understand what you mean by Logical State. My goal is to have varying alarm states based on mode which is scheduled. Being more into GUI and voice control, I’d like to avoid coded functions and geofencing. Proximity sensing is ok but full-time GPS tracking is something I’d like to avoid.

The plug ins are really simple.

Hardest part will be (I suspect) standardising your ‘night time’ as ‘n minutes before / after sunset’



As I said, my state are linked to my alarm panel, so no geofencing here. I was only saying that house modes can be used in conjunction with night/day status, to provide much more advanced features. If you can live with just 4 states, scenes are more than enough. Just schedule them.

Hello, i’ve been using the Day or Night plugin for some time to control scenes. Very simple to set and you can include offsets, eg 30 mins after sunset etc

Hi Stuart, The plugin sounds like a good idea, thanks.

It would be great if there were plugins for cascading menus on each mode.

© 2019 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy