I’m running HA in docker on a RPi 4B with the following docker-compose.yml (HA part only):
homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" volumes: - /mnt/sd/hass/config:/config:rw - /etc/localtime:/etc/localtime:ro restart: unless-stopped privileged: true network_mode: host
I wanted to connect Rhasspy (also in a docker container) with my HA instance but the API access seemed to be unauthorised every single time. So I tried testing my token from command line (both from the RPi itself and from my laptop):
$ curl -X GET -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjYzhkZTQ0Y2JiMTQ0MGY2ODE0YWM0ZjViZDUyMzMzYyIsImlhdCI6MTY2ODM1ODcyMiwiZXhwIjoxOTgzNzE4NzIyfQ.Qr2IVeO8NwGppfV0G85yk_0teSm2MsQcqmZwM8w426A application/json" http://rpihass:9000/api/
This is my
# Loads default set of integrations. Do not remove. default_config: http: server_port: 9000 # Load frontend themes from the themes folder frontend: themes: !include_dir_merge_named themes # Text to speech tts: - platform: google_translate automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml
What am I missing? Is there anything else to configure to be able to be authorised by a long-lived token?
Thank you and best regards!