It is possible to add your own web pages to the otmonitor web server or
override built-in pages by placing them in a directory called
html
located in the same directory as the otmonitor binary.
Style sheet
To give custom pages a similar appearence as the built-in pages, the
otmonitor.css file may be used as a style sheet. That file picks up the
selected web theme.
Web theme
To create your own web theme, create a file called theme-<name>.css in
the
html directory.
Web sockets
You can use websockets in your customized web pages. Currently the following
websockets are available:
- status.ws
- Reports updates to the information shown on the status screen in JSON
format.
- upgrade.ws
- Reports the progress of a firmware update in JSON format.
- message.ws
- Reports every opentherm message reported by the gateway, including a
timestamp, the hex message, and a translation to human readable form.
Commands
The special page
command can be used to send a serial command to the
gateway. Either use a "GET" or "POST" operation, specifying the desired
command as query data. The request will return the response from the gateway.
- Example:
- The request
http://localhost:8089/command?PR=C
produces: PR: C=4 MHz