genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
387 stars 154 forks source link

Some X10 Modules on at Midnight #442

Closed Barry-IA closed 1 year ago

Barry-IA commented 2 years ago

Hi Folks!

Running HomeGenie v.1.3-stable.19 on a Raspberry Pi 3. Everything seemed correct with specifically set on and off times: turn on at 7 p.m., off at 11 p.m. type of thing. I then added an Event called Lights.Dusk.On30 to turn selected X10 modules on thirty minutes before the sun sets. We want the lights on no later than 7 p.m. but earlier in the Fall and Winter when it gets dark earlier.

Good news: that worked fine. Bad news: it turns on those selected modules and two others on at midnight! N1 and N3 are selected for Dusk.On30 but N5 and N6 also get turned on!

Currently added a work-around programme to turn these four modules off at 12:02.

Dusk.On30: Occurrence: [ ( 1-31 11 ) : ( 30 10 ) : ( 12-9 ) ] % (@SolarTimes.Sunset -30)

Modules:    N1 and N3

Script:     The turn on/off range one.  With just the ‘on’ one turned on fine but didn’t turn off (by the specific module one telling on at 7 and off at 11).

Thanks! Barry

mralapete commented 2 years ago

As a first test try a different house code. Possibly an issue with house code N. After that there are a number of possible factors at play here. The type of bulbs you are using, line noise, signal strength from your X10 Controller. Again just try the first suggestion and work your way along from there. I doubt it is a HG problem at play here.

Barry-IA commented 2 years ago

mralapete: My apologies for appearing not to have replied: I replied via e-mail reply -- obviously not the way to do it as not posted. The original reply of October 31st:

Hi mralapete!

As a first test try a different house code. Possibly an issue with house code N. After that there are a number of possible factors at play here. The type of bulbs you are using, line noise, signal strength from your X10 Controller. Again just try the first suggestion and work your way along from there. I doubt it is a HG problem at play here.

I am respectfully denying the change of Housecode N as those modules have worked properly for literally decades, originally under AHP (Windows). (Currently HG on a dedicated Raspberry Pi.) Also, the problem (midnight on) didn't start until I added the SolarTimes.Sunset programme, so I'm thinking it's more something I did incorrectly in the configuration. ...It's either my way of thinking or just not there as not too many examples for SolarTimes stuff.

Thanks! Barry

(new portion continues) Since Halloween has come and gone. Did find a couple of issues, mainly the way I issued the scheduling commands. The way I did it causes what seems to be the old Date Bug: the SolarTimes.Sunset -30 worked (with the exception of the on-at-midnight problem) though October 30th and then on November 1 didn't: found it was gone from Calendar View although present in Edit Events View. What I am testing tonight (November 2nd) is the workaround suggested in Issue #325: two parts, one starting January 1 through (date - in my case October 30), and a second part from November 1 through December 31.

...See what happens tonight! Barry

mralapete commented 2 years ago

It’s entirely up to you how you troubleshoot. I just make a suggestion. I won’t loose any sleep over it.

Not sure what part of the planet you’re from but there was a daylight saving change here on the 30th October. Also it’s been advisable in the past to avoid absolute midnight 00:00 as an automation trigger. It’s caused problems in the past. Other than that if you’ve solved your problem happy days

Barry-IA commented 2 years ago

Hi mralapate!

Yes, agreed; the reasons I ‘rejected’ that part of your troubleshooting suggestion was because it worked correctly before I added the script/schedule to turn the (selected) lights using SolarTimes.Sunset -30.

As for part of the world, I’m over here in the Central Time Zone, 180 miles/290KM west of Chicago. Here in the U.S. the time won’t change until next Sunday morning, November 7 at 2 a.m., so totally agree with you regarding not running events at 12:00 midnight, and because of the 2-to-3-a.m. and 2-to-1-a.m. try to avoid running anything ‘critical’ until after 4 a.m..

The problem here hasn’t been solved but will continue to try to figure it out, or a work-around.

genemars commented 1 year ago

Hi, there were a couple of fixes related to the Scheduler and that are available since version 1.4.0. Maybe this issue has also been fixed