Replies: 1 comment
-
Nevermind, I've figured it out. I'll just make a new service that will run on its own thread, and I'll be using a BSD Socket for that as it makes the most sense in this case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm struggling with something. I'm looking to add some code on top of your project to be able to control physical locks, and also keep the real status in sync. I'm looking to make it a bit more generic, so it would then be easy to control any lock that has a compatible interface (such as a cli command) to lock/unlock/getstatus.
Just for proof of concept, I'm using a file in
/dev/shm
(so in ram) updated to the target status from bothset_lock_target_state
andon_endpoint_authenticated
. This part was easy. Just write the value to the file, done.I now want to also monitor another file, also in
/dev/shm
, that is keeping the real status of the lock, which for example can be altered from the physical knob on the lock itself, or a button on the device itself.For that I'd use an already running loop from your project, but can't really find the best place.
I'm also thinking of setting up another loop on another thread that monitors this file and then if a change is needed on the homekey part, I'd just call
set_lock_target_state
so it would update the status in homekit as well.For the sake of argument for this POC, the files would then be read and written to from an external program that would drive and poll the status for the physical lock.
Of course this can be expanded to work over the network with mqtt or whatever, but just want to get this POC going first.
How do you recommend to proceed?
Thanks a lot for this wonderful project!
Beta Was this translation helpful? Give feedback.
All reactions