cantabile_edge, cantabile_modbus, cantabile_eebus 0.1.400: full source

This commit is contained in:
Setti Solutions S.R.L committed 2026-10-30 08:26:45 +02:00
1 parent 343331d234
commit d5fbcacaa4
176 files changed
+32511 -19

No files matched your search

+27
View File
@@ -6,6 +6,33 @@ names the commit; the agent inside is the Edge Agent image of that commit.
## 0.1.x
- Blinds, curtains, shutters and awnings: the Devices page offers any of
Home Assistant's covers (never a garage door, gate, door, damper or
window). You set the room it shades and which way the window faces.
Cantabile then moves it by the sun: in summer it closes it (partly, while
someone is home) when the sun is on that window and the room is warm or
dear hours are coming, and opens it again when the sun has gone; in
winter it opens it for the sun's warmth and closes it in the evening to
keep the warmth in, never opening it in the dark. It never moves between
22:00 and 07:00, at most once in 30 minutes, and after you move it by
hand it waits 4 hours. A new shade is protected: Cantabile does not move
it until you allow that on the Devices page (and only with your consent
to control, in auto mode). On the dashboard it is a tile with its
position slider (open and close for one without positions), and "Coming
up" says what is next in words ("Bedroom curtains: close to 30 % at
14:00, sun on the west facade").
- Temperature and humidity sensors: any such sensor (ESPHome, Zigbee,
Bluetooth) that has no profile of its own is offered, never Home
Assistant's or a device's own system temperatures. You choose indoor
(which room; a room that has a temperature already gets a second one) or
outdoor: then it is Cantabile's outside temperature, before the weather
service's. On the dashboard each is a small card with its temperature and
humidity.
- Weather: a weather service (met.no, OpenWeatherMap and others) is offered
as "Weather (forecast)": its hourly forecast plans solar, heating,
cooling and the shades, its temperature and humidity are the outside's
where no outdoor sensor measures them. With several, you choose the one
Cantabile plans with.
- Your consent at installation, in the add-on's configuration: sharing
energy data with Cantabile (needed: without it the add-on does not
connect, and its page says why) and, separately, control. The same texts
+15 -13
View File
@@ -1,20 +1,22 @@
# Copyright © 2026 Setti Solutions S.R.L, www.setti.md. All rights reserved.
# The add-on's image: the Edge Agent image of the same commit (edge/build.sh)
# with addon-run in front, and the platform it belongs to (the devices URL,
# the command and bundle certificates), as a Hub build bakes them in.
# Built by ha-addon/build.sh, one image per arch; the Supervisor pulls it.
ARG EDGE_IMAGE
# The add-on's image: the Edge Agent image (src/edge) with addon-run in
# front, Cantabile's device profiles (src/profiles; the agent proposes a
# mapping from them, propose.py), and the platform it belongs to: the devices
# URL and the command and bundle certificates (cantabile_edge/platform/,
# README.md there). Built from the repository's root:
# docker build -t cantabile-edge:local src/edge
# docker build -f cantabile_edge/Dockerfile --build-arg EDGE_IMAGE=cantabile-edge:local \
# --build-arg VERSION=<v> -t cantabile-ha-edge-amd64:<v> .
ARG EDGE_IMAGE=cantabile-edge:local
FROM ${EDGE_IMAGE}
ARG VERSION ARCH REVISION
ARG VERSION ARCH=amd64 REVISION
LABEL io.hass.version="${VERSION}" io.hass.type="addon" io.hass.arch="${ARCH}" \
org.opencontainers.image.revision="${REVISION}"
# bundles.pem is optional (no bundle key: the agent plans with its flat price);
# devices-ca.pem too (the direct path, docs/direct-link.md).
COPY addon.env commands.pem bundles.pem* devices-ca.pem* /etc/cantabile/
COPY addon-run /usr/local/bin/addon-run
# Cantabile's device profiles (hub/profiles, copied in by build.sh): the
# agent proposes a mapping from them (propose.py).
COPY profiles/ /usr/share/cantabile/profiles/
# addon.env and commands.pem are needed at run time; bundles.pem and
# devices-ca.pem are optional.
COPY cantabile_edge/platform/ /etc/cantabile/
COPY cantabile_edge/addon-run /usr/local/bin/addon-run
COPY src/profiles/*.json /usr/share/cantabile/profiles/
# addon-run starts as root (it reads Home Assistant's instance id) and runs
# the agent as uid 10001.
USER root
+2 -2
View File
@@ -3,10 +3,10 @@
"""The Edge Agent's start as a Home Assistant add-on (runs as root).
- Home Assistant's instance id: .storage/core.uuid is root-only; a copy in
/data for the link (the site id comes from it, as on the Hub and THR-Home).
/data for the link (the site id comes from it, as on the Hub).
- The add-on's options (/data/options.json): the owner's consent, mode,
claim code, dashboards.
- Consent (HANDOVER 0, the owner's decision of 2026-10-30): given when the
- Consent (the owner's decision of 2026-10-30): given when the
add-on is installed from Cantabile's repository, in its configuration:
sharing the energy data of the devices chosen for Cantabile (needed: until
it is given the add-on does not enrol or connect, and its page says why)
+4 -4
View File
@@ -1,9 +1,9 @@
# Copyright © 2026 Setti Solutions S.R.L, www.setti.md. All rights reserved.
# The Edge Agent as a Home Assistant add-on (HANDOVER 3e): the same image as
# the Hub's, wrapped by addon-run (Dockerfile). ha-addon/build.sh sets
# version and arch for each build; the image is prebuilt, per arch.
# The Edge Agent as a Home Assistant add-on: the same image as
# the Hub's, wrapped by addon-run (Dockerfile). The image is prebuilt,
# per arch (README.md: building it from src/).
name: Cantabile Edge Agent
version: "0.1.389"
version: "0.1.400"
slug: cantabile_edge
description: Plans your home's energy with Cantabile and, with your consent, runs the devices you choose.
url: https://cantabile.cloud
+5
View File
@@ -0,0 +1,5 @@
# Copyright © 2026 Setti Solutions S.R.L, www.setti.md. All rights reserved.
# The platform's files are put here for a build, never committed.
*
!.gitignore
!README.md
+25
View File
@@ -0,0 +1,25 @@
# The platform files
The Edge Agent add-on belongs to one Cantabile platform. Its image carries
these files in `/etc/cantabile/`; they are not part of this repository.
Put them here before building `cantabile_edge/Dockerfile`:
| File | What |
|---|---|
| `addon.env` | `CANTABILE_DEVICES_URL=<the platform's device API URL>`, one `KEY=value` per line (optionally `CANTABILE_DEVICES_DIRECT`, `CANTABILE_DEVICES_SPKI`). |
| `commands.pem` | The certificate of the platform's command key: the link accepts only commands signed with it. |
| `bundles.pem` | Optional: the certificate of the platform's bundle key (tariffs, models). |
| `devices-ca.pem` | Optional: the CA of the direct path to the device API. |
These are public certificates, not secrets. To rebuild the published image
for the same platform, take them from it:
```
docker create --name ce git.setti.solutions/daniel/cantabile-ha-edge-amd64:<version>
docker cp ce:/etc/cantabile/. cantabile_edge/platform/
docker rm ce
```
---
Copyright © 2026 Setti Solutions S.R.L, www.setti.md. All rights reserved.