Hi all
I just setup Home Assistant in Docker with Compose and Portainer, i hope it went all good ( I think so ) to the last part setting up zigbee2mqtt
I Iframed zigbee2mqtt and portainter to Home Assistant
When i open zigbee2mqtt in Home Assistant it says “unable to connect”
When i look at the log in Portainer for zigbee2mqtt it says
"YAMLException: bad indentation of a mapping entry (14:4)"
11 | # MQTT server URL
12 | "server: 'mqtt://192.168.50.131'
13 | # MQTT server authentication, un ...
14 | "user: mqtt_user"
---------^
15 | password: *******
16 |
at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1182:7)
at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1164:11)
at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
at Object.read (/app/lib/util/yaml.ts:7:21)
"Using '/app/data' as data directory"
"/app/node_modules/js-yaml/lib/loader.js:183"
" return new YAMLException(message, mark);"
I am not sure but i looks like a user issue ?
Home Assistant can see the USB zigbee controller
I am not getting any error in the rest of my logs
"This is my configuration.yaml for zigbee2mqtt"
# Home Assistant integration (MQTT discovery)
homeassistant: true
# allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://192.168.50.131'
# MQTT server authentication, uncomment if required:
user: mqtt_user
password: *********
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
And this is my docker-compose.yaml
version: '3.0'
services:
portainer:
container_name: portainer
image: portainer/portainer-ce
devices:
- /dev/ttyACM0:/dev/ttyACM0
restart: always
ports:
- "9000:9000/tcp"
environment:
- TZ=Europe/Copenhagen
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/portainer:/data
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /opt/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
devices:
- /dev/ttyACM0:/dev/ttyACM0
restart: unless-stopped
privileged: true
network_mode: host
mosquitto:
image: eclipse-mosquitto
container_name: mosquitto
volumes:
- /opt/mosquitto:/mosquitto
- /opt/mosquitto/data:/mosquitto/data
- /opt/mosquitto/log:/mosquitto/log
ports:
- 1883:1883
- 9001:9001
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- /opt/zigbee2mqtt/data/data:/app/data
- /run/udev:/run/udev:ro
ports:
# Frontend port
- 8080:8080
environment:
- TZ=Europe/Copenhagen
devices:
- /dev/ttyACM0:/dev/ttyACM0
And this is my Home Assistant configuration.yaml
# Add panel to HomeAss
panel_iframe:
portainer:
title: "Portainer"
url: "http://192.168.50.131:9000/#/containers"
icon: mdi:docker
require_admin: true
zigbee2mqtt:
title: "zigbee2mqtt"
url: "http://192.168.50.131:8080"
icon: mdi:zigbee
require_admin: true
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
I am not sure but i looks like a user issue ? Home Assistant can see the USB zigbee controller
I am not getting any error in the rest of my logs
Can someone point me in a direction of a solution
Edit : tried to clean the post up