wutu / pimatic-mqtt

MQTT plugin for Pimatic
https://pimatic.org/plugins/pimatic-mqtt/
GNU Affero General Public License v3.0
9 stars 13 forks source link

Can't connect to Mosquitto 1.4.10 #21

Closed sandervandegeijn closed 7 years ago

sandervandegeijn commented 7 years ago

I have Mosquitto 1.4.10 on a Ubuntu VM, my espeasy nodes connect fine, so it's running. My config in pimatic;

{
      "plugin": "mqtt",
      "active": true,
      "brokers": [
        {
          "brokerId": "default",
          "host": "192.168.2.35",
          "port": "1883",
          "protocolVer": "3",
          "protocolId": "MQIsdp"
        }
      ]
    }

In Pimatic every 5s or something a notification appears reconnecting to mqtt, but I can't see any connection attempts in the Mosquitto logging.

sandervandegeijn commented 7 years ago

Verified that the raspberry pi, (where pimatic lives) can reach mqtt:

pi@raspberrypi ~ $ telnet 192.168.2.35 1883
Trying 192.168.2.35...
Connected to 192.168.2.35.
Escape character is '^]'.
^CConnection closed by foreign host.

Connection is succesful :)

sandervandegeijn commented 7 years ago

Okay inspected the logs:

23:55:02.375 [pimatic] error: Invalid config of pimatic-mqtt: Property "brokers" is not a valid property
23:56:19.276 [pimatic-mqtt] error: Error on connecting to MQTT Broker operation timed out

Which is weird, followed the docs correctly I think.

sandervandegeijn commented 7 years ago

Found the problem, Pimatic wasn't updating the plugins for some reason, so I was on an old release...