ParadoxAlarmInterface / pai

Paradox Magellan, Spectra and EVO, with MQTT, Signal, Pushbullet, Pushover and others
https://gitter.im/paradox-alarm-interface
Eclipse Public License 2.0
340 stars 91 forks source link

MQTT error #39

Closed juzzmoore closed 5 years ago

juzzmoore commented 5 years ago

Hi there,

I'm having an issue whereby I get an exception in the MQTT thread saying that "Publish topic cannot contain wildcards". My environment is as follows:

IP150 running 4.40 (supports direct IP connect) EVO192 Python 3.5.3

PAI connects to the EVO, enumerates all values (Zones, Partitions etc.), connects to my MQTT server and then throws the following error:

INFO:PAI.paradox.paradox:Connection OK Exception in thread mqtt: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 70, in run self.handle_change(item[2]) File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 296, in handle_change "{}".format(publish_value), 0, cfg.MQTT_RETAIN) File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 361, in publish self.mqtt.publish(topic, value, qos, retain) File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 1134, in publish raise ValueError('Publish topic cannot contain wildcards.') ValueError: Publish topic cannot contain wildcards.

At this point, my MQTT servers shows that the client disconnects.

I have tried the DEV branch and the same seems to take place.

Thanks for all the hard work! Been desperate to finally get my Paradox into HA.

Justin

yozik04 commented 5 years ago

Dev branch is under big rewrite right now.

This is last stable dev commit https://github.com/jpbarraca/pai/commit/8f6c59b08f7b7c9e00b1dd061cb03874e3073298

yozik04 commented 5 years ago

What you have in MQTT_BASE_TOPIC ?

juzzmoore commented 5 years ago

My MQTT_BASE_TOPIC is 'paradox'

Thanks

yozik04 commented 5 years ago

Please copy log lines with Partition and zone names here. Most probably you have some special symbol in the partition or zone name.

Jevgeni

5 янв. 2019 г., в 19:06, juzzmoore notifications@github.com написал(а):

My MQTT_BASE_TOPIC is 'paradox'

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

juzzmoore commented 5 years ago

Hi there,

See as follows – might be the “+” in the partition name – I will adjust in the meantime.

2019-01-05 20:03:04,668 - INFO - PAI.paradox.hardware.evo.panel - Authentication Success

INFO:PAI.paradox.hardware.evo.panel:Authentication Success

2019-01-05 20:03:04,879 - INFO - PAI.paradox.hardware.panel - Updating Labels from Panel

INFO:PAI.paradox.hardware.panel:Updating Labels from Panel

2019-01-05 20:03:11,516 - INFO - PAI.paradox.hardware.panel - Pgm: PGM_01, PGM_03, PGM_06, PGM_09, PGM_31, PGM_07, PGM_15, PGM_16, PGM_18, PGM_11, PGM_28, PGM_29, PGM_30, PGM_05, PGM_27, PGM_02, PGM_22, PGM_10, PGM_08, PGM_14, PGM_23, PGM_32, PGM_12, PGM_24, PGM_17, PGM_04, PGM_21, PGM_25, PGM_13, PGM_19, PGM_20, PGM_26

INFO:PAI.paradox.hardware.panel:Pgm: PGM_01, PGM_03, PGM_06, PGM_09, PGM_31, PGM_07, PGM_15, PGM_16, PGM_18, PGM_11, PGM_28, PGM_29, PGM_30, PGM_05, PGM_27, PGM_02, PGM_22, PGM_10, PGM_08, PGM_14, PGM_23, PGM_32, PGM_12, PGM_24, PGM_17, PGM_04, PGM_21, PGM_25, PGM_13, PGM_19, PGM_20, PGM_26

2019-01-05 20:03:11,674 - INFO - PAI.paradox.hardware.panel - Partition: Workshop, House_+_Fence

INFO:PAI.paradox.hardware.panel:Partition: Workshop, House_+_Fence

2019-01-05 20:03:12,067 - INFO - PAI.paradox.hardware.panel - User: Pannic_1, Workshop, User_005, Justin, Kirsty

INFO:PAI.paradox.hardware.panel:User: Pannic_1, Workshop, User_005, Justin, Kirsty

2019-01-05 20:03:13,556 - INFO - PAI.paradox.hardware.panel - Zone: Workshop_Right, Workshop_Door, Lounge_Door, Bedroom_PIR, Workshop_PIR, Workshop_Left, Sunroom_Door, Workshop_Deck, Front_Door, Lounge_PIR, Zone_016, Zone_018, Passage_PIR, Kitchen_Door, Zone_015, Dining_PIR, Zone_019, Fence, Zone_017

INFO:PAI.paradox.hardware.panel:Zone: Workshop_Right, Workshop_Door, Lounge_Door, Bedroom_PIR, Workshop_PIR, Workshop_Left, Sunroom_Door, Workshop_Deck, Front_Door, Lounge_PIR, Zone_016, Zone_018, Passage_PIR, Kitchen_Door, Zone_015, Dining_PIR, Zone_019, Fence, Zone_017

2019-01-05 20:03:29,784 - INFO - PAI.paradox.hardware.panel - Bus-Module:

INFO:PAI.paradox.hardware.panel:Bus-Module:

2019-01-05 20:03:29,786 - INFO - PAI.paradox.hardware.panel - Door:

INFO:PAI.paradox.hardware.panel:Door:

2019-01-05 20:03:29,787 - INFO - PAI.paradox.paradox - Connection OK

INFO:PAI.paradox.paradox:Connection OK

Exception in thread mqtt:

Traceback (most recent call last):

File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner

self.run()

File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 70, in run

self.handle_change(item[2])

File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 296, in handle_change

"{}".format(publish_value), 0, cfg.MQTT_RETAIN)

File "/home/pi/pai/paradox/interfaces/mqtt_interface.py", line 361, in publish

self.mqtt.publish(topic, value, qos, retain)

File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 1134, in publish

raise ValueError('Publish topic cannot contain wildcards.')

ValueError: Publish topic cannot contain wildcards.

From: Jevgeni Kiski notifications@github.com Reply-To: jpbarraca/pai reply@reply.github.com Date: Saturday, January 5, 2019 at 19:34 To: jpbarraca/pai pai@noreply.github.com Cc: juzzmoore justin@eightball.co.za, Author author@noreply.github.com Subject: Re: [jpbarraca/pai] MQTT error (#39)

Please copy log lines with Partition and zone names here. Most probably you have some special symbol in the partition or zone name.

Jevgeni

5 янв. 2019 г., в 19:06, juzzmoore notifications@github.com написал(а):

My MQTT_BASE_TOPIC is 'paradox'

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

juzzmoore commented 5 years ago

Hi there,

It was the "+" in the partition name. I've updated and all working now!

Thanks for the help!!

yozik04 commented 5 years ago

Great! But it requires a fix anyway =)