eavanvalkenburg / sia

SIA alarm systems integration into Home Assistant
MIT License
48 stars 11 forks source link

Logs fill up with automatic test message exceptions #18

Closed etnoy closed 3 years ago

etnoy commented 4 years ago

Ubuntu 18.04. Home Assistant 0.112.2 Sia component 0.3.2

Describe the bug

SIA works excellent with my Ajax Hub Plus alarm. No smoke or moisture sensors. I can read the state of the alarm in HA just fine. However, the system logs fill up with the below line, or a variation thereof.

Please let me know if I can give more information. There doesn't seem to be a full python stack trace, only the "'NoneType' object has no attribute 'bus'."

Debug log

WARNING (MainThread) [pysiaalarm.aio.sia_server] Last event: Content: _04:24:10,07-14-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: AAA, Receiver: , Prefix: L0, Timestamp: 2020-07-14 04:24:10, Length: 0075, Sequence: , CRC: , Calc CRC: , Message type: *SIA-DCS, Encrypted Content: , Full Message: "., gave error in user function: 'NoneType' object has no attribute 'bus'.

eavanvalkenburg commented 4 years ago

That is quite strange, this error means that the function in the component that handles the state updates (user function) gives an error, but there is no explicit call for a bus attribute in the user function, so I'm a bit at a loss where this comes from. If you find anything else let me know, I will see if I can find something.

Brumhilde commented 4 years ago

Still an issue in version 0.3.3. Also I cannot remove the warning with:

logger:
  default: warn
  logs:
    custom_components.sia: error
eavanvalkenburg commented 4 years ago

Please check with v0.3.4!

etnoy commented 4 years ago

Same with 0.3.4 unfortunately :-/

eavanvalkenburg commented 4 years ago

Just noticed this myself, but not at home so can't fix it now, will look at it tomorrow

hivemindery commented 4 years ago

Noticed the same issue in mine with logs filling up - it seemed to be caused by me disabling the smoke and moisture sensors (as I don't have those). When I enabled them again the errors stopped. YMMV but worth a try.

etnoy commented 4 years ago

FWIW, I have also disabled smoke and moisture detectors.

eavanvalkenburg commented 4 years ago

just created v0.3.5 release that should address this for now, am working on better understanding where this came from.

eavanvalkenburg commented 4 years ago

Just release v0.3.6, please give it a try and let me know if this solves things!