t0bst4r / matterbridge-home-assistant

Apache License 2.0
36 stars 2 forks source link

Failed to start plugin matterbridge-home-assistant: Error: Home Assistant Access Token is not set. #67

Closed Cheerpipe closed 3 weeks ago

Cheerpipe commented 3 weeks ago

Hi. i am trying to use latest docker (0.50) with config_file env but i get this error on container start:

Failed to start plugin matterbridge-home-assistant: Error: Home Assistant Access Token is not set.

image

My docker compose:

services:
  matterbridge-home-assistant:
    container_name: matterbridge-home-assistant
    image: ghcr.io/t0bst4r/matterbridge-home-assistant:latest
    restart: unless-stopped
    network_mode: host
    environment:
      CONFIG_FILE: /config/matterbridge-config.json
    volumes:
      - /config/matterbridge-home-assistant/data:/root/.matterbridge
      - /config/matterbridge-home-assistant/config:/config:ro

Content ofmatterbridge-config.json located in/config/matterbridge-home-assistant/config

{
  "homeAssistantUrl": "http://192.168.1.53:8123",
  "homeAssistantAccessToken": "eyJh....................5g",
  "homeAssistantClientConfig": {
    "includeDomains": ["scenes"]
  }
}

I have also checked the config file inside container and it is passed OK:

image

tam481 commented 3 weeks ago

I'm having the same issue. If I go back to the docker env file I get:

Failed to load plugin matterbridge-home-assistant: SyntaxError: Unexpected end of JSON input

EDIT: I'm able to downgrade to version 0.3.0 and use the docker env file as before

Cheerpipe commented 3 weeks ago

Failed to load plugin matterbridge-home-assistant: SyntaxError: Unexpected end of JSON input

Confirm i also have this issue with .ent file and docker-compose environment variable.

t0bst4r commented 3 weeks ago

Interesting… i mixed up the if condition in the docket entrypoint

t0bst4r commented 3 weeks ago

Version 0.5.1 is currently building. Could you try it (should be available in about 5 minutes)

Cheerpipe commented 3 weeks ago

Hi. 0.5.1 works with my config file in json format.

Thanks