Skip to content

Use your zigbee2mqtt devices to control your pc. Maps a button from device to a keyboard key or key combo.

Notifications You must be signed in to change notification settings

hkfuertes/z2m-mqtt-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zigbee2mqtt keyboard

Simple script that connects to the mqtt topic of z2m and listens for actions and converts them to key strokes.

Example config file

You can look for the special characters list here. The devices keys (the names) have to mach the names in zigbee2mqtt. If an action is not mapped, the terminal will reply the name of the action so that it can be mapped.

{
    "connection": {
        "host": "",
        "port": 1883,
        "username": "",
        "password": ""
    },
    "devices": {
        "IKEA_RODRET": {
            "on": "media_volume_up",
            "off": "media_volume_down",
            "brightness_move_up": "media_volume_mute",
            "brightness_move_down": "media_play_pause"
        },
        "IKEA_5BUTTONS": {
            "toggle": ["cmd", "shift", "m"],
            "brightness_down_click": "media_volume_down",
            "brightness_up_click": "media_volume_up"
        }
    }

}

Usage

To run outside a virtual environment, skip the first 2 commands:

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py

About

Use your zigbee2mqtt devices to control your pc. Maps a button from device to a keyboard key or key combo.

Topics

Resources

Stars

Watchers

Forks

Languages