Lock code manager over MQTT?

Hi,

I am trying to have the Lock Code Management of my Shlage Encoded smart locks to be handled through Home Assistant over MQTT. The goal is to have Hubitat acting as a connectivity enabler and handle everything in HA.

I can successfully manipulate the lock itself (lock on/off, get battery level) from HA using this app:

Now I want to manage the codes:

  • Get lock codes
  • Set a code (slot + PIN)
  • Rename a code
  • Delete a code
  • Receive events when codes are changed on the lock

I have the Lock code manager on Hubitat doing it just fine, trying to expose those functionalities over MQTT for an external system to give the order.

Thx

Is there any reason you can't use Maker API instead of MQTT? I don't use HA, but I assume (and vaguely confirmed with a search) that there are one or more Hubitat integrations for HA that connect via Maker API.

Maker API already exposes all the commands and can push the status updates you need. I'm using the NodeRED nodes for Hubitat which connect via Maker API, and I can get the lock codes, set a code, and delete a code using those nodes. There is no 'rename' command, but that is just some logic to delete a code and add back a code in the same slot with the new name.

I don't use NodeRED to control my lock codes, but I just did a test and confirmed that using Maker API I was able to get the codes, add a code, and then delete a code from one of my locks.

2 Likes

It s good question.
My architecture is event based and marker api is point to point integration (rest api).
I got other subscribers/publishers so i want to keep that in place.

Control each lock directly over MQTT. There's no need to use LCM, which is not exposed to MQTT.

not sure to understand what you say. I have already enabled my locks over MQTT, i can lock/unlock, get battery level, etc...

I want the ability to administrate the codes through MQTT orders that would be sent to Hubitat from Home assistant or any other Device manager I have.