Help resolve change in behaviour post update
-
Current set up: Bare metal (virtualised) on Debian 10.2
MSR 25310Updated over the weekend and two reactions that have worked for literally years have changed. I'm pretty sure it was due to the 'nuances' in previous versions of evaluating global variables, so just looking for some help to 'fix'?
I have two reactions that are dependant in large part on the global variable GlobalAlarmTime This is set in the Alarm Clock plugin of Openluup.
One reaction turns the heating on one hour before the alarm goes off. The other turns the outside lights on one hour before the alarm goes off.
Typically I change GlobalAlarmTime depending on the day of the week and the plans of the day ahead.
GlobalAlarmTime is a string, current value(string) "05:40:00"
Local variable HeatTime is calculated:
time(GlobalAlarmTime) - 3600000
Currently that has a value of1762749600000
Which is (quite correctly) 04:40:00 GMT 10th November. It's this because I changed the value of GlobalAlarmTime checking stuff out this morning, and HeatTime was re-evaluated at 09:37:17The challenge that I'm facing is that prior to the upgrade, HeatTime would be re-evaluated every 15 minutes (triggered by the 'Interval' function and come midnight (or at worst 00:15:00) HeatTime would re-evaluate to
time(GlobalAlarmTime) - 3600000 today (if you get my point)That update to 'today' no longer happens. So the heating never comes on.
[latest-25310]2025-11-10T00:00:00.025Z <Rule:INFO> Holiday Shutdown (rule-l8ys5tzy in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l8ys5tzy [latest-25310]2025-11-10T00:00:00.031Z <Rule:INFO> Holiday Heating (rule-ltsdvzi8 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-ltsdvzi8 [latest-25310]2025-11-10T00:00:00.051Z <Rule:INFO> Holiday Lights (rule-ltse0zb4 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-ltse0zb4 [latest-25310]2025-11-10T00:00:00.058Z <Rule:INFO> Set Greeting to Evening (rule-lioalha1 in Test Bed) starting rule state evaluation; because timer-trigger Timer#rule-lioalha1 [latest-25310]2025-11-10T00:00:00.068Z <Rule:INFO> Set Greeting to Evening (rule-lioalha1 in Test Bed) evaluated; rule state transition from SET to 'RESET' [latest-25310]2025-11-10T00:00:00.084Z <Rule:INFO> Garden lights on when the doors are open (rule-lb2h69nb in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-lb2h69nb [latest-25310]2025-11-10T00:00:00.086Z <Rule:INFO> Set Greeting to Afternoon (rule-lioanahk in Test Bed) starting rule state evaluation; because timer-trigger Timer#rule-lioanahk [latest-25310]2025-11-10T00:00:00.095Z <Rule:INFO> Evening Lights are On (rule-l5senfyv in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l5senfyv [latest-25310]2025-11-10T00:00:00.096Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l6gxvycu [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime has object dependency [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.103Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) evaluated; rule state transition from RESET to 'SET' [latest-25310]2025-11-10T00:00:00.139Z <Engine:INFO> Enqueueing "Morning Lights are on<SET>" (rule-l6gxvycu:S) [latest-25310]2025-11-10T00:00:00.140Z <Engine:NOTICE> Starting reaction Set Greeting to Morning<SET> (rule-lioajm6q:S) [latest-25310]2025-11-10T00:00:00.147Z <Engine:INFO> Set Greeting to Morning<SET> all actions completed. [latest-25310]2025-11-10T00:00:00.162Z <Engine:NOTICE> Starting reaction Morning Lights are on<SET> (rule-l6gxvycu:S) [latest-25310]2025-11-10T00:00:00.163Z <VeraController:INFO> VeraController#vera perform action power_switch.on on Switch#vera>device_20170 with { } [latest-25310]2025-11-10T00:00:00.170Z <VeraController:INFO> VeraController#vera perform action power_switch.set on Switch#vera>device_20170 with { "state": true } [latest-25310]2025-11-10T00:00:00.173Z <Rule:INFO> Morning Heating (rule-l60fkpo3 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l60fkpo3 [latest-25310]2025-11-10T00:00:00.178Z <Rule:INFO> Rule#rule-l60fkpo3 local AlarmTime has object dependency [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime has object dependency [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.180Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOff is a dependency of another variable [latest-25310]2025-11-10T00:00:00.185Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l6gxvycu [latest-25310]2025-11-10T00:00:00.192Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.193Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime has object dependency [latest-25310]2025-11-10T00:00:00.193Z <Rule:INFO> Rule#rule-l6gxvycu local LightOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.195Z <Rule:INFO> Morning Heating (rule-l60fkpo3 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l60fkpo3 [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local AlarmTime has object dependency [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime has object dependency [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOff is a dependency of another variable [latest-25310]2025-11-10T00:00:00.233Z <VeraController:NOTICE> VeraController#vera action power_switch.set({ "state": true }) on Switch#vera>device_20170 succeeded [latest-25310]2025-11-10T00:00:00.234Z <Engine:INFO> Resuming reaction Morning Lights are on<SET> (rule-l6gxvycu:S) from step 1 [latest-25310]2025-11-10T00:00:00.234Z <VeraController:INFO> VeraController#vera perform action power_switch.on on Switch#vera>device_20090 with { } [latest-25310]2025-11-10T00:00:00.234Z <VeraController:INFO> VeraController#vera perform action power_switch.set on Switch#vera>device_20090 with { "state": true } [latest-25310]2025-11-10T00:00:00.289Z <VeraController:NOTICE> VeraController#vera action power_switch.set({ "state": true }) on Switch#vera>device_20090 succeeded [latest-25310]2025-11-10T00:00:00.289Z <Engine:INFO> Resuming reaction Morning Lights are on<SET> (rule-l6gxvycu:S) from step 2 [latest-25310]2025-11-10T00:00:00.290Z <Engine:INFO> Morning Lights are on<SET> all actions completed. [latest-25310]2025-11-10T00:00:43.383Z <Engine:INFO> Engine#1 master timer tick, local time "10/11/2025 00:00:43" (TZ offset 0 mins from UTC) [latest-25310]2025-11-10T00:00:43.452Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.463Z <httpapi:INFO> HTTPAPI(#1) API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-25310]2025-11-10T00:00:43.476Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.488Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.490Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.510Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.516Z <HassController:NOTICE> HassController#hass websocket closing, 1006I'm going to guess I need to use the new
alarmfunction.I'm further guessing that I'd set up a new global variable to replace
HeatTimeand have something like
GlobalHeatTime = alarm ( 900) , time(GlobalAlarmTime) - 3600000?Am I on the right lines?
TIA
C
-
Current set up: Bare metal (virtualised) on Debian 10.2
MSR 25310Updated over the weekend and two reactions that have worked for literally years have changed. I'm pretty sure it was due to the 'nuances' in previous versions of evaluating global variables, so just looking for some help to 'fix'?
I have two reactions that are dependant in large part on the global variable GlobalAlarmTime This is set in the Alarm Clock plugin of Openluup.
One reaction turns the heating on one hour before the alarm goes off. The other turns the outside lights on one hour before the alarm goes off.
Typically I change GlobalAlarmTime depending on the day of the week and the plans of the day ahead.
GlobalAlarmTime is a string, current value(string) "05:40:00"
Local variable HeatTime is calculated:
time(GlobalAlarmTime) - 3600000
Currently that has a value of1762749600000
Which is (quite correctly) 04:40:00 GMT 10th November. It's this because I changed the value of GlobalAlarmTime checking stuff out this morning, and HeatTime was re-evaluated at 09:37:17The challenge that I'm facing is that prior to the upgrade, HeatTime would be re-evaluated every 15 minutes (triggered by the 'Interval' function and come midnight (or at worst 00:15:00) HeatTime would re-evaluate to
time(GlobalAlarmTime) - 3600000 today (if you get my point)That update to 'today' no longer happens. So the heating never comes on.
[latest-25310]2025-11-10T00:00:00.025Z <Rule:INFO> Holiday Shutdown (rule-l8ys5tzy in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l8ys5tzy [latest-25310]2025-11-10T00:00:00.031Z <Rule:INFO> Holiday Heating (rule-ltsdvzi8 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-ltsdvzi8 [latest-25310]2025-11-10T00:00:00.051Z <Rule:INFO> Holiday Lights (rule-ltse0zb4 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-ltse0zb4 [latest-25310]2025-11-10T00:00:00.058Z <Rule:INFO> Set Greeting to Evening (rule-lioalha1 in Test Bed) starting rule state evaluation; because timer-trigger Timer#rule-lioalha1 [latest-25310]2025-11-10T00:00:00.068Z <Rule:INFO> Set Greeting to Evening (rule-lioalha1 in Test Bed) evaluated; rule state transition from SET to 'RESET' [latest-25310]2025-11-10T00:00:00.084Z <Rule:INFO> Garden lights on when the doors are open (rule-lb2h69nb in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-lb2h69nb [latest-25310]2025-11-10T00:00:00.086Z <Rule:INFO> Set Greeting to Afternoon (rule-lioanahk in Test Bed) starting rule state evaluation; because timer-trigger Timer#rule-lioanahk [latest-25310]2025-11-10T00:00:00.095Z <Rule:INFO> Evening Lights are On (rule-l5senfyv in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l5senfyv [latest-25310]2025-11-10T00:00:00.096Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l6gxvycu [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime has object dependency [latest-25310]2025-11-10T00:00:00.102Z <Rule:INFO> Rule#rule-l6gxvycu local LightOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.103Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) evaluated; rule state transition from RESET to 'SET' [latest-25310]2025-11-10T00:00:00.139Z <Engine:INFO> Enqueueing "Morning Lights are on<SET>" (rule-l6gxvycu:S) [latest-25310]2025-11-10T00:00:00.140Z <Engine:NOTICE> Starting reaction Set Greeting to Morning<SET> (rule-lioajm6q:S) [latest-25310]2025-11-10T00:00:00.147Z <Engine:INFO> Set Greeting to Morning<SET> all actions completed. [latest-25310]2025-11-10T00:00:00.162Z <Engine:NOTICE> Starting reaction Morning Lights are on<SET> (rule-l6gxvycu:S) [latest-25310]2025-11-10T00:00:00.163Z <VeraController:INFO> VeraController#vera perform action power_switch.on on Switch#vera>device_20170 with { } [latest-25310]2025-11-10T00:00:00.170Z <VeraController:INFO> VeraController#vera perform action power_switch.set on Switch#vera>device_20170 with { "state": true } [latest-25310]2025-11-10T00:00:00.173Z <Rule:INFO> Morning Heating (rule-l60fkpo3 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l60fkpo3 [latest-25310]2025-11-10T00:00:00.178Z <Rule:INFO> Rule#rule-l60fkpo3 local AlarmTime has object dependency [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime has object dependency [latest-25310]2025-11-10T00:00:00.179Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.180Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOff is a dependency of another variable [latest-25310]2025-11-10T00:00:00.185Z <Rule:INFO> Morning Lights are on (rule-l6gxvycu in Outside Lights) starting rule state evaluation; because timer-trigger Timer#rule-l6gxvycu [latest-25310]2025-11-10T00:00:00.192Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.193Z <Rule:INFO> Rule#rule-l6gxvycu local LightTime has object dependency [latest-25310]2025-11-10T00:00:00.193Z <Rule:INFO> Rule#rule-l6gxvycu local LightOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.195Z <Rule:INFO> Morning Heating (rule-l60fkpo3 in Heating Control) starting rule state evaluation; because timer-trigger Timer#rule-l60fkpo3 [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local AlarmTime has object dependency [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime is a dependency of another variable [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatTime has object dependency [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOn is a dependency of another variable [latest-25310]2025-11-10T00:00:00.196Z <Rule:INFO> Rule#rule-l60fkpo3 local HeatOff is a dependency of another variable [latest-25310]2025-11-10T00:00:00.233Z <VeraController:NOTICE> VeraController#vera action power_switch.set({ "state": true }) on Switch#vera>device_20170 succeeded [latest-25310]2025-11-10T00:00:00.234Z <Engine:INFO> Resuming reaction Morning Lights are on<SET> (rule-l6gxvycu:S) from step 1 [latest-25310]2025-11-10T00:00:00.234Z <VeraController:INFO> VeraController#vera perform action power_switch.on on Switch#vera>device_20090 with { } [latest-25310]2025-11-10T00:00:00.234Z <VeraController:INFO> VeraController#vera perform action power_switch.set on Switch#vera>device_20090 with { "state": true } [latest-25310]2025-11-10T00:00:00.289Z <VeraController:NOTICE> VeraController#vera action power_switch.set({ "state": true }) on Switch#vera>device_20090 succeeded [latest-25310]2025-11-10T00:00:00.289Z <Engine:INFO> Resuming reaction Morning Lights are on<SET> (rule-l6gxvycu:S) from step 2 [latest-25310]2025-11-10T00:00:00.290Z <Engine:INFO> Morning Lights are on<SET> all actions completed. [latest-25310]2025-11-10T00:00:43.383Z <Engine:INFO> Engine#1 master timer tick, local time "10/11/2025 00:00:43" (TZ offset 0 mins from UTC) [latest-25310]2025-11-10T00:00:43.452Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.463Z <httpapi:INFO> HTTPAPI(#1) API request from ::ffff:192.168.70.249: GET /api/v1/netstatus [latest-25310]2025-11-10T00:00:43.476Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.488Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.490Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.510Z <Rule:INFO> Internet Check (rule-m6z41xhd in Office Environment) starting rule state evaluation; because entity-changed System#reactor_system>system [latest-25310]2025-11-10T00:00:43.516Z <HassController:NOTICE> HassController#hass websocket closing, 1006I'm going to guess I need to use the new
alarmfunction.I'm further guessing that I'd set up a new global variable to replace
HeatTimeand have something like
GlobalHeatTime = alarm ( 900) , time(GlobalAlarmTime) - 3600000?Am I on the right lines?
TIA
C
@CatmanV2 said in Help resolve change in behaviour post update:
I'm further guessing that I'd set up a new global variable to replace HeatTime and have something like
GlobalHeatTime = alarm ( 900) , time(GlobalAlarmTime) - 3600000You're on the right track. If I understand your description, something like this should work (all globals):
gAlarmTime = getEntity( ... ) gHeatTime = time(gAlarmTime) - 3600000 gHeatOn = alarm(900), time() >= gHeatTimegAlarmTimewill be updated any time the dependent entity changes.gHeatTimewill change any timegAlarmTimechanges (reference to another variable creates a dependency on that variable).gHeatOnwill be updated by the periodicalarm()tripping. -
@CatmanV2 said in Help resolve change in behaviour post update:
Will I see it updating in the logs?
Yes, and on the Expressions page.
-
@CatmanV2 said in Help resolve change in behaviour post update:
Will I see it updating in the logs?
Yes, and on the Expressions page.
@toggledbits Thanks so much
I've now got this
With
GlobalHeatOnas one of my conditions in the reaction.My assumption is it will go
falseat, or immediately after midnight?I'm guessing I can lose the
Intervalstatement as well?Cheers
C
-
@toggledbits Thanks so much
I've now got this
With
GlobalHeatOnas one of my conditions in the reaction.My assumption is it will go
falseat, or immediately after midnight?I'm guessing I can lose the
Intervalstatement as well?Cheers
C
@CatmanV2 said in Help resolve change in behaviour post update:
My assumption is it will go false at, or immediately after midnight?
No. If your
GlobalAlarmTimewill always show time only (no date components), then you can safely add analarm()call toGlobalHeatTimeas well. -
@CatmanV2 said in Help resolve change in behaviour post update:
My assumption is it will go false at, or immediately after midnight?
No. If your
GlobalAlarmTimewill always show time only (no date components), then you can safely add analarm()call toGlobalHeatTimeas well.@toggledbits Ahh super
GlobalAlarmTimeis never date (or I guess we'd not have this issue!)I do appreciate you thinking down to my level

C











