Background: this is a Windows MSR install I've done for our local pool/amenity center just to run some fans and lights (not my daily driver at home). Install went perfectly fine.
Scenario: I want the lights to go on when it's dark enough (even if during a storm, not just after sunset) so I'm using solarRadiation
from my weather station to drive that Trigger
. Easy stuff.
Issue: sometimes, someone goes in the office and just starts flipping switches and the result can be lights turned on in the daytime or off at night. I'm trying to create a "catch-all" wherein if it is daytime and the lights somehow find their way ON, they will turn themselves back OFF.
I have the following Reaction
built:

I also have this Reaction
for opposite, ie the lights find themselves turned off after dark and they will turn themselves back on:

Here are my two rules
:
*NOTE that in my manual testing, ie I turn on the light switch at the incorrect time, when the solarRadiation
level changes the Lights ON
rule flags and shows as SET
. On the next change of solarRadiation
it goes back to reset
again.
My expectation is that Lights OFF
rule should see the lights are on, the solarRadiation
is above the set limit, and turn them off. Instead, every other run, the ON rule moves to SET
and then reset
again on the following run.
Logs appear angry:
[latest-25016]2025-01-26T22:03:31.696Z <Engine:INFO> Enqueueing "Lights ON<RESET>" (rule-m6e4ajh7:R)
[latest-25016]2025-01-26T22:03:31.712Z <Engine:NOTICE> Starting reaction Lights ON<RESET> (rule-m6e4ajh7:R)
[latest-25016]2025-01-26T22:03:31.713Z <Engine:INFO> Lights ON<RESET> all actions completed.
[latest-25016]2025-01-26T22:03:42.565Z <wsapi:INFO> client "127.0.0.1#3" closed, code=1001, reason=
[latest-25016]2025-01-26T22:03:42.753Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/lang
[latest-25016]2025-01-26T22:03:42.754Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/lang from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/lang ACL (#7): [Object]{ "url": "/api/v1/lang", "allow": true, "index": 7 }
[latest-25016]2025-01-26T22:03:42.790Z <wsapi:INFO> wsapi: connection from ::ffff:127.0.0.1
[latest-25016]2025-01-26T22:03:42.839Z <wsapi:INFO> [WSAPI]wsapi#1 client "127.0.0.1#6" authorized
[latest-25016]2025-01-26T22:03:43.353Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/systime
[latest-25016]2025-01-26T22:03:43.353Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/systime from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/systime ACL (#5): [Object]{ "url": "/api/v1/systime", "allow": true, "index": 5 }
[latest-25016]2025-01-26T22:03:48.146Z <wsapi:INFO> client "127.0.0.1#6" closed, code=1001, reason=
[latest-25016]2025-01-26T22:03:48.308Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/lang
[latest-25016]2025-01-26T22:03:48.309Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/lang from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/lang ACL (#7): [Object]{ "url": "/api/v1/lang", "allow": true, "index": 7 }
[latest-25016]2025-01-26T22:03:48.346Z <wsapi:INFO> wsapi: connection from ::ffff:127.0.0.1
[latest-25016]2025-01-26T22:03:48.390Z <wsapi:INFO> [WSAPI]wsapi#1 client "127.0.0.1#7" authorized
[latest-25016]2025-01-26T22:03:49.412Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/systime
[latest-25016]2025-01-26T22:03:49.413Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/systime from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/systime ACL (#5): [Object]{ "url": "/api/v1/systime", "allow": true, "index": 5 }
[latest-25016]2025-01-26T22:03:52.734Z <wsapi:INFO> client "127.0.0.1#7" closed, code=1001, reason=
[latest-25016]2025-01-26T22:03:52.891Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/lang
[latest-25016]2025-01-26T22:03:52.892Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/lang from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/lang ACL (#7): [Object]{ "url": "/api/v1/lang", "allow": true, "index": 7 }
[latest-25016]2025-01-26T22:03:52.925Z <wsapi:INFO> wsapi: connection from ::ffff:127.0.0.1
[latest-25016]2025-01-26T22:03:52.965Z <wsapi:INFO> [WSAPI]wsapi#1 client "127.0.0.1#8" authorized
[latest-25016]2025-01-26T22:03:54.383Z <httpapi:INFO> [HTTPAPI]#1 API request from ::ffff:127.0.0.1: GET /api/v1/systime
[latest-25016]2025-01-26T22:03:54.384Z <httpapi:INFO> [HTTPAPI]#1 request for /api/v1/systime from ::ffff:127.0.0.1 user anonymous auth none matches /api/v1/systime ACL (#5): [Object]{ "url": "/api/v1/systime", "allow": true, "index": 5 }
[latest-25016]2025-01-26T22:04:01.590Z <wsapi:INFO> [WSAPI]wsapi#1 rpc_echo [Object]{ "comment": "UI activity" }
[latest-25016]2025-01-26T22:04:39.646Z <Rule:INFO> Lights OFF (rule-m6e33ja3 in Atrium Lights) evaluated; rule state transition from RESET to SET!
[latest-25016]2025-01-26T22:04:39.656Z <Rule:INFO> Lights ON (rule-m6e4ajh7 in Atrium Lights) evaluated; rule state transition from RESET to SET!
[latest-25016]2025-01-26T22:04:39.663Z <Engine:INFO> Enqueueing "Lights OFF<SET>" (rule-m6e33ja3:S)
[latest-25016]2025-01-26T22:04:39.665Z <Engine:INFO> Enqueueing "Lights ON<SET>" (rule-m6e4ajh7:S)
[latest-25016]2025-01-26T22:04:39.668Z <Engine:NOTICE> Starting reaction Lights OFF<SET> (rule-m6e33ja3:S)
[latest-25016]2025-01-26T22:04:39.669Z <Engine:NOTICE> Starting reaction Lights ON<SET> (rule-m6e4ajh7:S)
[latest-25016]2025-01-26T22:04:39.669Z <Engine:INFO> Lights ON<SET> all actions completed.
[latest-25016]2025-01-26T22:04:39.675Z <Rule:INFO> Lights OFF (rule-m6e33ja3 in Atrium Lights) evaluated; rule state transition from SET to RESET!
[latest-25016]2025-01-26T22:04:39.680Z <Engine:NOTICE> ReactionHistory: no entry for
[latest-25016]2025-01-26T22:04:39.683Z <Engine:NOTICE> [Engine]Engine#1 entry 256 reaction rule-m6e33ja3:S-1q2f1j0p: [Error] terminated [parent terminating]
[latest-25016]2025-01-26T22:04:39.683Z <Engine:CRIT> Error: terminated [parent terminating]
Error: terminated
at Engine._process_reaction_queue (C:\Users\Jalan\msr\reactor\server\lib\Engine.js:1644:47)
[latest-25016]2025-01-26T22:04:39.699Z <Engine:NOTICE> [Engine]Engine#1 entry 254 reaction rule-m6e33ja3:S: [Error] terminated [preempted by rule state change]
[latest-25016]2025-01-26T22:04:39.699Z <Engine:CRIT> Error: terminated [preempted by rule state change]
Error: terminated
at Engine._process_reaction_queue (C:\Users\Jalan\msr\reactor\server\lib\Engine.js:1644:47)
[latest-25016]2025-01-26T22:04:39.700Z <Engine:INFO> Enqueueing "Lights OFF<RESET>" (rule-m6e33ja3:R)
[latest-25016]2025-01-26T22:04:39.704Z <Engine:NOTICE> Starting reaction Lights OFF<RESET> (rule-m6e33ja3:R)
[latest-25016]2025-01-26T22:04:39.705Z <Engine:INFO> Lights OFF<RESET> all actions completed.
[latest-25016]2025-01-26T22:05:48.822Z <Rule:INFO> Lights ON (rule-m6e4ajh7 in Atrium Lights) evaluated; rule state transition from SET to RESET!
[latest-25016]2025-01-26T22:05:48.831Z <Engine:INFO> Enqueueing "Lights ON<RESET>" (rule-m6e4ajh7:R)
[latest-25016]2025-01-26T22:05:48.847Z <Engine:NOTICE> Starting reaction Lights ON<RESET> (rule-m6e4ajh7:R)
[latest-25016]2025-01-26T22:05:48.847Z <Engine:INFO> Lights ON<RESET> all actions completed.