ParadoxRs232toMqtt icon indicating copy to clipboard operation
ParadoxRs232toMqtt copied to clipboard

readserial crash!

Open liakoumedos opened this issue 4 years ago • 1 comments

Hi panagiotis, i am using your code over a year with no problem. But now i make some modifications in ordered to stay online with the SP6000 the wemos. i am running the panelstatus commands evry 20 seconds in order to have the paradox status. But as it started well after it crashes. something goes wrong with serialread and serialreadquick. as example. paradox is sending: 52 00 80 00 00 00 00 00 00 14 14 04 06 10 0a cd 9a 97 00 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 52 00 80 01 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 d9 52 00 80 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d4 at paradox status 0,1,2 request and the wemos is reading: D4 52 08 00 00 00 01 41 44 61 01 9D 09 A9 70 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 52 08 01 00 00 00 00 00 00 03 00 20 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D9 52 08 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Suddenly it crash and is reading as fisrt byte the checksum from the previous message and also loses some bytes. Do you have any suggestion?? Its happening one or two hours later from the begining.

liakoumedos avatar Apr 06 '20 13:04 liakoumedos

In general you don't need to ask for status each 20 sec. And more general if sendallevents is "on" you will receive them when they are reported. You just need to monitor "event" and "sub_event" and take corresponding actions. It is also important to know, that not all events are reported immediately. For instance absence of wireless keyboard or wireless detector (no battery) is reported after 24 hours by me. I'm with MG 5050 firmware v4.76. While zone state, arm/disarm, alarm in zone are reported immediately. From panel status information probably most important are Power Failure (but your server should know if there is power supply or not), Battery Voltage (but you cannot do nothing if it is low and no power supply) and Battery Failure = replace battery (for this you can check once per month or per week at least)...

Angel0ffDeath avatar Apr 07 '20 15:04 Angel0ffDeath