Glue lock in HASS?

Hi!
I have not seen that so far, but on another rest sensor that this happens from time to time.
I solved that with a automation that reload the rest-sensor if the sensor state become unavailable.
So in your case should be something like this:

Trigger:

platform: state
entity_id: sensor.hallway_front_door_lock_last_event
to: unavailable

reload rest:

service: rest.reload
data: {}

Call service to update rest sensor:

service: homeassistant.update_entity
data: {}
entity_id: sensor.hallway_front_door_lock_last_event

Give it a try an see if it helps to avoid getting that state.

Awesome. Happy to share how I got the template lock setup with the sensors to add battery levels (and alert). I then exposed that to Homekit to so I can control it via the Apple Home app etc (and add as an actual lock to Home Assistant dashboards and not a switch).

Thanks for this! So I added an extra with to the template (meaning if the sensors go unavailable / blank) the lock status is still “true”, then it doesnt unlock itself. I tested it by adding the extra bits to the template and then cut off internet access via my router.
Saw the state change in HA logs, and the locked stayed locked (phew!). Template below

value_template: “{{ is_state(‘sensor.hallway_front_door_lock_last_event’, ‘remoteLock’) or is_state(‘sensor.hallway_front_door_lock_last_event’, ‘manualLock’) or is_state(‘sensor.hallway_front_door_lock_last_event’, ‘’) or is_state(‘sensor.hallway_front_door_lock_last_event’, ‘Unknown’)}}”

I just want to say Tack Bengtj!
I can confirm bengtjs solution is still working, including creating api key.

1 Like

I agree… I was able to curl from my firewall and open the lock with a single command. Cool.

But… this requires a curl to the cloud which then communicates to the lock and thus unlocking it.

Is it not possible to curl directly to the lock being independent of the cloud?

If not with Glue lock then maybe another lock?

Regards, Lars.

Unfortunately not. The lock is actually bluetooth enabled, but no integration yet, otherwise you could have HA connect directly via bluetooth and communicate offline only.

There are plenty of other locks with integrations out there. Depends on what you are looking for. Good luck!

I am primarily looking for something that works with my front door. Bought the Danalock, but it really never worked.

Cortrolled via Bluetooth could be the way. How to do this?

Can HA be programmed so that when i unlock one door, the other 3 doors will unlock too ?
my house has 2 doors and the guesthouse has 1 that i want to have unlocked at the same time the front door unlocks. It would be a pain in the ass if i forget the phone when i go to the guesthouse and finds out thats its locked.

I don’t think HA has an official Integration. You could search the forum for Danalock to see if someone has created a custom integration.

Sure. If you have all locks integrated in HA, I am sure a simple automation to unlock all locked doors, if one of the three doors is unlocked, would be simple enough.

Hej!

So, I guess you have recently updated HA and seen command line in YAML will no longer work from 2023.08 for the switch…

Have you taken a look at this? I will have a look also and post what I find in this thread.

I haven’t updated hass for a while. Thanks for the heads-up, please share you findings…

So it seems like, from what I can see, nothing needs to change.

Under the last breaking change for 2023.6 you can see the below for “Command Line”

The Command Line integration changes its YAML configuration format from an old-style platform configuration to a more modern integration-style configuration format.

For example, if you have a binary sensor configured previously as:

Example configuration.yaml entry

binary_sensor:

  • platform: command_line
    command: “cat /proc/sys/net/ipv4/ip_forward”
    YAML
    That same binary sensor is now configured under the command_line integration configuration as:

Example configuration.yaml entry

> command_line:
>   - binary_sensor:
>       command: "cat /proc/sys/net/ipv4/ip_forward"

YAML
Note: While this is currently not yet a breaking change, it did raise questions during our beta testing period. Hence we have added this as a breaking change to provide more context.

It seems for now based on your solution nothing changes as it is already correctly formatted.
However, still not 100% sure if the “Repair” note:

Command Line YAML configuration has moved

This stops working in version 2023.8.0. Please address before upgrading.

Configuring Command Line switch using YAML has moved.

Consult the documentation to move your YAML configuration to integration key and restart Home Assistant to fix this issue.

is related to the same.

Thanks for the info!

Sounds like it may work without any change. If not it should not be that big of a difference.

Maybe I should upgrade prior to 2023.8.0 just to be safe :slight_smile:

Anyone using this solution recently been facing issues with the API call?

Been getting errors in the log like below:

Timeout while fetching data: https://user-api.gluehome.com/v1/locks
Empty reply found when expecting JSON data

Mine is still working (used it today) I have used Bengtj guide.

Thanks. Seems like I don’t get them anymore. Perhaps the API calls were failing for some other reason.

FYI - För some reason after the December HA updates the original command switch creation in a switch.yaml stopped working. Moving command switch to config.yaml works fine (friendly_name: has been deprecated, you need to use name:")

Is this still working? Would be great to know before I take the time to try it :sweat_smile:

yes it stil works for me, but I have installed it long time ago.