Lock unlocks at sunrise

Recently the lock on my shed has started to unlock on sunrise. I have no rules what so ever with sunrise/sunset and the lock. It doesn't happen every day, and I can't find any pattern.
Before it was only the attribute of the device that changed to unlocked. Physically the lock was still locked. But today the lock indeed unlocked.
The rules I have for this lock only has the action LOCK. No unlocks..

The lock is homemade with a ESP8266. I've had this lock for a year or so without any previous issues. First i thought that maybe there was a bug within the lock itself. But then I saw that it always unlocks at exactly the same time as sunrise in the hub.. So it must be a command sent from the hub to the lock.

The log gives no clues at all of what happened. It just says sunrise and then lock unlocked..

I had a similar bug a while ago with bulbs that turned on when they wasn't supposed to. That time it was a broken HSM rule that was the problem. But I don't have any HSM rules with this lock..

Can it be a broken rule in rule machine? Even though there is no rules that unlocks the lock?

(It sure would have been nice with more detailed logs like in Smartthings. "lock was unlocked by...")

This would really be nice. Do you have any other integrations that could be responsible? Alexa routine, for instance? Alexa hunches ought not to touch a lock, but maybe make sure that's off as well?

2 Likes

Check the list of apps your lock is used by from the lock’s device page.

Also, what driver are you integrating this lock into Hubitat with?

2 Likes

If it is a homemade lock based on an ESP8266, it may well integrate with Hubitat as a switch/actuator …. it would be nice to know what driver the OP is using.

2 Likes

Yeah exactly...

Any Alexa or Google Home devices in the mix? If so look for Hunches turned on and/or any new routines…

1 Like

The lock isn't integrated to either Alexa or Google Home.

The device is used in 3 rules. None of them triggers on sunrise/sunset.
It is also in two maker api instances. One for my Home remote dashboard and one for tasker in my phone, but there is nothing in any of them that makes any action automatically on any changes.. The only actions on the lock is by manually pressing buttons.

One option would be to disable the device in Hubitat (using the “disable” red checkmark on the left of the device name in the device list). This will stop any communications from Hubitat. If the lock still locks after this has been done, you know that something else is the culprit. If it doesn’t for a couple of days, then something in Hubitat (most likely an app/rule) might be causing this.

4 Likes

ESP8266 Is WiFi connected? Could it be losing connectivity, and during reconnect it initializes to Unlock? Sunrise perhaps coincides with a temp increase? Yes, really, really grasping at straws...

2 Likes

It’s a new “Purge” lock…

Yes it is wifi connected. But I've programmed it to always lock on boot. And if it looses connection it does nothing.
At first I was also suspecting that it was the lock that was failing. But since it only happens exactly at the same time as the hub says that it is sunrise it must be something sent from the hub. It is weird and doesn't make any sense..

The annoying thing is that it doesn't follow any pattern. One week it happened three days in a row. Then it didn't happen for a week or so. Then it happened only one day and so on. I think that before today it was two weeks or more since last time. But today was the first time the lock was actually unlocked. The other times it was only the attribute of the device that changed to unlocked and the lock stayed locked.

1 Like

Could you post a link to the driver for this lock?

I've added a new attribute to my driver which only updates when lock() or unlock() is executed. So if the lock changes state physically none of these commands will be executed and then this attribute will not be changed. In this way I should be able to pin down if this is caused by Hubitat or something else.

1 Like

I am using the HubDuino driver.

1 Like