Incorrect state reported via MQTT

I just set up MQTT for my local home assistant installation.
after having some problems getting lock/unlock commands to work via the home assistant UI, I noticed the reason:
whenever I unlock the door (either through the android app or through MQTT), the correct states are reported but immediatelly followed by a new state = 1 update, telling home assistant that the door is suposedly now locked again

I have physically confirmed that the door is unlocked, and the mobile app shows as such

here’s a screenshot of mqtt events. at 2:50 I locked the door. at 2:51 I unlocked it:

1 Like

Is there a similar “locked” entry present at 2:51 within the Smart Locks activity log?

hadn’t though to check that! las entry shows “Unlocked”, while mqtt has two quick 3 → 1 states, ending up as locked

however, when checking this I did notice something new: the main screen on the mobile app also changes to “locked” after a delay of about 5-10 seconds

so I’m now in a state where the mobile app says it’s locked, but the mobile app’s own activity lock says it was unlocked

I’m not at home right now, so I can’t check what it looks like physically. will do so later today
could this somehow be a calibration issue?
I remember I had to re-calibrate the lock a few days ago because it started acting up weirdly all of a sudden (probably since I had to charge it, although I’d guess that’s a coincidence)

Yes this sounds like something with the calibration is off.
Try to recalibrate it and if necessary disable any locking optimizations (shorted lock distances) if enabled.

Just did actually. Re calibrated (more than once), played around with the rotation settings, same behaviour

Every time I unlock, the door is physically unlocked, and stays there, but mqtt and the mobile app quickly revert to showing a locked state

I can try messing around with settings a bit more tomorrow. Would a video help?

A bit of a long shot, but could this be something about the mechanics of my door? It’s a bit of a flimsly one, and has some rubber between the frame that adds some pressure while closed

I’ll contact you via DM to exchange further details.

turns out I may have figured it out (not sure how stable this will be long-term)

it was a mix of two problems:

  • I had mistakenly understood that calibration should be done not just with the door unlocked, but also open. to be honest this seems like a bad choice on your app’s design, and also lack of docs. the graphic during the calibration step shows an door that’s actually wide open. and when trying to find an FAQ or forum question about this, I found nothing. all I could find was chatgpt telling me it was suposed to be closed, but that may as well have been an allucination. still this one is on me too

  • secondly, the rubber in my door was indeed messing with the calibration. it seems calibration ends at a position equivalent to the “Unlatch” option, which mean the door could no longer close after that, and perhaps calibration was messed up. by physically pushing the door with my hand during calibration, that now worked, and after multiple lock/unlock cycles, seems to be stable

anyway, if this comes back, it’s clearly no longer a problem for the developer forum. thanks again!

1 Like

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