Tested on Windows 10, Windows 11 and Ubuntu Desktop 20.04
home/room/pc/audio/volume/set- set volume,0-100home/room/pc/audio/mute/set- set mute,0 or 1
Publish to:
home/room/pc/audio/volumehome/room/pc/audio/mute
home/room/pc/clipboard/set- copy text to system clipboard
Read file commands.yml (see commands.example.yml), subscribe to topics, execute commands via exec module.
Watch for changes in directories and send notifications.
home/room/pc/exec/cmd 'shell cmd'- simple execute command with arguments in system shellhome/room/pc/exec/cmd/silent 'shell cmd'- execute command without notificationshome/room/pc/exec/cmd '{"cmd" "shell cmd", "silent": true}'- execute command without notificationshome/room/pc/exec/cmd '{"cmd": "shell cmd", "success_tts": "Success", "error_tts": "Error"}- execute command with tts feedback. You can define default tts feedback in config. Setsuccess_tts: 'stdout'for answer with command outputhome/room/pc/exec/ssh user@host- open ssh terminal
Watch for changes in files and send notifications.
home/room/pc/gpt/ask- send request to GPT
Publish to:
home/room/pc/gpt/answer- get answer
home/room/pc/keys/press- press a single key, you can pass several keys, space delimetedhome/room/pc/keys/type- type a string
Keys:
f1-f12enter, escape, tab, space, backspaceup, down, left, righthome, end, insert, delete, pageup, pagedowncontrol, shift, alt, commandaudio_prev, audio_next, audio_pause
Modifiers control|ctrl|^, shift, alt, command|cmd|win can be used: (ctrl+alt+win)t
Examples:
(win)x up up right down- suspend for Windows 10
Binds midi signals to exec or mqtt actions.
home/room/pc/mouse/click- click button,left|right|middlehome/room/pc/mouse/point- move button tox,y, optional click and mouse backs, example:400,200,left,1home/room/pc/mouse/get- get current mouse position
home/room/pc/notify/notify 'message'- simple notifyhome/room/pc/notify/notify '{"title": "title", "msg": "msg", "app": "Planfix", "icon": "/path/to/planfix.png", "actions": ["OK"]}'- full notifyhome/room/pc/notify/clear 'msg text'- clear notify on Android (for MacroDroid), you must defineconfig.modules.notify.clearNotificationWebhookfor this
Commands:
home/room/pc/obs/rec- start recordinghome/room/pc/obs/stop- stop recording
Events:
home/room/pc/obs/state/rec- change recording state
home/room/pc/reaper/record- start recordinghome/room/pc/reaper/stop- stop recordinghome/room/pc/reaper/play- start playinghome/room/pc/reaper/stop- stop playinghome/room/pc/reaper/prev- go to previous trackhome/room/pc/reaper/next- go to next trackhome/room/pc/reaper/loop- toggle loop
Send browser tabs stats to MQTT. Requires browser extension chrome-tabs-exporter.
tts- TTS received message
Voice activity detection (VAD) using silero-vad.
home/room/pc/vad/speech- 0/1, speech detectedhome/room/pc/vad/start- starthome/room/pc/vad/stop- stop
home/room/pc/windows/autoplace- autoplace windows with confighome/room/pc/windows/place '{"window":"current","fancyZones":{"monitor":1,"position":6}}'- place window with ruleshome/room/pc/windows/store- store opened windowshome/room/pc/windows/restore- restore windowshome/room/pc/windows/clear- clear storehome/room/pc/windows/open '{ "apps": ["c:\\app1.exe"], "paths": ["d:\\prog"] }'- open storehome/room/pc/windows/focus '{ "titleMatch": "blog.popstas.ru" }'- focus window by titlehome/room/pc/windows/restart- restart PC,nostorefor just restart, other payload for store opened windows
It's using module, https://github.com/popstas/windows11-manager, Vitrual desktop manager work only for Windows 11 now, as I am single user.
- Keyboard and mouse emulation not work while
windows-mqttrunning as Windows service. - Process not kill when exit
-
Copy config.example.yml to
config.ymland update MQTT credentials and module settings for your environment. -
This script will install Windows service "windows-mqtt":
git clone https://github.com/popstas/windows-mqtt
cd windows-mqtt
npm install
npm run install-windows-
For TTS setup you should install
gTTS(Python) andmpg123, see popstas/mqtt2tts. -
When building desktop apps, make sure
config.ymlis present in the project root. Both Electron and Tauri builds package this file so the tray apps read the same configuration as the headless server.
- Copy src/modules/_module.js to
src/modules/yourModuleName.js - Add module options to
modules.yourModuleNameobject insrc/config.js
Module will receive as config variable.
Module should return list of subscriptions on MQTT topics:
return {
subscriptions: [
{
topics: [
config.base + '/status',
config.base + '/status/get',
],
handler: onStatus
},
]
}The project includes both Electron and Tauri tray launchers. Both keep the main window hidden while exposing a tray icon for quick access to controls, but they differ in runtime requirements and packaging outputs.
- Start the Electron tray app with
npm run start-electrononce dependencies are installed. - Portable builds are produced with
npm run build:dist(Electron Builder), which places artifacts underdist/(for example, a portable.exewhen building on Windows). - Electron uses the HTML UI from
index.htmlfor its tray popover and ships assets from theassets/folder via electron-builder configuration.
- Install the Rust toolchain (for example,
curl https://sh.rustup.rs -sSf | shon Unix-like systems or the Rust installer on Windows) and install the Tauri CLI (npm install -g @tauri-apps/clior use the local dependency vianpm run start-tauri). - Run the Tauri development tray with
npm run start-taurito launch the native system tray while keeping the window hidden unless explicitly shown. - Build release bundles with
npm run build:tauri; Tauri outputs installers and executables undersrc-tauri/target/release/bundle/(for example,.msiand.exefiles on Windows). - Extra files are bundled from
src-tauri/tauri.conf.jsonundertauri.bundle.resources. The current configuration includesconfig.yml,config.example.yml,commands.example.yml,data/**, andsrc/**. Add new paths there to ship additional assets with the Tauri build. - Tauri uses the native system tray instead of the custom HTML popover used by Electron, so tray menus and balloon behaviors follow the host OS conventions.