-
Notifications
You must be signed in to change notification settings - Fork 1
concordd and concordctl
Warning: Stream of consciousness thoughts below. It is a work in progress
I'm planning to move everything to a client-server IPC architecture, where we have a daemon (concordd
) and a command line tool(concordctl
). concordctl
would communicate with concordd
using D-Bus. Other programs running on the same machine may also talk to concordd
(and, thus, to the alarm system panel) via D-Bus.
concordd
is the daemon which directly communicates with the Concord 4 Home Automation interface and exposes functionality to other processes via D-Bus. The daemon also has a configuration file where command handlers for specific events can be specified. For example, you can have a script that is executed whenever a light changes state, or whenever an alarm is triggered.
A CoAP bridge daemon would be a separate process that communicates with concordd
using D-Bus IPC, just like concordctl
does.
The command line tool would have the following commands:
Prints out log messages for events that occur. Cancel with CTRL-C.
Emulates alarm speaker/siren. It is limited to making status noises and audible alarms. Tries to use a reasonable sound output mechanism by default, but allows you to specify how the sound is output with the --sound
argument:
-
bel
- Uses the ASCIIBEL
(0x07) character to try to roughly emulate status beeps and alarms. Available on all platforms. -
beep
- Uses Linuxioctl
calls to modulate the PC speaker. -
alsa
- Outputs sound via Linux's ALSA interface.
Emulates an LCD keypad on the terminal. Typing in numbers and letters works just like they would on a real keypad. LCD text is shown on the screen and updated as necessary. Confirmation and alarm noises can also be emulated with the --sound
argument.
Enter the given string of keys into the virtual keypad.
Prints out the current text that appears on the LCD to stdout
.
Change the arming level of the panel. If no arm-level is specified, prints out the current arm level.
Bypass one or more zones.
Unbypass one or more zones.
Prints out the status of the given zones. If no zones are given, all configured zones are printed.
If no arguments are given, prints out the status of all lights. If only a light number is given, prints out the status of that light. If both a light number and a light state are given, the light is changed to the given state.
State values can be:
-
0
oroff
: The light is turned off. -
1
oron
: The light is turned on. -
t
ortoggle
: The light is toggled.
Additionally, the identifier all
can be used for the light number to change the value of all lights.