Caution
This is the documentation for the current development branch of the CometVisu. It is possible that some of the described features are not yet available in the current release.
Also there might be lots of errors in this documentation as some parts of the content have been translated by an online translation service.
Installation of the Docker container
The CometVisu project offers officially built Docker containers that are available at DockerHub cometvisu/cometvisu.
Versions
The newest releases are available as
tag with their release
name as well as latest for the most current release.
The current development versions can be found by the tag testing-<date> as
well as testing alone for the most current one. When during the development
process a new pull request get’s merged a new testing container will be
automatically built and filed under the current date. If a tag does not exist
for this date, it will be created, and if the tag already exists,
it will be overwritten with the newly created container.
Setup
Environment parameters
The container is configured by environment variables. For the connection to
the KNX bus it contains the FastCGI backend cometvisu-knx-fcgi (up to
FastCGI backend version 1.2.1: cometvisu-knxd-fcgi) together with Apache
and PHP, so no additional software is needed.
Backend and web server
Parameter |
Default |
Description |
|---|---|---|
|
|
Backend name: |
|
|
URL of the |
|
|
Path to the openHAB REST-API. |
|
(empty) |
URL of the MQTT broker (WebSocket interface). |
|
|
Deprecated: URL prefix of the |
|
(empty) |
Proxy paths starting with this value, e.g. |
|
(empty) |
Target URL for proxying the requests to |
|
|
Expert option: port Apache listens on inside the container. When
changed, publish with |
|
|
Show the access log of the web server when set to |
|
|
Stop the container on a failed health check when set to |
KNX connection (FastCGI backend)
Parameter |
Default |
Description |
|---|---|---|
|
|
Transport to the KNX bus: |
|
|
FastCGI listen socket of the backend. Apache forwards
|
|
|
Number of worker processes (2 - 256). Two workers are reserved for
|
|
|
Maximum duration of a long-poll of |
|
|
Upper bound for outgoing KNX telegrams per second over all clients. |
|
(unset) |
Set to |
|
|
Only for ``KNX_TRANSPORT=knxd``: |
|
|
Only for ``KNX_TRANSPORT=knxd``: path to the Unix socket of an
external |
Since version 2.0 the FastCGI backend uses exactly one connection to
the knxd for all workers. FCGI_WORKERS is therefore independent of
KNX_CLIENT_PAS; the number of client connections of the knxd only
has to leave room for that one connection and, if needed, for tools like
knxtool.
Transport knxd (knxd inside the container)
This is the default. The container starts a bundled knxd and the
FastCGI backend. The most important parameter is KNX_INTERFACE which
has to be adapted to the local system.
Parameter |
Default |
Description |
|---|---|---|
|
(empty) |
KNX interface for the |
|
|
Physical address (PA) of the |
|
|
Physical address and number of client connections
( |
|
|
Additional parameters for the KNX interface of the |
|
(empty) |
Complete parameter set for the |
The documentation of the bundled knxd version can be consulted at the
knxd wiki.
Example (a KNX IP interface at 192.168.0.10):
docker run -d -p 8080:80 \
-e KNX_INTERFACE=iptn:192.168.0.10:3671 \
-e KNX_PA=1.1.238 \
cometvisu/cometvisu:latest
Transport knxd (external knxd)
When a knxd already runs outside of the container (e.g. on the host or in
another container) it must not be started twice. Set
NO_ENTRYPOINT_KNXD=extern to skip starting the bundled knxd. The
FastCGI backend is still started and connects to the socket given by
KNXD_SOCKET:
docker run -d -p 8080:80 \
-v /run:/host-run:ro \
-e NO_ENTRYPOINT_KNXD=extern \
-e KNXD_SOCKET=/host-run/knx \
-e BACKEND_NAME=knxd \
-e BACKEND_KNXD=https://server.local/cgi-bin/l \
cometvisu/cometvisu:latest
Notes for this mode:
Mount the directory containing the socket rather than the socket file itself. A bind mount of the socket file keeps pointing to the old inode when the external
knxdis restarted and recreates the socket.KNX_PA,KNX_CLIENT_PAS,KNX_INTERFACE,KNX_INTERFACE_OPTIONSandKNXD_PARAMETERSare ignored - the externalknxdbrings its own configuration. Its group cache must be enabled for reads.NO_ENTRYPOINT_KNXD=truestarts neither theknxdnor the FastCGI backend. Use it only when you provide the FastCGI backend yourself (e.g. as a socket mounted into the container); otherwise theknxdbackend is unavailable and/cgi-bin/lfails.
Transport ip-tunnel - no knxd
With KNX_TRANSPORT=ip-tunnel the container does not start the
bundled knxd (regardless of NO_ENTRYPOINT_KNXD). The FastCGI backend
connects directly to a KNX IP interface or KNX IP router as a tunneling
client, i.e. the CometVisu behaves like a classical KNX device.
The image ships the KNX_IP_* variables empty; the defaults shown below
are the defaults of the FastCGI backend. The container only passes on the
variables that are set, so an empty value never overrides a backend
default.
Parameter |
Default |
Description |
|---|---|---|
|
(empty) |
Address of the KNX IP interface or KNX IP router. Required. |
|
|
KNXnet/IP UDP port. |
|
(OS choice) |
Local address that is advertised to the device. Helpful when the container runs behind NAT or on a multi-homed host. |
|
|
|
|
|
Interval of the connection state request. |
|
|
Timeout before a telegram is repeated. |
|
|
Number of repetitions per telegram. |
KNX_INTERFACE, KNX_PA, KNX_CLIENT_PAS,
KNX_INTERFACE_OPTIONS, KNXD_PARAMETERS and KNXD_SOCKET are
ignored in this mode. NO_ENTRYPOINT_KNXD has no effect - the FastCGI
backend is always started.
Example:
docker run -d -p 8080:80 \
-e KNX_TRANSPORT=ip-tunnel \
-e KNX_IP_HOST=192.168.0.10 \
-e KNX_IP_NAT=1 \
cometvisu/cometvisu:latest
Notes:
A KNX IP interface usually only offers a small number of tunneling connections (often 4). One of them is used by the CometVisu. When all slots are taken the container cannot connect to the bus.
With the default Docker bridge network the container is behind NAT, so either set
KNX_IP_NAT=1(the device has to support NAT) or run the container with--network host.When
--network hostis used,-pcannot be used. If port 80 is already occupied on the host, setAPACHE_PORTinstead.
Transport ip-routing - no knxd
With KNX_TRANSPORT=ip-routing the container does not start the
bundled knxd (regardless of NO_ENTRYPOINT_KNXD). The FastCGI
backend joins the KNXnet/IP multicast group and participates in the
routing like a KNX IP router.
KNX_INTERFACE, KNX_PA, KNX_CLIENT_PAS,
KNX_INTERFACE_OPTIONS, KNXD_PARAMETERS and KNXD_SOCKET are
ignored in this mode. NO_ENTRYPOINT_KNXD has no effect - the FastCGI
backend is always started.
Parameter |
Default |
Description |
|---|---|---|
|
|
Multicast group of the KNXnet/IP routing. |
|
(default route) |
Network interface for the multicast group. |
|
|
Individual address ( |
|
|
KNXnet/IP UDP port. |
Example:
docker run -d --network host \
-e KNX_TRANSPORT=ip-routing \
-e KNX_IP_IFACE=eth0 \
-e KNX_IP_INDIVIDUAL_ADDR=15.15.250 \
cometvisu/cometvisu:latest
Notes:
--network hostis required, because multicast traffic does not cross the default Docker bridge network.The KNX IP router has to be configured for routing and has to be in the same network segment.
KNX_IP_INDIVIDUAL_ADDRmust be a free physical address. A router rejects the address0.0.0.When port 80 is already occupied on the host, set
APACHE_PORT.Every participant of the multicast group can read the bus traffic and send telegrams. Use this mode only in a trusted network segment.
OpenHAB
Example configuration for the OpenHAB backend (assuming it is running on a
server with the address 192.168.0.10):
BACKEND_NAME=openhab
BACKEND_OPENHAB=/rest/
BACKEND_PROXY_SOURCE=/rest
BACKEND_PROXY_TARGET=http://192.168.0.10:8080/rest
Volumes
Configuration files
To make the configuration data persistent over restarts or new setups like
version upgrades they must be stored in a volume. For this the directory
/var/www/html/config (up to version 0.10.2) or
/var/www/html/resource/config (starting with release 0.11) is exported
as a volume.
RRD (diagram plugin)
For the diagram plugin RRD files with the time series can be supplied.
Those must the located and thus mounted at the path /var/www/rrd.
The RRD files themself have to be filled and updated outside of this container.
For that the RRD volume could be mounted in a different container at the
same time.
Ports
The container exports port 80 for the web server.