Bonjour à tous,
Dans ma maison de campagne j’utilise un home assistant en mode managé sur une machine PC Engines APU2, donc installée depuis Debian x64, sur laquelle j’ai un accès SSH. C’est une machine qui tourne depuis 7 ans et fonctionne admirablement bien, sans aucun défaut.
Mais avec le sortie de la Raspeberry 5CM, il y a saut technologique et je me suis laissé tenter. Voir mon post au sujet de la Raspberry 5M : Découverte de la Raspberry Pi 5CM + NVMe (topic unique). J’aimerais utiliser la Raspberry Pi CM5 en mode Docker pur.
En effet, des test dans ma résidence principale montrent que Home Assistant utilise 0,7% du temps machine dans la Raspberry Pi 5CM, donc il y a plein de puissance disponible et je compte l’utiliser sous Docker, pour installer n’importe quel logiciel sans passer par l’interface de Home Assistant. C’est pour cela que Docker existe.
J’ai déjà des machines Home Assistant sous Docker, ce qui m’intéresse ici, c’est la migration et j’avoue ne pas avoir les idées claires, donc je prépare mon intervention par ce post :
Sur la machine PC Engines APU2 (Home Assistant partagé):
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
99225aecf38f homeassistant/amd64-addon-configurator:5.8.0 "/init" 46 hours ago Up 46 hours (healthy) addon_core_configurator
17259861d9d4 ghcr.io/hassio-addons/uptime-kuma/amd64:0.13.0 "/init" 46 hours ago Up 46 hours 0.0.0.0:3001->3001/tcp, :::3001->3001/tcp addon_a0d7b954_uptime-kuma
1d9d1ab1716e zigbee2mqtt/zigbee2mqtt-amd64:2.1.1-1 "/sbin/tini -- /dock…" 46 hours ago Up 46 hours 0.0.0.0:8485->8485/tcp, :::8485->8485/tcp addon_45df7312_zigbee2mqtt
509210ff90f3 homeassistant/amd64-addon-mosquitto:6.5.0 "/init" 46 hours ago Up 46 hours 0.0.0.0:1883-1884->1883-1884/tcp, :::1883-1884->1883-1884/tcp, 0.0.0.0:8883-8884->8883-8884/tcp, :::8883-8884->8883-8884/tcp addon_core_mosquitto
c078cf096ced ghcr.io/home-assistant/amd64-hassio-multicast:2024.03.0 "/init" 46 hours ago Up 46 hours hassio_multicast
4f9760a7eef0 ghcr.io/home-assistant/amd64-hassio-audio:2023.12.0 "/init" 46 hours ago Up 46 hours hassio_audio
c089800ffb7a ghcr.io/home-assistant/amd64-hassio-dns:2024.12.0 "/init" 46 hours ago Up 46 hours hassio_dns
553c03ff3eda ghcr.io/home-assistant/amd64-hassio-cli:2024.09.0 "/init" 46 hours ago Up 46 hours hassio_cli
4253c3bc2d49 ghcr.io/home-assistant/qemux86-64-homeassistant:2025.2.4 "/init" 4 days ago Up 46 hours homeassistant
59c7f46c62c8 ghcr.io/home-assistant/amd64-hassio-supervisor:latest "/init" 7 days ago Up 46 hours hassio_supervisor
b173d49208fe ghcr.io/home-assistant/amd64-hassio-observer:2023.06.0 "/usr/bin/observer" 18 months ago Up 46 hours 0.0.0.0:4357->80/tcp, [::]:4357->80/tcp hassio_observer
Je comptais inspecter le brokers Mosquito, Zigbee2mqtt et Home Assistant et récupérer le contenu des dossiers pour faire une migration dans cet ordre à l’identique. J’utilise un émetteur Zigbee sur prise Ethernet en POE, donc je n’ai pas de problème du côté Zigbee.
sudo docker inspect 509210ff90f3
[
{
"Id": "509210ff90f3dcddf708d08b2fb852799f2e4a16ee6db622fef8fa00b16bea54",
"Created": "2025-02-19T10:48:55.122777832Z",
"Path": "/init",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2259,
"ExitCode": 0,
"Error": "",
"StartedAt": "2025-02-19T10:48:55.68838104Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:61eaa57247b3d36e4093dd275e605459af7ea66a2cbf9f99ca6905dec6c08067",
"ResolvConfPath": "/var/lib/docker/containers/509210ff90f3dcddf708d08b2fb852799f2e4a16ee6db622fef8fa00b16bea54/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/509210ff90f3dcddf708d08b2fb852799f2e4a16ee6db622fef8fa00b16bea54/hostname",
"HostsPath": "/var/lib/docker/containers/509210ff90f3dcddf708d08b2fb852799f2e4a16ee6db622fef8fa00b16bea54/hosts",
"LogPath": "",
"Name": "/addon_core_mosquitto",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "journald",
"Config": {
"tag": "{{.Name}}"
}
},
"NetworkMode": "bridge",
"PortBindings": {
"1883/tcp": [
{
"HostIp": "",
"HostPort": "1883"
}
],
"1884/tcp": [
{
"HostIp": "",
"HostPort": "1884"
}
],
"8883/tcp": [
{
"HostIp": "",
"HostPort": "8883"
}
],
"8884/tcp": [
{
"HostIp": "",
"HostPort": "8884"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
0,
0
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [
"172.30.32.3"
],
"DnsOptions": [
"timeout:10"
],
"DnsSearch": [
"local.hass.io"
],
"ExtraHosts": [
"hassio:172.30.32.2",
"supervisor:172.30.32.2"
],
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 200,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"seccomp=unconfined"
],
"Tmpfs": {
"/dev/shm": ""
},
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"Mounts": [
{
"Type": "bind",
"Source": "/dev",
"Target": "/dev",
"ReadOnly": true,
"BindOptions": {
"ReadOnlyNonRecursive": true
}
},
{
"Type": "bind",
"Source": "/usr/share/hassio/addons/data/core_mosquitto",
"Target": "/data"
},
{
"Type": "bind",
"Source": "/usr/share/hassio/ssl",
"Target": "/ssl",
"ReadOnly": true
},
{
"Type": "bind",
"Source": "/usr/share/hassio/share",
"Target": "/share",
"ReadOnly": true,
"BindOptions": {
"Propagation": "rslave"
}
}
],
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
],
"Init": false
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/c7761020b3be452b1955ac56c84f6ad08cdc3934f403321842474b3dc258f2a0-init/diff:/var/lib/docker/overlay2/bd0e61d6e9e04ea1831494384fb32ebc6cc27f65e7e46bebceea5ed72a3e7ed8/diff:/var/lib/docker/overlay2/ee970ff4afa41b34dc7648bcfd23c4e1cb9f859ce42145bc9c5963b98b38dcdb/diff:/var/lib/docker/overlay2/47e39039d58f4b899937970734f96efa479d8d0727143a8a3f1f2656d005dbee/diff:/var/lib/docker/overlay2/55aee27d36e38274f20979e1d9b8f4e2abddc0f6b614c0b5a3e0f6ed1d819387/diff:/var/lib/docker/overlay2/57c12ae3b0893f52b1620f2ca91cb03e0c75e237325aca104044508e2228a960/diff:/var/lib/docker/overlay2/0d352d341fd66ff5fe7e5f3082bff144b245e45ec41d3da29973f349cfa9ef43/diff",
"MergedDir": "/var/lib/docker/overlay2/c7761020b3be452b1955ac56c84f6ad08cdc3934f403321842474b3dc258f2a0/merged",
"UpperDir": "/var/lib/docker/overlay2/c7761020b3be452b1955ac56c84f6ad08cdc3934f403321842474b3dc258f2a0/diff",
"WorkDir": "/var/lib/docker/overlay2/c7761020b3be452b1955ac56c84f6ad08cdc3934f403321842474b3dc258f2a0/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/dev",
"Destination": "/dev",
"Mode": "",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/usr/share/hassio/addons/data/core_mosquitto",
"Destination": "/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/usr/share/hassio/ssl",
"Destination": "/ssl",
"Mode": "",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/usr/share/hassio/share",
"Destination": "/share",
"Mode": "",
"RW": false,
"Propagation": "rslave"
}
],
"Config": {
"Hostname": "core-mosquitto",
"Domainname": "local.hass.io",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"1883/tcp": {},
"1884/tcp": {},
"8883/tcp": {},
"8884/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"TZ=Europe/Paris",
"SUPERVISOR_TOKEN=3c678e5aa0d33a02e0c16b001ea90f9c78d06ae439a05331e79636938d88717f81ab88530fbf6da20352db61f8d9a5495225cb97feb6b686",
"HASSIO_TOKEN=3c678e5aa0d33a02e0c16b001ea90f9c78d06ae439a05331e79636938d88717f81ab88530fbf6da20352db61f8d9a5495225cb97feb6b686",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"DEBIAN_FRONTEND=noninteractive",
"CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt",
"S6_BEHAVIOUR_IF_STAGE2_FAILS=2",
"S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
"S6_CMD_WAIT_FOR_SERVICES=1",
"S6_SERVICES_READYTIME=50"
],
"Cmd": null,
"Image": "homeassistant/amd64-addon-mosquitto:6.5.0",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": [
"/init"
],
"OnBuild": null,
"Labels": {
"io.hass.arch": "amd64",
"io.hass.base.arch": "amd64",
"io.hass.base.image": "debian:bookworm-slim",
"io.hass.base.name": "debian",
"io.hass.base.version": "2024.12.1",
"io.hass.description": "An Open Source MQTT broker",
"io.hass.name": "Mosquitto broker",
"io.hass.type": "addon",
"io.hass.url": "https://github.com/home-assistant/addons/tree/master/mosquitto",
"io.hass.version": "6.5.0",
"org.opencontainers.image.created": "2025-01-13 20:44:55+00:00",
"org.opencontainers.image.source": "https://github.com/home-assistant/docker-base",
"org.opencontainers.image.version": "6.5.0",
"supervisor_managed": ""
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "787df23663c0a99751b56b37ab9075edb2d38b7b11a8bb3e9aa67264dc7e49b9",
"SandboxKey": "/var/run/docker/netns/787df23663c0",
"Ports": {
"1883/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1883"
},
{
"HostIp": "::",
"HostPort": "1883"
}
],
"1884/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1884"
},
{
"HostIp": "::",
"HostPort": "1884"
}
],
"8883/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8883"
},
{
"HostIp": "::",
"HostPort": "8883"
}
],
"8884/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8884"
},
{
"HostIp": "::",
"HostPort": "8884"
}
]
},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"hassio": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"core-mosquitto"
],
"MacAddress": "02:42:ac:1e:21:00",
"DriverOpts": null,
"NetworkID": "39a3a14df798797442a7313ea5ad3759da56ea799077d931b3737b50da237335",
"EndpointID": "2d58fb23a80556da415d71a915e08d37fbce5dd70e37ad39a4459579d2dec08e",
"Gateway": "172.30.32.1",
"IPAddress": "172.30.33.0",
"IPPrefixLen": 23,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": [
"addon_core_mosquitto",
"core-mosquitto",
"509210ff90f3"
]
}
}
}
}
]
Est-ce la bonne façon de procéder ? Je stoppe les démons, je récupère les données dans le point de montage, est-ce aussi simple que cela ?
Cordialement,
Kellogs