Using DBus

On systems that support it, otmonitor will attempt to connect to the DBus. It uses com.tclcode.otmonitor as its name on the dbus and as the interface name. All signals and methods are under the / path.

Signals

The otmonitor application will generate the following DBus signals when the matching data received on the opentherm line changes: In addition, the following signal will be generated when otmonitor detects that the gateway has reset:

Methods

There are also some DBus methods available to instruct otmonitor to take some action:
method QString com.tclcode.otmonitor.Command(QString cmd)
Sends a serial command to the gateway
method void com.tclcode.otmonitor.Quit()
Terminates the application
To configure security settings for remote access via the web server, the following methods are available under the /Security path:
method QString com.tclcode.otmonitor.AddCertificate(QString file, QString access)
Install a client certificate.
method QString com.tclcode.otmonitor.AddUser(QString user, QString password)
Add a user with access via a password.
method QString com.tclcode.otmonitor.ChangePassword(QString user, QString password)
Change the password for an existing user.
method QString com.tclcode.otmonitor.DeleteUser(QString user)
Delete a user with password access.
method QString com.tclcode.otmonitor.RevokeCertificate(QString serialno)
Revoke a client certificate, so access using that certificate will no longer possible.

Busses

On a system that provides DBus functionality, usually two busses are available; the session bus and the system bus.

Session bus

By default otmonitor will connect to the session dbus. No special configuration is necessary for this to work. The only prerequisite is that a session bus is available. A session bus is usually created along with the X session, but may also be started via the dbus-launch command.

System bus

When running otmonitor on a system without a graphical environment (using the --daemon option), it may make more sense to have the application connect to the system dbus. This may be requested via the --system option. However, the host system must be configured to permit the application to connect to the system dbus. This can be most easily done by running the following command as root:
wget -O /etc/dbus-1/system.d/com.tclcode.otmonitor.conf http://localhost:8089/otmonitor.conf
It is also possible to auto-start the application when accessed via the dbus. To achieve that, run the next command as root:
wget -O /usr/share/dbus-1/system-services/com.tclcode.otmonitor.service http://localhost:8089/otmonitor.service