maisken / Paradox_IP150

Hassio add-on, Python and MQTT bindings for controlling a Paradox alarm via the IP150 web interface
GNU General Public License v3.0
39 stars 10 forks source link

MQTT refused - MQTT installed manually. #2

Closed cybertza closed 2 years ago

cybertza commented 6 years ago

starting version 3.2.4 Traceback (most recent call last): File "ip150_mqtt.py", line 110, in ip_mqtt.loop_forever() File "ip150_mqtt.py", line 101, in loop_forever mqc.connect(mqtt_hostname, mqtt_port) File "/usr/lib/python3.6/site-packages/paho/mqtt/client.py", line 768, in connect return self.reconnect() File "/usr/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/lib/python3.6/socket.py", line 724, in create_connection raise err File "/usr/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

cybertza commented 6 years ago

Hi

Are you stilling having this problem? It is most likely your mqqt path that's not set correctly. Try something like: “MQTT_ADDRESS”: “mqtt://core-mosquitto”,

fliptoback commented 6 years ago

Hi Cybertza, this is what I have:

In configuration.yaml

alarm_control_panel:

sensor:

{ "IP150_ADDRESS": "http://192.168.1.8", "PANEL_CODE": "1234", "PANEL_PASSWORD": "PanelPassword", "MQTT_ADDRESS": "mqtt://core-mosquitto", "MQTT_USERNAME": "mqttbroker", "MQTT_PASSWORD": "4567", "ALARM_PUBLISH_TOPIC": "paradox/alarm/state", "ALARM_SUBSCRIBE_TOPIC": "paradox/alarm/cmnd", "ZONE_PUBLISH_TOPIC": "paradox/zone/state", "CTRL_PUBLISH_TOPIC": "paradox/ctrl/state", "CTRL_SUBSCRIBE_TOPIC": "paradox/ctrl/cmnd" } and in my mosquitto broker

{ "plain": true, "ssl": false, "anonymous": true, "logins": [ { "username": "mqttbroker", "password": "4567" } ], "customize": { "active": false, "folder": "mosquitto" }, "certfile": "fullchain.pem", "keyfile": "privkey.pem" } I still could not get this to work. What am I doing wrong?

Thanks!

alfredopironti commented 5 years ago

mqtt://core-mosquitto is not a valid address, you should use the IP address where your MQTT broker instance can be reached. If you're running mosquitto as a hassio addon, this is likely the IP address at which you can reach hassio itself.

Please let me know if this helps!