Sunset on/Sunrise off does not work

Hi I guess I have two issues that I hope are easy for you experts to fix:

  1. My lights do not turn off in the morning. Either on their own or after I press “do it now.” I used a basic schedule as seen in the JPG attachment. A look at the status (as below) shows the current state to be off. Is my “actions” that just selects on incorrect (see attached jpg)? Thanks!
  2. More oddly, my sunrise and sunset times appear to be set roughly for zero lat & zero long. And my Vera is selected to NYC and shows my town in NJ as my location. My router also shows the correct time zone. This is why I have the 4 hour offset to turn on and the six hour offset to turn off as shown below.

Any suggestions would be most appreciated! Thanks.

Schedules

Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
Snighttime Weekly +04:00:00t 1,2,3,4,5,6,7 None Weekly +06:00:00r 1,2,3,4,5,6,7 None false 2015-03-28 18:08:23.100 2015-03-29 08:01:34.100
Conditions

Name Repeat Expression State Last True Last False
cnighttime No Snighttime false 2015-03-28 18:08:23.115 2015-03-29 08:01:34.102
Actions

Actions for Condition: cnighttime

Device Actions:

Immediate

Device Action Arguments
porchdiningroomsidelight SetTarget newTargetValue=1
porchlivingroomsidelight SetTarget newTargetValue=1
porchoverheadlight SetTarget newTargetValue=1

The reason that your lights don’t turn off is that you didn’t tell them too!

Add a Condition after cnighttime:

cdaytime !cnighttime

Then add Actions for cdaytime to turn off the lights.

More oddly, my sunrise and sunset times appear to be set roughly for zero lat & zero long. And my Vera is selected to NYC and shows my town in NJ as my location.

It seems that your location is not set correctly. I would repeat the setup. Try setting it again. Also check the Latitude and Longitude figures and correct them if necessary. You can get them for your location through Google.

Thanks. I added the condition and action you suggested, re-did the lat/long. I will see if the sunrise time works. But for now, I noticed that if I clicked “do it now” in the schedules tab, the lights toggle between on and off! Shouldn’t “do it now” produce the same result each time I click it in the schedules tab - i.e., if the time is between sunset and sunrise, the lights should stay on no matter how many times I click it?

When a schedule happens … either off or on … it evaluates conditions and execute actions at that are true at the time.

When you click “Do It Now” you are simulating the NEXT scheduled event, if the schedule is currently OFF, is turns it ON immediately and vice versa.
So you can test your logic without having to wait until the timer fire at their scheduled time.

In your case you have a timer that turns ON at some time and OFF at a later time. Conditions, Actions, and in this case light settings, only have at the events (timer on/off in this case). If the timer turns the lights on … you can manually turn them off and they will stay off. Of course there are ways to write PLEG logic so that the lights would turn back on if they are manually turned off during this interval.

Were you able to get sunrise/sunset to work? I have the same issue. My work around is the day/night plugin.

I wrote both PLEG and Day or Night … They use the same mechanism.
So do the Input schedules in Scenes!

They all require:

  1. You have set your location properly (to MCV specs) in Settings.
  2. You have set your current time zone properly (to MCV specs) in Settings.

Sometimes the above two do not work for users and you need to get MCV support to help.

Hi,

For some reason my pleg won’t trigger the sunset and sunrse anymore.

sNightPlus | Weekly | -00:30:00t |1,2,3,4,5,6,7| None | Weekly | -00:05:00r | 1,2,3,4,5,6,7 | None | true | 2015-10-21 18:01:15.101 | 2015-10-21 09:57:05.001

Setting worked fine until some days ago, did something change?

Settings of timezone in veralite are still the same, Amsterdam

PLC Version:7.46 PLEG Motion-s[85] 2015-10-22 17:54:18.408
Registration
Installed: Sat Nov 16 2013. You have 1 license, which allows a total of 4 PLEG and/or PLTS plugins.

Any suggestions?

Did you have a day lite savings change ?

Try rebooting (power cycle) your Vera while you are connected to the Internet.

Hi Richard, the day lite change is coming this weekend, but it looks like the time is 5 hours off… Will try a power cycle also…

Thanks,
Danny

Sent using Tapatalk

[quote=“Mothan, post:9, topic:186672”]Hi Richard, the day lite change is coming this weekend, but it looks like the time is 5 hours off… Will try a power cycle also…

Thanks,
Danny

Sent using Tapatalk[/quote]

If the time is off that could be your problem. VERA syncs time via the internet when you power cycle. That is why Richard asked you to make sure internet is good and connected while you power cycle to try and get your time back in sync.

But time in the browserwindow shows current correct time.

I also changed time settings to Brussel, and back, (Same time zone) just to trigger the VERA to connect to the timeserver…

Groet,
Danny

I’m confused, and you still haven’t said if its working right after a power cycle or if you even power cycled it. Time in your PLEG status report is more important and not the same as the time in the vera UI.

The Time in the Browser is the time of the machine running the browser … That does not tell you what time Vera thinks it is.

Changing the TimeZone on Vera does not cause it to reconnect to the time server. It just resets how Vera displays it’s time (i.e. the values displayed in the LOG files).

The only thing that will reset the time (without logging into Vera using ssh as root and issuing the appropriate command line command) is to POWER CYCLE Vera while it has network connectivity.
Vera ONLY looks for a time server during the boot cycle!!! This is why many people have there Vera on a UPS.

If you had a power outage and the power came back faster than your network … than Vera will HAVE the wrong time.

If you want to see what time Vera thinks it is … monitor the log file on Vera (the log file may be delayed (buffered) for a few minutes.

http://Your.Vera.IP.Address/cgi-bin/cmh/log.sh?Device=LuaUPnP

Hi Richard,

Thanks, it is clear now.

I did the power cycle, and it looks like everything is working according planned again…

Groet,
Danny