- About
- Setup
- Configuration
- Supported Features
- Flatpak Build
- Future Development
- Project Structure
- Contributing
- Troubleshooting
- See Also
Kiot (KDE Internet Of Things) is a background daemon that exposes useful information and actions from your local desktop session to a home automation controller like Home Assistant.
Important: Kiot does not directly control smart home devices. Instead, it exposes desktop state information to your home automation controller, allowing you to create automations there. For example:
- If you want a light to turn on when your PC enters "Do Not Disturb" mode, Kiot exposes the "Do Not Disturb" state to Home Assistant, where you can create the automation to control the light.
- David Edmundson
- Odd Østlie
This is pre-alpha software suitable for users comfortable with:
- Compiling software from source
- Editing configuration files manually
- Testing early-stage software
The fastest way to install dependencies and build Kiot is using the interactive helper menu:
chmod +x helper.sh
./helper.shEnsure you have these packages installed:
cmakeextra-cmake-modulesqt6-baseorqt6-base-devqt6-mqttorqt6-mqtt-devbluez-qtorlibkf6bluezqt-devpulseaudio-qtorlibkf6pulseaudioqt-dev
Note: Package names may vary slightly depending on your Linux distribution. If packages aren't available through your package manager, you may need to install them manually.
-
Clone the repository:
git clone https://github.com/davidedmundson/kiot.git cd kiot -
Build and install:
mkdir build cd build cmake .. make sudo make install # May require sudo privileges
-
If you encounter missing dependencies during the build process, install them using your distribution's package manager.
Home Assistant must have MQTT server enabled. See the Home Assistant MQTT documentation.
Create a configuration file at ~/.config/kiotrc with the following content:
[general]
host=some.host
port=1883
user=myUsername
password=myPasswordNote
If Kiot is running and you change the configuration, you must restart Kiot for changes to take effect.
host: Your Home Assistant local addressport: 1883 (default)userandpassword: Credentials of a Home Assistant user (recommended to create a dedicated MQTT user)
host: IP address where the MQTT broker is accessibleport: 1883 (default)userandpassword: Credentials configured for your MQTT broker
On the Home Assistant side, everything should work automatically with MQTT discovery. After configuring Kiot, try rebooting Home Assistant, then launch the kiot program to see if everything connects properly.
More in depth examples can be found here examples
[general]
host=192.168.1.100
port=1883
user=mqtt_user
password=secure_password
tls=false
autostart=false
discoveryprefix=homeassistant #For auto device detection in home assistant use default [Scripts][launch_chrome]
Name=Launch Chrome
Exec=google-chrome
[Scripts][steam_bigpicture]
Exec=steam steam://open/bigpicture
Name=Launch steam bigpicture
[Scripts][youtube_studio]
Exec=brave --new-window "https://studio.youtube.com"
Name=Launch YoutubeStudio
icon=mdi:youtube-studio
#icon is optional, defaults to "mdi:script-text" if not set[Shortcuts][myShortcut1]
Name=Do a thing
# Becomes available in KDE's Global Shortcuts KCM for key assignment
# Appears as a trigger in Home Assistant for keyboard-driven automations[CustomSensors][gpu_power]
name=Gpu power draw
command=nvidia-smi -q -d POWER | grep "Instantaneous Power Draw" -m 1 | cut -d':' -f2 | cut -d' ' -f2
device_class=power
# Interval syntax is like the systemd time span syntax (man systemd.time).
# NOTE: Some units are deliberately not supported (microseconds, milliseconds, weeks, months, years).
# NOTE: Only whitespace-delimited style is supported (e.g. "1m 30s", not "1m30s").
# Examples: "10s", "1m 30s", "2h". A bare number is in seconds. Defaults is 10s.
interval=10s
state_class=measurement
unit_of_measurement=W
[CustomSensors][cpu_power]
name=Cpu power draw
command=bash -c 'F=/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj; E1=$(cat $F); sleep 1; E2=$(cat $F); awk "BEGIN {print ($E2 - $E1) / 1000000}"'
device_class=power
interval=1m 30s
state_class=measurement
unit_of_measurement=W[Integrations]
# This section is auto-generated and lets you enable/disable integrations
AccentColour=true
Active=true
ActiveWindow=true
Audio=true
Battery=true
Bluetooth=true
CameraWatcher=true
DnD=true
Gamepad=true
LockedState=true
Nightmode=true
Notifications=true
PowerController=true
Scripts=true
Shortcuts=true
Docker=true
AppLauncher=true
MPRISPlayer=true| Feature | Entity Type | Description |
|---|---|---|
| User Activity | Binary Sensor | Detects when user is active/inactive |
| Locked State | Lock | Screen lock state monitoring and control |
| Power Control | Button | Suspend, hibernate, power off, and restart |
| Camera Activity | Binary Sensor | Detects when camera is in use |
| Accent Colour | Sensor | Current desktop accent color |
| Shortcuts | Select + Device Trigger | Register custom shortcuts for HA automations AND trigger any Global shortcut via DBus |
| Night Mode | Binary Sensor | Night mode/blue light filter status |
| Active Window | Sensor | Currently focused application window |
| Audio Controller | Number + Select | Volume control and device/app selection |
| Battery Status | Sensor | Battery charge level and attributes |
| Do Not Disturb | Binary Sensor | DnD mode status |
| Gamepad Connected | Binary Sensor | Gamepad/joystick connection detection |
| Scripts | Button | Execute custom scripts |
| Bluetooth | Switch | Bluetooth adapter control and device connection management |
| Applauncher | Select | Launch applications from HA, scans for installed apps |
| CustomSensors | Sensor | Custom sensor integration with output from terminal command |
| Docker | Switch | Docker container control and status as attributes |
| MPRIS | Media Player | MPRIS media player control Custom Integration |
| Game Launcher | Select | Game launcher for steam/heroic/lutris/Faugus games |
| Notifications | Notify | Send notifications to KDE via MQTT |
| SystemD | Switch | Systemd user service control |
| DisplayManager | Number, Select, Switch | Screen control and management |
| Macro executor | Notify | Execute macros from HA via virtual keyboard README |
So let me start with saying experimental plugins are not included in the normal build and must be compiled by you. check the folder for more info Experimental
| Feature | Entity Type | Description |
|---|---|---|
| SendSpin | None | Turn your KDE session into a smart speaker for music assistant |
Flatpak installation is also supported:
Run
chmod +x helper.sh
./helper.shThen select option 3 (Flatpak build and install menu).
In the next menu select option 1 (Build and Install as user)
Or you can directly execute:
./scripts/flatpak.sh- Clone this repository
- Run:
This builds and installs Kiot as a Flatpak, automatically fetching all dependencies.
flatpak-builder build .flatpak-manifest.yaml --user --install --force-clean
- The Flatpak version does not autostart automatically
- Some integrations may have limited functionality due to Flatpak sandboxing
- Log files are stored within the Flatpak sandbox
Long-term, Flatpak distribution is the primary focus. The goal is to publish to Flathub once a user interface is implemented.
- Better Documentation - Needs to be updated for the new modular setup
As part of the modular rewrite of Kiot, the repository is organized into distinct, well-documented directories:
-
Core (
core/) – Contains the main binary logic, entry point, appdata/metadata generation, and custom logging. -
Shared (
Shared/) – Shared utility classes (PlatformHelper,DBusProperty) and foundational elements.- Entities (
Shared/entities/) – Core entity implementations required by all integrations to build and communicate with Home Assistant via MQTT.
- Entities (
-
Plugins (
Plugins/) – Some information about the plugins that Kiot supports. -
Examples (
examples/) – Detailed configuration files and inspiration.
Contributions are welcome!
- Test thoroughly
- Document new integrations
- Follow existing entity patterns
- MQTT Connection Failed: Verify credentials and network connectivity
- Missing Entities in Home Assistant: Check MQTT discovery is enabled in HA
- Permission Errors: Some integrations may require additional permissions
- Flatpak Limitations: Some system integrations may not work in sandboxed environment
- Check the configuration examples above, or for more in depth examples go here examples
- Review the Home Assistant MQTT documentation
- Examine system logs for error messages
- KIOT Core for information about the core bin part of the project
- KIOT Shared for information about the shared lib part of the project
- KIOT Shared/Entities for information about the shared lib entites part of the project
- KIOT Integrations for creating new integrations
- KIOT Examples for config examples and some inspiration
- KIOT Helper Scripts for information about the helper scripts