A tool for mapping buttons on our SHET-connected control panel to other parts of SHET.
Panel-O-Matic: A SHET client which provides easy configuration of keybindings for the button panel in our living room. Uses a custom configuration language using pyparsing.
Fairly quick-and-hacked with a few hard-coded variables where there shouldn't be but things should be mostly sensible.
Start this SHET client by running client.py with an argument of a directory containing .pom files. The directory pointed to will be monitored for any changes to any .pom files it contains and these files will be automatically parsed.
The basic format consists of several blocks like so:
MUSIC {
0 => /some/action;
34 => /some/property = 1;
_2 => /some/action "arg!";
^1 => /some/lights;
_^1 => /some/music;
}
Here, bindings are being configured for a mode called MUSIC (modes are represented either as all-caps aliases (see mode.py) or in the form [mode-type]:[mode], for example 1:0 is the first mode (mode 0) for the left-hand mode button on the button panel.
Five bindings are configured:
If desired, you can set up a binding where the combination of buttons pressed will be sent to the action as its first argument as a list:
MUSIC {
any(0 : "james"
,1 : "jonathan"
,2 : "karl"
,3 : "matt"
,4 : "tom") => /some/action "arg2";
}
Here if any of the keys 0-4 are pressed either on their own or in tandem, /some/action will be called with a list containing the word associated with each button that was pressed, then "arg2" as the 2nd argument. For example if 0, 1 and 4 were pressed together, the call would be to /some/action ["james", "jonathan", "tom"] "arg2".
This can be combined with the _ and ^ symbols to require use of the middle-switch or holding the buttons down.
| Category | Home Automation |
| GitHub | 18sg/Panel-O-Matic-SHET-Client |
| Git Repo | https://...18sg/Panel-O-Matic-SHET-Client.git |