more G-Labs products

Author Topic: Cron event firing for no reason  (Read 1522 times)

April 06, 2015, 06:29:26 AM
Read 1522 times

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I have a module that is set up to turn off at 10PM in the evening.  However, for some unknown reason, the module turns off at 9PM AND 10PM.  The cron string is:
Code: [Select]
(@SolarAltitude.Morning.Sunrise.End:0 22 * * *)The log that shows it turning off twice is:
Code: [Select]
20150404 21:00:02.5753130 ; Torch lamp ; Status.Level ; 0
20150404 22:00:01.7245920 ; Torch lamp ; Status.Level ; 0
I'd love to figure out why this is happening, but I can't find anything that can explain it.  I checked modules.xml, but the event string is encrypted for some reason so I can't verify that the HG interface is setting things correctly.

If there are any suggestions on how to figure out the source of the issue, I'd appreciate the input.

April 07, 2015, 06:31:18 AM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
This is what the modules.xml file contains:
Code: [Select]
      <ModuleParameter>
        <Name>HomeGenie.ScheduleOff</Name>
        <Value>jrLB8/ok1c7pHje8vtHZZko7U5SgIS6atLuXx792RLyl54C9SFs34BUX0ldJyTXE</Value>
        <Description />
        <UpdateTime>2015-04-04T07:05:17.322263Z</UpdateTime>
      </ModuleParameter>

I tried deleting the string and adding it back in, and it produced the same value string.  I'm not sure what this string is encoded in, so I couldn't check to verify it's being interpreted correctly.

I also looked through the mono log to see if any other modules are turning off or on at a 1 hour offset and I don't see anything.  Perhaps there's just something wrong with A14?

April 10, 2015, 03:01:06 AM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'm still not finding anything to explain this, so I'll go ahead and upload my modules.xml file and create a github issue.

https://github.com/genielabs/HomeGenie/issues/157

April 10, 2015, 07:03:20 AM
Reply #3

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
As a test, I disabled the Scheduled Events for X10 module A14 and yet the event still fired.

Code: [Select]
2015-04-09T21:00:00.9989050-07:00 HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Torch lamp OFF"}
2015-04-09T21:00:01.8638870-07:00 HomeAutomation.X10 A14 - Status.Level 0

The lamp did not turn on at sunset and the lamp did not turn off at 10PM, but it did send the off command at 9PM and the log indicates that the controlling event was the "Scheduled Control" program just like the other cron events.

April 23, 2015, 06:08:50 AM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I just tried disabling the scheduled event for the module on A14 and rebooting HG.  I happened to reboot just before 9pm such that the reboot finished at 9:00:15.  At 9:00:30, the scheduled event fired again and the module was turned off.  This is despite the setup that should turn the module off at 10pm.

I was just thinking that the module should be turned off at 10pm.  Since daylight savings time just started last month, I was thinking that perhaps this could be related?  I'm not sure how since the event is not supposed to fire at all when the toggle is turned off for controlling this module.

This may not be related, but the timetable script is showing an error and has a dark red icon.  The error is:
Code: [Select]
Error
×
     at System.Collections.Generic.List`1+Enumerator[HomeGenie.Data.ModuleParameter].MoveNext () [0x00000] in :0
     at HomeGenie.Automation.Scripting.ProgramHelper.Setup (System.Action functionBlock) [0x00000] in :0
« Last Edit: April 23, 2015, 06:16:39 AM by bkenobi »

June 18, 2015, 04:38:28 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I have no idea what happened, but when looking into this today I found that HG has the module set to turn off at 9pm (see image).  I corrected the setting so hopefully this issue will be resolved.  I'm still confused how HG got that setting in the first place, but as long as the correct configuration sticks around I'll just shake my head an move on.