Author Topic: luup.is_night() condition does not match sunset trigger  (Read 409 times)

Offline mouch

  • Newbie
  • *
  • Posts: 18
  • Karma: +1/-0
luup.is_night() condition does not match sunset trigger
« on: March 29, 2018, 02:25:27 am »
I have two scenes controlling my blinds.
- first scene opens the blinds at sunset
- second scene closes blinds at night (with luup is night condition) when I leave the house

Lately (maybe related two daylight saving time) the blinds opened correctly at sunset but closed again 10-15min later when I left the house.
So how can luup.is_night() still return true, if the time of day is definitely after sunset?

Offline MarcusB

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: luup.is_night() condition does not match sunset trigger
« Reply #1 on: April 25, 2018, 03:13:21 am »
I actually just found this post as I searched for ?return luup.is_night()?.
It seems Vera isn?t respecting this condition in scenes.

I have a number of scenes with this condition and as of a week or so ago, they seem to be working at any time, not just at night as they used to.

Anyone else noticed this or is it something else?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1112
  • Karma: +52/-21
Re: luup.is_night() condition does not match sunset trigger
« Reply #2 on: April 25, 2018, 06:46:09 pm »
Humor me but the Veras don't keep time upon luup reload. There is no battery/quartz timer... Every time you reload luup it goes through a phase of thinking it is 1999 or 1969 and I don't know what time. It needs the internet and pings an NTP with your timezone before it knows time and if you have scene triggered by this condition, you will have triggers every time luup reloads which is... pretty frequent.

Apparently the forum can't keep time too well either as I keep getting a post rejection stating that I posted from my IP less than 45s ago which is clearly not true.
openLuup (96 devices, 122 scenes, 20 apps) controlling HomeAss + VeraPlus (133 zwave nodes, 8 Zigbee nodes, 200 devices, 34 scenes , 1 apps) Bridged to Homekit and Alexa

Offline MarcusB

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: luup.is_night() condition does not match sunset trigger
« Reply #3 on: April 29, 2018, 11:17:50 pm »
All the timed scenes are working correctly.  The only issue I'm seeing is that events that should only trigger during night hours are triggering at all times.
it sounds like Mouch (The OP) is seeing the same things.  It only just started happening over the last couple of weeks. No scenes have been changed or modified during that time.