Hacker News new | ask | show | jobs
by nucleardog 2046 days ago
So, short answer: an MQTT client. On lock/unlock I have a MQTT client called to publish a message to a topic. I think I'm using HiveMQ's mqtt-cli because it was the most immediately obvious option for my OS.

Working out from there:

* I use Windows as the host OS for my desktop. You can use Task Scheduler to set a task to run on lock/unlock. I have jobs set that mute/unmute my audio and call a MQTT client to publish the messages to the broker.

* Those messages are picked up by Node-RED. It's a ladder-logic-ish environment for automation. It has flows that control all the bits of logic based off of all the various data sources including MQTT.

* Node-RED calls Home Assistant, which handles providing a UI as well as actual integration with all the various bits of hardware (light bulbs, z-wave controller, etc)

I quite enjoy this stuff (which is probably half of how I got here), so feel free to ask if you've got follow-up questions.