ChristianKuehnel / plantgateway

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

Pi Zero W | [Errno -3] Temporary failure in name resolution #29

Closed xbmcnut closed 6 years ago

xbmcnut commented 6 years ago

Thanks for making this. Just tried this tonight but application won't start.

pi@pi-presencedown:~ $ plantgateway
Traceback (most recent call last):
  File "/usr/local/bin/plantgateway", line 37, in <module>
    main()
  File "/usr/local/bin/plantgateway", line 24, in main
    pg = PlantGateway()
  File "/usr/local/lib/python3.5/dist-packages/plantgw/__init__.py", line 130, in __init__
    self._start_client()
  File "/usr/local/lib/python3.5/dist-packages/plantgw/__init__.py", line 157, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 839, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 962, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/lib/python3.5/socket.py", line 694, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

What does that error mean? Do you need http:// for MQTT address or just IP?

xbmcnut commented 6 years ago

Seems the port is not optional as stated in the yaml file instructions?

port of the mqtt server, optional if using 8883

Removed the # and put port 1883 and it works.