About
Home Automation is mostly, as the name implies, about automation.
The machine you're in front of all work-day has an awful lot of useful information that can be useful in your home management.
I have a script lower my blinds if I turn on the camera during the afternoon as otherwise there's an annoying glare. My office lights and monitor both have a redder hue at night, but disabling night-mode on my PC automatically disables the main light performing redshift too. I want my screen to turn off not 10 minutes after activity, which is simultaneously both annoyingly too long and too short, but the moment the motion sensor in my room says I've left.
Home Assistant, the best open source home automation tool out there supports all of this, but it needs some hooks for the PC to tell it about the current state and invoke actions on the PC.
None of the existing solutions worked well for what I wanted. I wrote something for personal use a few years ago that worked great for me, I ran it in the background and didn't plan to take it further.
During the KDE Goals sprint another user suggested creating something very similar (https://phabricator.kde.org/T17435). That goal may not have been chosen, but it did motivate me to tidy up and document what I had and turn it into a more fleshed out project.
The App
I made a small daemon, named Kiot (derived from "KDE Internet of Things") that exposes this information to your Home Automation software.
This is pre-alpha software, there's no GUI configuration it relies on manually setting up a configuration file to point to your Home Automation server. If there's enough traction I might make it more packagable, and create a UI config over the Christmas break.
There's a bunch of sensors and actions shipped, but it contains a faux plugin system to make extension easy along with hooks for user supplied scripts.
- User activity
- Locked state
- Suspend/Power actions
- Camera in use
- Accent Colour
- Arbitrary Scripts
- Shortcuts
- Nightmode Inhibition
Using this from Home Assistant is then as straightforward as possible.
Checking it out
The repository can be found at https://github.com/davidedmundson/kiot which has setup instructions along with developer documentation (https://github.com/davidedmundson/kiot/blob/master/DEVELOPMENT.md) if you want to make any additional plugins.