Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Can't read sensors #3

Closed
AnderssonPeter opened this issue May 14, 2018 · 2 comments
Closed

Can't read sensors #3

AnderssonPeter opened this issue May 14, 2018 · 2 comments

Comments

@AnderssonPeter
Copy link

So im trying to run this on a PI 3 running ´HypriotOS` (old version).

But when i run the docker container with the following command: docker run --rm --cap-add NET_ADMIN --net=host --device /dev/ttyAMA0 -v /data/plantgateway:/root:ro pschmitt/plantgateway

i get the following output:

Mon, 14 May 2018 17:37:48 INFO     PlantGateway version 0.5.0
Mon, 14 May 2018 17:37:48 INFO     loaded config file from /root/.plantgw.yaml
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:37:48 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:48 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
Mon, 14 May 2018 17:37:48 INFO     try 1 of 6: could not process sensor(s) plant1, plant2, plant3, plant4, plant5, plant6 (fail silent). Waiting 1 sec for next try
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:37:49 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:49 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
Mon, 14 May 2018 17:37:49 INFO     try 2 of 6: could not process sensor(s) plant1, plant2, plant3, plant4, plant5, plant6 (fail silent). Waiting 2 sec for next try
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:37:51 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:51 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
Mon, 14 May 2018 17:37:51 INFO     try 3 of 6: could not process sensor(s) plant1, plant2, plant3, plant4, plant5, plant6 (fail silent). Waiting 4 sec for next try
Mon, 14 May 2018 17:37:55 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:37:55 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:55 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:37:56 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:56 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:37:56 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:56 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:37:56 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:56 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:37:56 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:56 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:37:56 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:37:56 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
Mon, 14 May 2018 17:37:56 INFO     try 4 of 6: could not process sensor(s) plant1, plant2, plant3, plant4, plant5, plant6 (fail silent). Waiting 8 sec for next try
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:38:04 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:04 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
Mon, 14 May 2018 17:38:04 INFO     try 5 of 6: could not process sensor(s) plant1, plant2, plant3, plant4, plant5, plant6 (fail silent). Waiting 16 sec for next try
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant1
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant2
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant3
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant4
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant5
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 212, in process_all
    self.process_mac(sensor)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 190, in process_mac
    self._publish(sensor_config, poller)
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 163, in _publish
    self.start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 137, in start_client
    self._start_client()
  File "/usr/local/lib/python3.6/site-packages/plantgw/plantgw.py", line 159, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 895, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 INFO     Getting data from sensor plant6
Mon, 14 May 2018 17:38:20 ERROR    could not read data from C4:7C:8D:63:7C:15 (plant6) with reason: [Errno 111] Connection refused
Mon, 14 May 2018 17:38:20 WARNING  fail_silent is set for sensor plant6, so not raising an exception.
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:62:D3:19 (plant1) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:7D:BE (plant2) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:40:8A (plant3) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:BE (plant4) with reason: [Errno 111] Connection refused
could not read data from C4:7C:8D:63:81:C5 (plant5) with reason: [Errno 111] Connection refused
Could not get data from 6sensor(s): plant1, plant2, plant3, plant4, plant5, plant6 (fail silent).
Mon, 14 May 2018 17:38:20 INFO     Disconnected MQTT connection

And i have the following configuration file:

mqtt:
    server: 192.168.0.7
    prefix: plants/
    client_id: PlantGateway
sensors:
    # bluetooth mac of the sensor, mandatory
    - mac: C4:7C:8D:62:D3:19
      alias: plant1
    - mac: C4:7C:8D:63:7D:BE
      alias: plant2
    - mac: C4:7C:8D:63:40:8A
      alias: plant3
    - mac: C4:7C:8D:63:81:BE
      alias: plant4
    - mac: C4:7C:8D:63:81:C5
      alias: plant5
    - mac: C4:7C:8D:63:7C:15
      alias: plant6
      fail_silent:

I have verified my MAC addresses by using sudo hcitool lescan and even tried to read some data with sudo gatttool --device=C4:7C:8D:63:7C:15 --char-read -a 0x35 and it worked!!

What am i doing wrong?

Additional question will this run once or repeat every hour?

@AnderssonPeter
Copy link
Author

Switched to a different solution that works!

@Martinvdm
Copy link

did you ever solved it ? i am receiving the same errors:
[Errno 111] Connection refused

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants