Services are what make the CoFyBox useful. They exist as Docker containers, which can run in their own isolated environment, or together in an ensemble as they do in production. Their variety of functions are described on this page. You can view the code for each service in the repository.
Most, but not all, services are written in Python. There is no specific requirement to use Python.
Services can be enabled or disabled as detailed in configuration at runtime.
This is software that has been developed specifically for use in the CoFyBox.
This service provides a local web UI to support the installation/commissioning of the cofy-box. It also provides a range of other functionality required for the operation of the CoFyBox including:
aggregated_dataMQTT topic and posts these to the CoFyCloud.
A service that fetches pricing data from the CoFyCloud, related to the user's energy tariff.
The "glue component" maps MQTT topics and reposts them in the CofyCloud format under the
data topic, ready for aggregation.
Takes input from Sunspec devices and posts them to MQTT.
A container normally disabled by default which provides debugging capabilities.
A service that interfaces with the Huawei SUN2000 solar inverter and publishes sensor values to MQTT. It detects if the inverter is equipped with a utility meter or a battery. This service runs every minute and only requires the IP of the inverter.
This is software that we use which has been primarily/substantially developed by others which is running on the cofy-box and potentially configured/extended by us in various ways.
Third party component for managing a "Smart Home". Serves as the local UI for users of the Cofybox. We use the official HA docker image and apply a fat configuration specialised to our requirements. See the page for further information.
Docker Hub: https://hub.docker.com/r/homeassistant/home-assistant
Mosquitto is a lightweight MQTT 3.1.1/5 broker. We use the official eclipse-mosquitto container image.
Telegraf is a general purpose telemetry/logging client used to consume a range of input data, transform it, and then output to a range of formats/interfaces. We use it for downsampling data and sending data to InfluxDB (locally or in the cloud).
InfluxDB is a time-series database. The service runs such a database locally, for storage of information such as energy usage. Preferably, data is sent from the device to InfluxDBCloud, which can be queried remotely and does not require the local database. Thus, this service is only relevant for some installations, such as where the user has chosen not to send their data to the cloud.
Nginx is a reverse proxy and load balancing software. Its latter usage is not implemented in the project; we use its reverse proxy capabilities to route requests to the CoFyBoxes. The container exposes and listens on port 80, then directs requests to the relevant container. As it acts as a web server, Nginx is also useful for the serving of static files.
Data in the Cofybox is, in most cases, moved between components using an MQTT broker. The general path between a device is:
aggregated_datatopic. It may also post the data to InfluxDB, locally or in the cloud.
aggregated_datatopic and post it to the CofyCloud