Hi!
After several tests, restarting the computer where the MSR is, and the MSR itself by Tools > Restart, I have a persistent error in the logs.
32d45bc3-51f8-4718-a113-3381e9d7edf2-image.png
Looking at the global expression (screen below), I see that it is highlighted as an error, however, if I look at two other expressions above that have the same structure, they do not present an error, so I do not think the problem is with the expression's code.
ca8a7867-4ac7-4f9a-9913-15a80da18f05-image.png
This expression uses a group, which validates 4 devices of type door sensor, whether the status is true or false, door open or closed.
"dgc_entrance_open":
name: DGC Entrance Open
select:
- include_entity:
- "hubitat>37"
- "hubitat>38"
- "hubitat>99"
- "hubitat>130"
filter_expression: >
entity.attributes?.door_sensor?.state == true
I also compared it with other groups, the structure is identical.
Looking at the 4 devices in this group, I see that all are active in the MSR, have similar variables, are used in other groups and rules that do not present a problem.
52b099f4-b9c4-46cb-ad3d-c873b09b7e13-image.png
Looking at the log, I understand that it refers to some object that would be null, at which point I am lost on what to actually look at.
[latest-22118]2022-05-02T22:33:11.711Z <Engine:INFO> Reaction Engine starting
[latest-22118]2022-05-02T22:33:11.719Z <Engine:INFO> Checking rule sets...
[latest-22118]2022-05-02T22:33:11.746Z <Engine:INFO> Checking rules...
[latest-22118]2022-05-02T22:33:11.748Z <Engine:INFO> Data check complete; no corrections.
[latest-22118]2022-05-02T22:33:11.892Z <Engine:ERR> [Engine]Engine#1: error evaluating expression EntranceOPEN: [ReferenceError]ReferenceError: Invalid scope in reference to member attributes of (object)null
[latest-22118]2022-05-02T22:33:11.893Z <Engine:ERR> [Engine]Engine#1: expression: sort(each id in ( getEntity('groups>dgc_entrance_open').attributes.sys_group.members ): getEntity(id).name)
[latest-22118]2022-05-02T22:33:11.894Z <Engine:CRIT> ReferenceError: Invalid scope in reference to member attributes of (object)null
ReferenceError: Invalid scope in reference to member attributes of (object)null
at _run (C:\MSR\reactor\common\lexp.js:1449:31)
at _run (C:\MSR\reactor\common\lexp.js:1443:33)
at _run (C:\MSR\reactor\common\lexp.js:1443:33)
at _run (C:\MSR\reactor\common\lexp.js:1536:38)
at _run (C:\MSR\reactor\common\lexp.js:1480:33)
at C:\MSR\reactor\common\lexp.js:1283:29
at Array.forEach (<anonymous>)
at _run (C:\MSR\reactor\common\lexp.js:1282:28)
at run (C:\MSR\reactor\common\lexp.js:1663:22)
at Object.evaluate (C:\MSR\reactor\common\lexp.js:1699:20)
[latest-22118]2022-05-02T22:33:12.232Z <Engine:NOTICE> Reaction Engine running!
[latest-22118]2022-05-02T22:33:12.233Z <Rule:INFO> Rule#rule-kxjp2el2 (Mode DAY) started
[latest-22118]2022-05-02T22:33:12.234Z <Rule:INFO> Rule#rule-kxjp7kc8 (Mode EVENING) started
[latest-22118]2022-05-02T22:33:12.234Z <Rule:INFO> Rule#rule-kxjparz7 (Mode NIGHT) started
[latest-22118]2022-05-02T22:33:12.234Z <Rule:INFO> Rule#rule-kxjpd0d6 (Mode AWAY ∆) started
[latest-22118]2022-05-02T22:33:12.235Z <Rule:INFO> Rule#rule-kxjqrcr9 (Mode PARTY) started
[latest-22118]2022-05-02T22:33:12.235Z <Rule:INFO> Rule#rule-kxjqyhnu (Mode VACATION ∆) started
Finally, if I return the expression and press the Try This Expression button, it is executed and the error disappears.
102e5013-b9aa-4c26-98f5-1ae545f8897f-image.png
This situation started to occur on the latest version of Reactor 22118, on a Windows 10 Bare Metal installation. Does anyone have a similar scenario?
Sorry for the long post, I tried to document as best as possible to try to identify the problem.
Thanks.