scanno / nl.scanno.mqtt

13 stars 8 forks source link

MQTT Client does not communicate with server(s)? #26

Closed MP-ICT-Diensten closed 3 years ago

MP-ICT-Diensten commented 3 years ago

Hello,

I have a Homey Pro on v4.2 and a Homey on v5.x and I dont seem to be able to let the MQTT client app v2.2.3 communicate with an MQTT broker. I have 2 brokers, one on a NAS and one on a Pi. I know the IP addresses, userid/pwd and port numbers, but the client does not seem to get triggers from mqtt or be able to send commands. MQTT Explorer works fine, no problems.

I tried the HUB in the past as well, but does not work either, probably because the client does not connect properly. Tried a lot, but cant seem to get it to work. With hub app there was also the behavior that the MQTT client app regular crashes.

App diag: 4d76a36f-469b-4de1-8740-9c9e29929fb0

Settings: Screenshot_20201031-175410

The log shows this: '''0201031-17:47:05 Broker State: DISCONNECTED 20201031-17:47:06 MQTT Reconnect 20201031-17:47:06 Broker State: RECONNECTING 20201031-17:47:06 MQTT Closed 20201031-17:47:06 Broker State: DISCONNECTED 20201031-17:47:07 MQTT Reconnect 20201031-17:47:07 Broker State: RECONNECTING 20201031-17:47:07 MQTT Closed 20201031-17:47:07 Broker State: DISCONNECTED 20201031-17:47:08 MQTT Reconnect 20201031-17:47:08 Broker State: RECONNECTING 20201031-17:47:08 MQTT Closed 20201031-17:47:08 Broker State: DISCONNECTED 20201031-17:47:09 MQTT Reconnect 20201031-17:47:09 Broker State: RECONNECTING 20201031-17:47:09 MQTT Closed 20201031-17:47:09 Broker State: DISCONNECTED 20201031-17:47:10 MQTT Reconnect ''''

Marco

scanno commented 3 years ago

Well the client cannot connect obviously. Are you using TLS or just a plain connection?

MP-ICT-Diensten commented 3 years ago

Just plain connection. Same parameters in MQTT Explorer and same parameters in for example Shelly devices and some sensor which all are capable to connect fine to the MQTT broker.

During writing this I thought to check the firewall on the Pi, seems ok, 1883 is allowed for public zone, but I changed something and now the Pi is "dead" (firewall blocks all now :) ) I suspect a difference between trusted and public zone configuration including source subnets.

Then I tried my second MQTT host on the NAS and it seems that the MQTT Client now does connect and read MQTT and can even send a command to a device.

So, this one is "solved", no MQTT Client problem anymore.