Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readserial crash! #68

Open
liakoumedos opened this issue Apr 6, 2020 · 1 comment
Open

readserial crash! #68

liakoumedos opened this issue Apr 6, 2020 · 1 comment

Comments

@liakoumedos
Copy link

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.

@Angel0ffDeath
Copy link

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)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants