HSM status not working as required expression on Rule Machine

I am using RuleMachine with HSM status as required expression to trigger on event of some contact sensors opening like below

Required Expression
HSM Status is Armed Away OR HSM Status is Armed Night
Triggers
Contact Sensors Open
Actions
Send notification
Switch ON Siren

I have Rule Machine automation to set HSM status to Night or Away and to also to Disarm.
The problem I am seeing here is, when HSMT Status becomes Night or Away the Rule Machine sees the required expression as True right away and all my triggers work as expected, however, when my Disarm automation runs, the HSM status becomes Disarm but required expression for this rule doesn't become False, and my triggers continue to trigger. When I come to dashboard and go inside the rule, I see the required expression as False, come back out and everything becomes as it should be, False.

This happened only when I went inside the Rule to check
2022-06-03 07:21:46.928 am [info] Initialized
2022-06-03 07:21:46.840 am [info] init: Required Expression now false

This happened automatically and HSM status was Disarmed
2022-06-03 07:00:00.567 am [info] Disarmed
2022-06-03 07:00:00.478 am [info] Action: HSM Disarm
2022-06-03 07:00:00.387 am [debug] off()
2022-06-03 07:00:00.323 am [info] Action: Off: Foyer Light
2022-06-03 07:00:00.239 am [info]Triggered
2022-06-03 07:00:00.206 am [info]Event: Triggered at Certain Time

This happened automatically when HSM status became Armed Night
2022-06-02 09:53:43.165 pm [info] init: Required Expression now true
2022-06-02 09:53:43.161 pm [info] Event: hsmStatus armedNight
2022-06-02 09:53:42.961 pm [info] Armed Night
2022-06-02 09:53:42.931 pm [info] Setting the Hubitat Safety Monitor Mode to (armNight)...

Welcome to the community... let's see if we can get some folks to help you out.

Curious first to know why you have a rule doing this when you can just use HSM itself to send a notification and turn on the siren? Is there additional functionality the rule provides that HSM doesn't?

It's helpful to have a screen shot of the rules and the log entries. Makes them easier to read.

I would post a screen shot of the rule, logs, and hub events maybe, and tag @bravenel he prefers screen shots)

this is a great question indeed - default HSM intrusion lets me check states of contact sensors, it doesn't allow to check states of what it considers as doors. I did set-up a custom HSM rules for my doors, but they seem to work sometimes and don't work sometimes.
My goal is, when the HSM status is armed away or armed night, all my external doors and contact sensors should be able to trigger event and blow siren, send notification etc. I am more than willing to try if there is a simpler way than me using the Rule Machine for this purpose.

I get error while adding screenshots, hence I had to (painstakingly) write them up

correction - HSM doesn't allow to chose what it considers "Lock", only allows contact sensors to be chosen as trigger devices.

@bobbyD can you give @mkp the permissions to post screen shots?

1 Like

@mkp This is a known bug, fixed in the upcoming 2.3.2 release.

3 Likes

Done!

Ah ok. I'm trying to think of a use case where I would use a lock status to trigger HSM. I do the opposite... I use HSM status to trigger a lock, as in if I arm the system away please lock all the doors.

1 Like

yes, so that's my Rule Machine rules, every night -> lock all doors, close garage, set HSM to Armed Night and as part of this I want HSM arm night to also monitor any of these locks to open, This works for contact sensors but not for locks.
With my current setup, I am using HSM for contact sensors and rule machine for doors with HSM state as pre-condition. This works too, mostly, during arming, but not always during disarming, everything disarms but Rule Machine still somehow has pre-condition true, which is not, and when I go inside rule, everything becomes as it should be.

@bravenel 2.3.2 of the firmware?

I need to see screenshots of the logs that show this sequence of events, and also of the rule. Can't tell from what you've said...

This is rule in question - called Intrusion

These are the logs - you can see at the bottom, it trigger my Good Morning Rule (screenshot at below) @ 7AM but 7:51AM Intrusion rule was triggered

@7:53 I went to dashboard->apps->rules->entered into the Rule Intrusion, and then it sees the precondition as false

Rule - Good Morning

HSM

Known bug, HSM Status in Required Expression doesn't work right. Fix in next release.

2 Likes

this has been working absolutely fine in this rule though

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.