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
337 stars 90 forks source link

Many exceptions #193

Closed badubo closed 3 months ago

badubo commented 3 years ago

Alarm system

MG5050 with a usb307

Environment

raspberry with docker

Git branch

Master and dev branch

Describe the bug

I'm using the library since almost 2 years. With IP150 and swan servers. Even if reliable, it is not very fast so I decided to go to the serial connection. My old version is working by simply adapting the connection type. But I wanted to give a try to new versions. Even if it seems to work, I get many exceptions in the logs, always at the same place.

To Reproduce

Docker version as in the wiki, even with a minimal configuration (but MQTT enabled)

Logs

2021-01-04 18:29:46,796 - ERROR - PAI.paradox.exceptions - Unhandled exception in async loop(<_UnixSelectorEventLoop running=True closed=False debug=False>): invalid literal for int() with base 10: 'disarmed' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/paradox/lib/ps.py", line 59, in sendMessage *(l.call(**msgData) for l in self.listeners[topicName]) File "/usr/local/lib/python3.7/site-packages/paradox/lib/ps.py", line 28, in call result = self.callback(**kwargs2) File "/usr/local/lib/python3.7/site-packages/paradox/interfaces/mqtt/basic.py", line 413, in _handle_panel_change value, File "/usr/local/lib/python3.7/site-packages/paradox/interfaces/mqtt/basic.py", line 440, in _publish publish_value = int(value) ValueError: invalid literal for int() with base 10: 'disarmed' or (more often) 2021-01-04 18:29:46,736 - ERROR - PAI.paradox.exceptions - Unhandled exception in async loop(<_UnixSelectorEventLoop running=True closed=False debug=False>): int() argument must be a string, a bytes-like object or a number, not 'datetime.datetime' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/paradox/lib/ps.py", line 59, in sendMessage *(l.call(**msgData) for l in self.listeners[topicName]) File "/usr/local/lib/python3.7/site-packages/paradox/lib/ps.py", line 28, in call result = self.callback(**kwargs2) File "/usr/local/lib/python3.7/site-packages/paradox/interfaces/mqtt/basic.py", line 413, in _handle_panel_change value, File "/usr/local/lib/python3.7/site-packages/paradox/interfaces/mqtt/basic.py", line 440, in _publish publish_value = int(value) TypeError: int() argument must be a string, a bytes-like object or a number, not 'datetime.datetime' For my test, I restarted from a new directory and a new config. I don't think that this is a problem with the previous working configuration.

jpbarraca commented 3 years ago

Can you send a detailed log? What version are you using?

badubo commented 3 years ago

Sure, see attachement.(debug for a couple of minutes) Tests have been made with the official docker image as in the wiki (latest and dev-latest). The provided logs are made with the current master from git paradox.txt

badubo commented 3 years ago

Hi, Do you need something else? Thanks

bwibwi13 commented 1 year ago

Hello, I am facing the same issue. At least, the log traces are the same.. Did you find a solution to this problem?

Alarm system

Panel model: EVO192 Access mode IP150

Environment

pai-service on a Raspberry Pi 3 running Debian Python 3.7.3

I can provide logs if it helps.

Thanks for your help.

yozik04 commented 3 months ago

I see it is fixed.