ChristianKuehnel / plantgateway

Bluetooth to mqtt gateway for Xiaomi Mi plant sensors
Apache License 2.0
276 stars 41 forks source link

Connection Refused error #25

Closed Martinvdm closed 6 years ago

Martinvdm commented 6 years ago

Hi i am getting Connection Refused.

Fri, 03 Aug 2018 22:52:36 INFO     PlantGateway version 0.5.0
Fri, 03 Aug 2018 22:52:36 INFO     loaded config file from /root/.plantgw.yaml
Fri, 03 Aug 2018 22:52:36 INFO     Getting data from sensor Achtertuin
Fri, 03 Aug 2018 22:52:36 ERROR    could not read data from C4:7C:8D:66:E8:89 (Achtertuin) with reason: [Errno 111] Connection refused
Fri, 03 Aug 2018 22:52:36 WARNING  fail_silent is set for sensor Achtertuin, so not raising an exception.

plantgw:

    - mac: C4:7C:8D:66:E8:89
      alias: Achtertuin
      fail_silent:

using latest version in Docker. Docker config:

  plantgateway:
    image: this_image:latest
    container_name: PlantGateway
    restart: always
    network_mode: host
    volumes:
      - /home/docker/plantgateway/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
ChristianKuehnel commented 6 years ago

Looks like a permission problem to me. Does the container have the permissions to access your Bluetooth device?

And does the user in your container also have the permissions to do so?

If it works, we can also merge the docker file, if you want. Maybe other users would also be interested...

Martinvdm commented 6 years ago

I dont know anything about merging.

Strange thing is that I am able to use hcitool and scan Bluetooth within the container. Also gatttool i am able to make an connection.

ChristianKuehnel commented 6 years ago

dockerhub already lists a few containers for plantgateway. did you have a look at what they're doing?

Martinvdm commented 6 years ago

didn't succeed in solving this issue. removed plantgateway and solved it with sensor in HA directly.