Presence detection works sometimes

This is the rule to lock the front door when we both leave

Sometimes that works and I see this on the dashboard

Several days go by, nothing changes and when we leave this is the dashboard

My question is why when Tom and Lynn are both not present, and the dashboard agrees we are not present, sometimes the front door does not lock?

When the front door does not lock, I remotely lock it after a few minutes have elapsed.

Logs, or perhaps the lack thereof, for your rule would give you a better picture. But just guessing without those: the rule needs an event to trigger. If your presence sensor went wonky and never showed you as arriving, there will likely not be an event when you go away again. No event, no trigger, and that means no actions. The other possibility is that your contact sensor isn't working and the rule thinks it's open (because that's what it reports to the hub) at that time. Logs would show when the required expression changes as well.

If the presence thing is what's doing, it the "Events" tab on the device detail page for your presence sensor devices will show recent event history. This may be helpful, though "Logs" may also have some information if descriptionText (info/event) logging is enabled for the devices.

1 Like

The front door contact sensor reports closed on the dashboard when the lock does not lock.

Debug logging and descriptive text logging are on.

The last time the door did not lock was 09/06/22 at 2:46 pm

The logs stop at 09/08/22 so no log for that time.

The event log has entries before and after that time but nothing at that time.

Will monitor and report back with logs the next time it happens.

Thanks

We left the house this morning around 10:36 and the door did not lock so I locked it remotely.


(Lynn is the same)

Here is where I locked it remotely. When we got home the door was locked so I entered the code to lock it manually.

Here is the log for the front door lock

Hopefully this will help diagnose the issue.

Next would need to be the logs from the rule itself. The device didn't get a command when you left...the question is whether or not the rule ever triggered and sent it in the first place.

1 Like

I did not have logging enabled for the rule. Will report back the next time it hiccups.

1 Like

Here is the log from the front door lock. The rule ran as expected.

dev:21752022-09-10 07:15:52.696 pm infoFront Door Lock was locked

dev:21752022-09-10 07:15:52.693 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 20 01 020DFFFF000000000000, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:20, direction:01, data:[02, 0D, FF, FF, 00, 00, 00, 00, 00, 00]]

dev:21752022-09-10 07:15:52.693 pm debugparseAttributeResponse: [raw:AD100201010800003001, dni:AD10, endpoint:02, cluster:0101, size:08, attrId:0000, encoding:30, command:0A, value:01, clusterInt:257, attrInt:0]

dev:21752022-09-10 06:48:34.108 pm debugparseAttributeResponse: [raw:AD100201010800003002, dni:AD10, endpoint:02, cluster:0101, size:08, attrId:0000, encoding:30, command:0A, value:02, clusterInt:257, attrInt:0]

dev:21752022-09-10 06:48:34.106 pm infoFront Door Lock was unlocked by manual

dev:21752022-09-10 06:48:34.102 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 20 01 020EFFFF000000000000, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:20, direction:01, data:[02, 0E, FF, FF, 00, 00, 00, 00, 00, 00]]

dev:21752022-09-10 06:48:04.294 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 01 01 00, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00]]

dev:21752022-09-10 06:48:04.289 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 01 01 00, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00]]

dev:21752022-09-10 06:48:01.135 pm debugunlock()

dev:21752022-09-10 06:04:46.585 pm debugparseAttributeResponse: [raw:AD100201010800003001, dni:AD10, endpoint:02, cluster:0101, size:08, attrId:0000, encoding:30, command:0A, value:01, clusterInt:257, attrInt:0]

dev:21752022-09-10 06:04:46.568 pm infoFront Door Lock was locked by digital command

dev:21752022-09-10 06:04:46.564 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 20 01 0101FFFF000000000000, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:20, direction:01, data:[01, 01, FF, FF, 00, 00, 00, 00, 00, 00]]

dev:21752022-09-10 06:04:44.720 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 00 01 00, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:01, data:[00]]

dev:21752022-09-10 06:04:44.685 pm debugparseCommandResponse: [raw:catchall: 0104 0101 02 01 0040 00 AD10 01 00 0000 00 01 00, profileId:0104, clusterId:0101, clusterInt:257, sourceEndpoint:02, destinationEndpoint:01, options:0040, messageType:00, dni:AD10, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:01, data:[00]]

dev:21752022-09-10 06:04:42.073 pm debuglock()

dev:21752022-09-10 02:30:54.146 pm infoFront Door Lock battery is 100

When the rule does not run I will reply with the log.

I can’t find the log for the rule. Not in logs. All 3 boxes are ticked under ‘logging’ in the rule.

That's interesting. I wonder if the rule is somehow borked up.

2 Likes

Good idea. I will delete the rule and create another one. Thanks! I hadn’t thought of the rule itself being the cause.

1 Like

When you recreate you rule, I suggest you add some manual log statement. I like it better than logging all actions.

For example you can log w when the rule was triggered and include the state of devices all in one log statement. It makes it a little easier when review the logs.

Now you are talking over my head.

I made a new rule that did not include the front door sensor. No need to clutter it up yet.

1 Like

It is working great now! The rule was broken, so that explains why sometime it worked.

Many thanks.

3 Likes

Nice you got it working.

Re: manual logging, I just meant that you can explicitly add log statements in your rule. I haven’t done it here but you can also include local or global variables so the values at the time the rule was executed get written into the log.