Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Not working (unavailable) with Home Assistant 0.113.0 #24

Closed
jyourstone opened this issue Jul 25, 2020 · 25 comments
Closed

Not working (unavailable) with Home Assistant 0.113.0 #24

jyourstone opened this issue Jul 25, 2020 · 25 comments

Comments

@jyourstone
Copy link

Using HA 0.113.0, HACS 1.2.2 and SIA 0.3.5.

After installing HA 0.113.0 the SIA integration doesn't work anymore. When the alarm state changes, SIA picks it up for a minute or so, but then it just shows "Unavailable" until the next time the state changes, and so on.

From my logs (some info masked out):


Logger: pysiaalarm.aio.sia_server
Source: runner.py:119
First occurred: July 24, 2020, 1:31:58 PM (1646 occurrences)
Last logged: 6:56:06 PM

Last event: Content: }lf|#xxxxxxx|Nri0/RP0000]_16:51:49,07-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-07-25 16:51:49, Length: 007C, Sequence: 2609, CRC: 7B87, Calc CRC: 7B87, Message type: Automatic Test, Encrypted Content: BEF91305810054267EF69DAD8xxxxxxxxxxxxxxF31FF28373F2850DF80F40F218A689A2886F, Full Message: "*SIA-DCS"xxxxx#xxxxxxxxx[BEF913058xxxxxxxxxxxEED6B70B86AEC82C7062F31FF28373F2850DF80F40F218A689A2886F., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxxxxxxxxx- Last Heartbeat: 2020-07-25T16:51:50.147913+00:00>.
Last event: Content: at|#xxxxxxxxxx|Nri0/RP0000]_16:52:53,07-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-07-25 16:52:53, Length: 007C, Sequence: 2610, CRC: 8F86, Calc CRC: 8F86, Message type: Automatic Test, Encrypted Content: E7B8FB3FD4EF41B73A3E97B1xxxxxxxxxxxxxBE5B3389ECAE860F0C7E9D9295FBE, Full Message: "*SIA-DCS"2610L0#xxxxxxxxxxxx[E7B8FB3FD4EF41xxxxxxxxxxxxxxB8B8798FE49EA786CE793730FE348306BE5B3389ECAE860F0C7E9D9295FBE., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxxxxx- Last Heartbeat: 2020-07-25T16:52:54.022472+00:00>.
Last event: Content: W|#xxxxxxxxxxx|Nri0/RP0000]_16:53:57,07-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-07-25 16:53:57, Length: 007C, Sequence: 2611, CRC: 405E, Calc CRC: 405E, Message type: Automatic Test, Encrypted Content: 47501481CCAE96D35726138AxxxxxxxxxxxxxA92455A6FF321459A9FD01A27C68D527B12FBBD3D4D, Full Message: "*SIA-DCS"2611L0#xxxxxxxxxxx[47501481CCAE96D35726138ABxxxxxxxxxxxxxxxxxxxx6E0207D15BDA92455A6FF321459A9FD01A27C68D527B12FBBD3D4D., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxxxx- Last Heartbeat: 2020-07-25T16:53:58.135404+00:00>.
Last event: Content: 0|#xxxxxxxxxxxx|Nri0/RP0000]_16:55:01,07-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-07-25 16:55:01, Length: 007C, Sequence: 2612, CRC: CA39, Calc CRC: CA39, Message type: Automatic Test, Encrypted Content: 0634C833E6C4E561934EB85E2A2B1EEF7xxxxxxxxxxxxxxx029896F874DBB072F4069969C72, Full Message: "*SIA-DCS"2612L0#xxxxxxxxxxx[0634C833E6C4E561934xxxxxxxxxxxxxE41EDEF2DC99B55B815BD029896F874DBB072F4069969C72., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxxxx- Last Heartbeat: 2020-07-25T16:55:02.251481+00:00>.
Last event: Content: h|#xxxxxxxxxxx|Nri0/RP0000]_16:56:05,07-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-07-25 16:56:05, Length: 007C, Sequence: 2613, CRC: 0209, Calc CRC: 0209, Message type: Automatic Test, Encrypted Content: 65F65B2B95AB8401D519F67641E5Fxxxxxxxxxxxxxxxx05B11C81980D81E1D78034C160FBD13A37, Full Message: "*SIA-DCS"2613L0#xxxxxxxxxxx[65F65B2B95AB840xxxxxxxxxxxxxxD82FFAF7D05B11C81980D81E1D78034C160FBD13A37., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxxxxx- Last Heartbeat: 2020-07-25T16:56:06.111182+00:00>.


Logger: pysiaalarm.base_sia_server
Source: runner.py:119
First occurred: July 24, 2020, 2:35:51 PM (22 occurrences)
Last logged: 5:17:58 PM

Decrypting last line: xxxxxxxx"*SIA-DCS"2360L0#xxxxxxx[77DA3324B82261B28F632699FxxxxxxxxxxxxB20924251A0862538D0744C70BD39110C3ED7EA could not be parsed as a SIAEvent, content: � i|#xxxxxxxxxxxxxxxx|Nri0/RP0000]_12:26:24,07-25-2020
Decrypting last line: D170007C"*SIA-DCS"2391L0#xxxxxxxx[46E4226BFDC8145D00E6FA869C4038xxxxxxxxxxxxxF16AA247B3240680941D33767207FF051 could not be parsed as a SIAEvent, content: J |#xxxxxxxxxxxx|Nri0/RP0000]_12:59:57,07-25-2020
Decrypting last line: 00D3007C"*SIA-DCS"2473L0#xxxxxxxx[D1964C62F90AA8B197349C5D0BBxxxxxxxxxxxxxE42EA233A23650FB3FF72B5DD306300111D1B could not be parsed as a SIAEvent, content: p |#xxxxxxxxxxx|Nri0/RP0000]_14:27:47,07-25-2020
Decrypting last line: 76D3007C"*SIA-DCS"2476L0#xxxxxxxxxx[0B60D25CCDF01205EEC4330BBxxxxxxxxxxxxxxxxxE95BDC19F766F778CB8DC1D48FD725162CDA63 could not be parsed as a SIAEvent, content: 9 k|#xxxxxxxxxxx|Nri0/RP0000]_14:31:00,07-25-2020
Decrypting last line: 909D007C"*SIA-DCS"2521L0#xxxxxxxxx[9172995D1F0FFxxxxxxxxxxxxxxx96415490A560C3F055C69C098F92E4939446832D917DBE899 could not be parsed as a SIAEvent, content: k|#xxxxxxxxxxxx|Nri0/RP0000]_15:17:57,07-25-2020

Let me know if you need more detailed logs.

@IamMikl
Copy link

IamMikl commented Aug 10, 2020

I have the same issue.

@eavanvalkenburg
Copy link
Owner

Could you both (@IamMikl and @jyourstone) share your configs? and the type of system you have?

@jyourstone
Copy link
Author

I don't have any manual configuration since I added Sia through the Integration tab in HA. I'm using the regular Ajax Hub, not Plus or v2. Can I somehow get the configuration anyway?

I have noticed that when HA has been running for a few days the SIA integration starts working again. But after a reboot it stops working for a day or two again.

The Ajax app itself shows it's connected to the alarm gateway.

@IamMikl
Copy link

IamMikl commented Aug 11, 2020

Totally the same situation, all configured via UI and installed from HACS (Ajax Hub v1).
Unavailable all sensors and still have connected status in the application.
The version of custom_component: v0.3.5

Some additional information from my logs:
`Logger: pysiaalarm.aio.sia_server
Source: runner.py:119
First occurred: 7 серпня 2020 р., 15:55:59 (6091 occurrences)
Last logged: 0:33:08

Last event: Content: #|Nri0/RP0000]_21:29:20,08-11-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: , Receiver: None, Prefix: L0, Timestamp: 2020-08-11 21:29:20, Length: 0041, Sequence: 5923, CRC: FC10, Calc CRC: FC10, Message type: Automatic Test, Encrypted Content: None, Full Message: "SIA-DCS"5923L0#[#|Nri0/RP0000]_21:29:20,08-11-2020., gave error in user function: Attribute hass is None for <Entity 8796 - ****** - Last Heartbeat: 2020-08-11T21:29:00.609383+00:00>.
Last event: Content: #|Nri0/RP0000]_21:30:22,08-11-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: , Receiver: None, Prefix: L0, Timestamp: 2020-08-11 21:30:22, Length: 0041, Sequence: 5924, CRC: 152C, Calc CRC: 152C, Message type: Automatic Test, Encrypted Content: None, Full Message: "SIA-DCS"5924L0#[#|Nri0/RP0000]_21:30:22,08-11-2020., gave error in user function: Attribute hass is None for <Entity 8796 - ****** - Last Heartbeat: 2020-08-11T21:30:02.569300+00:00>.
Last event: Content: #|Nri0/RP0000]_21:31:24,08-11-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: , Receiver: None, Prefix: L0, Timestamp: 2020-08-11 21:31:24, Length: 0041, Sequence: 5925, CRC: B87D, Calc CRC: B87D, Message type: Automatic Test, Encrypted Content: None, Full Message: "SIA-DCS"5925L0#[#|Nri0/RP0000]_21:31:24,08-11-2020., gave error in user function: Attribute hass is None for <Entity 8796 - ****** - Last Heartbeat: 2020-08-11T21:31:04.522237+00:00>.
Last event: Content: #|Nri0/RP0000]_21:32:26,08-11-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: , Receiver: None, Prefix: L0, Timestamp: 2020-08-11 21:32:26, Length: 0041, Sequence: 5926, CRC: D06C, Calc CRC: D06C, Message type: Automatic Test, Encrypted Content: None, Full Message: "SIA-DCS"5926L0#[#|Nri0/RP0000]_21:32:26,08-11-2020., gave error in user function: Attribute hass is None for <Entity 8796 - ****** - Last Heartbeat: 2020-08-11T21:32:06.502077+00:00>.
Last event: Content: #|Nri0/RP0000]_21:33:28,08-11-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: , Receiver: None, Prefix: L0, Timestamp: 2020-08-11 21:33:28, Length: 0041, Sequence: 5927, CRC: A2DC, Calc CRC: A2DC, Message type: Automatic Test, Encrypted Content: None, Full Message: "SIA-DCS"5927L0#[#|Nri0/RP0000]_21:33:28,08-11-2020., gave error in user function: Attribute hass is None for <Entity 8796 - ****** - Last Heartbeat: 2020-08-11T21:33:08.434576+00:00>..`

@eavanvalkenburg
Copy link
Owner

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

@jyourstone
Copy link
Author

jyourstone commented Aug 12, 2020

Still not working I'm afraid, now running HA 0.114.0 and SIA 0.3.6

Here are the logs:

Logger: pysiaalarm.aio.sia_server
Source: /usr/local/lib/python3.8/site-packages/pysiaalarm/aio/sia_server.py:65
First occurred: 8:11:40 PM (103 occurrences)
Last logged: 10:00:24 PM

Last event: Content: �`A|#xxxxx|Nri0/RP0000]_19:56:08,08-12-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-08-12 19:56:08, Length: 007C, Sequence: 3340, CRC: C41C, Calc CRC: C41C, Message type: Automatic Test, Encrypted Content: EAEF510E2D8D28D1B5xxxxxxxxx68790FB0B8D31C2DD214AC45A0CD955724D4, Full Message: "*SIA-DCS"3340L0#xxxxx[EAEF510E2D8D28D1B50C5xxxxxxxxxxD5A63A3A68790FB0B8D31C2DD214AC45A0CD955724D4., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxx- Last Heartbeat: 2020-08-12T19:56:08.802586+00:00>.
Last event: Content: n|#xxxxx|Nri0/RP0000]_19:57:12,08-12-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-08-12 19:57:12, Length: 007C, Sequence: 3341, CRC: 0682, Calc CRC: 0682, Message type: Automatic Test, Encrypted Content: CCE223D86F784C856E0669F6E01AF07914B182DF7D6xxxxxxxxxxxxxCFD977B39000A1CAA31DB775FCD746D, Full Message: "*SIA-DCS"3341L0#xxxxx[CCE223D86F784C856E0669F6E01xxxxxxxxxxx65231D7CFD977B39000A1CAA31DB775FCD746D., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxx- Last Heartbeat: 2020-08-12T19:57:12.664939+00:00>.
Last event: Content: 7|#xxxxx|Nri0/RP0000]_19:58:16,08-12-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-08-12 19:58:16, Length: 007C, Sequence: 3342, CRC: 2EC6, Calc CRC: 2EC6, Message type: Automatic Test, Encrypted Content: B1B74D002966C729969AED21D39742697Axxxxxxxxxxxxxxxxxxx10617F0FD9B6DAC1007644CD92A3D84C0AE33C, Full Message: "*SIA-DCS"3342L0#xxxxx[B1B74D00xxxxxxxxxxxxxB6B74CBBDDE86710617F0FD9B6DAC1007644CD92A3D84C0AE33C., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxx- Last Heartbeat: 2020-08-12T19:58:16.763963+00:00>.
Last event: Content: �v|#xxxxx|Nri0/RP0000]_19:59:20,08-12-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-08-12 19:59:20, Length: 007C, Sequence: 3343, CRC: CD9E, Calc CRC: CD9E, Message type: Automatic Test, Encrypted Content: xxxxxxxxxxxxx, Full Message: "*SIA-DCS"3343L0#xxxxx[xxxxxxxxxxxxxxxx., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxx- Last Heartbeat: 2020-08-12T19:59:20.627750+00:00>.
Last event: Content: D|#xxxxx|Nri0/RP0000]_20:00:24,08-12-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: xxxxx, Receiver: None, Prefix: L0, Timestamp: 2020-08-12 20:00:24, Length: 007C, Sequence: 3344, CRC: 9B7E, Calc CRC: 9B7E, Message type: Automatic Test, Encrypted Content: xxxxxxxxxxxxxxxx, Full Message: "*SIA-DCS"3344L0#xxxxx[xxxxxxxxxxxxxx., gave error in user function: Attribute hass is None for <Entity 8124 - xxxxx- Last Heartbeat: 2020-08-12T20:00:24.729331+00:00>.
Log Details (ERROR)
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:462
Integration: Sensor (documentation, issues)
First occurred: 8:10:48 PM (1 occurrences)
Last logged: 8:10:48 PM

Platform sia does not generate unique IDs. ID 8124_xxxxx_last_heartbeat is already used by sensor.8124_xxxxx_last_heartbeat - ignoring sensor.8124_xxxxx_last_heartbeat

@eavanvalkenburg
Copy link
Owner

Have you disabled any of the sia entities (per zone a alarm, two binary sensors and a sensor)?

@jyourstone
Copy link
Author

jyourstone commented Aug 12, 2020

No, they are all enabled:

image

You can see here the thin lines when the alarm is armed or disarmed. It reports in then, but only for a minute.

image

@eavanvalkenburg
Copy link
Owner

Ok thanks for checking, I will have to look deeper, that warning is new since about 0.112 but I haven't discovered where it came from yet...

@jyourstone
Copy link
Author

jyourstone commented Aug 12, 2020

No problem, thank you for taking the time. Let me know if you need more help.

@jyourstone
Copy link
Author

jyourstone commented Aug 23, 2020

I don't know if you changed anything, but as of a couple of days ago it's working as it should again.
Now running SIA 0.3.7, HACS 1.5.2 and HassOS 4.12.
I still get the same error logs though.

I'll keep monitoring it for a few days.

EDIT
Actually, the issue occurs again now, after I rebooted HA. It seems to only happen after a reboot, and then it "fixes" itself a while after the reboot. I'll post again when it starts working automagically.

@eavanvalkenburg
Copy link
Owner

ok, interesting, so the way this protocol works in combination with HA, is that the component listens for messages from the alarm, if any kind of message comes in it starts a timer and the ping interval setting determines how long that timer is, after that amount of time has gone, it will mark the alarm(s) and binary sensor(s) in that zone as unavailable, if a new message comes in it will once again make them available again. So the key is that the ping interval you have setup in HA and in your alarm system are the same, because otherwise this is likely going to lead to unavailables. During startup it tries to load the previous state from before, so if that was unavailable it will be unavailable, but I have some doubts about the code doing that so need to have a look at that piece anyway. for now, could you check your intervals?

@jyourstone
Copy link
Author

In Ajax I have it set to 1 minute.
When I set up SIA it was done manually and then I set it to 1 minute as well.
Now when the integration is used instead I don't know where I check this.

@eavanvalkenburg
Copy link
Owner

It is in the config flow now, you could just readd the integration, or look inside the config_entries file in .storage.

@jyourstone
Copy link
Author

Ping interval is set to 1: "ping_interval": 1,

@akarpenkoua
Copy link

Hi, unfortunately, the same issue for me.
The logs are pretty the same.
Ping interval set to 1 minute.

@akarpenkoua
Copy link

akarpenkoua commented Aug 25, 2020

image
I do not know if it will help, but the behavior is close to expected. SIA alarm panel entity gets unavailable exactly in 1 minute 30 seconds after getting the status. Work the same for arming, night arming, disarming.

Logger: pysiaalarm.aio.sia_server
Source: /usr/local/lib/python3.8/site-packages/pysiaalarm/aio/sia_server.py:65
First occurred: 1:21:34 PM (14 occurrences)
Last logged: 1:35:32 PM

Last event: Content: ?n�4|#A44|Nri0/RP0000]_10:31:33,08-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: A44, Receiver: None, Prefix: L0, Timestamp: 2020-08-25 10:31:33, Length: 0075, Sequence: 5129, CRC: 34EA, Calc CRC: 34EA, Message type: Automatic Test, Encrypted Content: 706FE15E31A9D7C413E09FE0094B3C99327EF1E70xxxxxxxxxxBC9CECB32AB582C2D6084D0CDD4205B0D8CAC, Full Message: "*SIA-DCS"5129L0#A44[706FE15E31A9D7C413E09FE0094B3C99xxxxxxxxxx0BF89587A336124E686BC9CECB32AB582C2D6084D0CDD4205B0D8CAC., gave error in user function: Attribute hass is None for <Entity 2068 - A44 - Last Heartbeat: 2020-08-25T10:31:15.355005+00:00>.
Last event: Content: ��A|#A44|Nri0/RP0000]_10:32:37,08-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: A44, Receiver: None, Prefix: L0, Timestamp: 2020-08-25 10:32:37, Length: 0075, Sequence: 5130, CRC: 335A, Calc CRC: 335A, Message type: Automatic Test, Encrypted Content: 6F4893765884659E22DB236EF112FD2ECCD0054C4DCA0D63Exxxxxxxxxx183866924F5CFC015D4650208ECE, Full Message: "*SIA-DCS"5130L0#A44[6F4893765884659E22DB236EF112FDxxxxxxxxxxA0D63EC9BDF4F5B834BA44A8B183866924F5CFC015D4650208ECE., gave error in user function: Attribute hass is None for <Entity 2068 - A44 - Last Heartbeat: 2020-08-25T10:32:19.454404+00:00>.
Last event: Content: iYw|#A44|Nri0/RP0000]_10:33:42,08-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: A44, Receiver: None, Prefix: L0, Timestamp: 2020-08-25 10:33:42, Length: 0075, Sequence: 5131, CRC: 68B6, Calc CRC: 68B6, Message type: Automatic Test, Encrypted Content: AFC27BF29F684FDE0AB07A8C0062AD986C7EE35C8EE4EB36190225E3D065Bxxxxxxxxxx172A5098C36E7CE6610D3D, Full Message: "*SIA-DCS"5131L0#A44[AFC27BF29F684FDE0AB07A8C0062AD986C7EE35Cxxxxxxxxxx0225E3D065B817D7B64D37B3172A5098C36E7CE6610D3D., gave error in user function: Attribute hass is None for <Entity 2068 - A44 - Last Heartbeat: 2020-08-25T10:33:24.264429+00:00>.
Last event: Content: #C7�m1|#A44|Nri0/RP0000]_10:34:46,08-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: A44, Receiver: None, Prefix: L0, Timestamp: 2020-08-25 10:34:46, Length: 0075, Sequence: 5132, CRC: 5486, Calc CRC: 5486, Message type: Automatic Test, Encrypted Content: BC2AC71A45D57F207FE632674E326A1AB5D7666809D85FC6FD6xxxxxxxxxx4BAE74B623E25CF7F435C4014607C8E0CD8, Full Message: "*SIA-DCS"5132L0#A44[BC2AC71A45D57F207FE632674E326A1AB5D766680xxxxxxxxxx6FD67D7781104F4BAE74B623E25CF7F435C4014607C8E0CD8., gave error in user function: Attribute hass is None for <Entity 2068 - A44 - Last Heartbeat: 2020-08-25T10:34:28.362449+00:00>.
Last event: Content: 3U`=V^|#A44|Nri0/RP0000]_10:35:50,08-25-2020, Zone: 0, Code: RP, Message: 0000, Concerns: Unused, Type: Automatic Test, Description: Automatic communication test report, Account: A44, Receiver: None, Prefix: L0, Timestamp: 2020-08-25 10:35:50, Length: 0075, Sequence: 5133, CRC: 1877, Calc CRC: 1877, Message type: Automatic Test, Encrypted Content: A2815D4F5DFDDFEA574F9E7626EEC9ACD4D06BAB64CC12CCEC7DDxxxxxxxxxx3181CB3908125E15024744B83F1140E39149, Full Message: "*SIA-DCS"5133L0#A44[A2815D4F5DFDDFEA574F9E7626EEC9ACD4D06BAB64CxxxxxxxxxxCEC7DDD2523033181CB3908125E15024744B83F1140E39149., gave error in user function: Attribute hass is None for <Entity 2068 - A44 - Last Heartbeat: 2020-08-25T10:35:32.222514+00:00>.

@eavanvalkenburg
Copy link
Owner

thanks for those logs @akarpenkoua that helps, seems that indeed all works except the Attribute hass is None for ... error which I still haven't found a cause for, normally, that message signals that each of the sensors in that account should reset their unavailability timer for another ping_interval+PING_INTERVAL_MARGIN (in your case 1,5 minutes, the interval_margin is to make it less sensitive because of the async nature of things, so is set to 30 seconds, which would be enough given those timestamps).

@akarpenkoua
Copy link

Hi, few observations/tests from my side.
I have had some time all working fine after restart of HA. I can not find the algo here, but.

I'm doing a lot of development now and restarting HA a lot per day. I would say, that 2 of 10 restarts gave me working SIA integration.

1st clue was - bad HACS install as it was not starting well during startup +- 3 of 10 times. I noticed that the latest HACS is installing from UI, not Configuration file.
Now I have transferred to UI integration, still - SIA is having the same errors.

Anyway, can others confirm that you have HACS issues on start sometime?

@akarpenkoua
Copy link

akarpenkoua commented Aug 31, 2020

One more update from logs:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:462
Integration: Sensor (documentation, issues)
First occurred: 6:22:00 PM (1 occurrences)
Last logged: 6:22:00 PM

Platform sia does not generate unique IDs. ID 2068_A44_last_heartbeat is already used by sensor.2068_a44_last_heartbeat - ignoring sensor.2068_A44_last_heartbeat

I have tried full reinstall of HACS + SIA. With changing port + name + key.
The same issue (

@jyourstone
Copy link
Author

I've restarted HA about 10 times since my last reply, SIA hasn't worked at all though.
Now I tried restarting HA directly after arming Ajax and so far SIA reports the correct status about 10 mins later.

I haven't got any problems with HACS, it always starts without issues.

@eavanvalkenburg
Copy link
Owner

One more update from logs:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:462
Integration: Sensor (documentation, issues)
First occurred: 6:22:00 PM (1 occurrences)
Last logged: 6:22:00 PM

Platform sia does not generate unique IDs. ID 2068_A44_last_heartbeat is already used by sensor.2068_a44_last_heartbeat - ignoring sensor.2068_A44_last_heartbeat

I have tried full reinstall of HACS + SIA. With changing port + name + key.
The same issue (

This might be due to the switch between config and UI, you might want to check by deleting the integration and then going into the .storage folder and deleting all references to sia from config_entries, device_registry, restore_state and then readding the integration. I'm running this exact same version and I reboot HA a lot because of dev and logging but mine works like a charm, so I can't really think of a reason why it wouldn't work. As part of the work to get it officially into HA the code has improved but I have to port that back into the custom component and haven't gotten around to that yet, that includes fixing the hass is None error.

@jyourstone
Copy link
Author

Update:

SIA is still reporting in the status correctly, even after disarming the alarm.

This after the last HA restart yesterday, directly after arming The alarm.

Is this helpful?

@akarpenkoua
Copy link

I have tried jyourstone's trick. For the first two times did not helped. Third time worked. 4 hours in a row working without error.

@eavanvalkenburg My intuition is that it's somewhere between HACS did not started yet but Sia have a response and the script has worked it out correctly

@eavanvalkenburg
Copy link
Owner

It should have nothing to do with HACS starting, once added it starts just as any other component. What's important about the SIA protocol is that it is passive, it will not send a message to HA unless there is a reason on the alarm side, those reasons are:

  • Changes to the state of the alarm (arm, disarm, night, triggered etc.)
  • ping intervals, whatever is set for that, a RP message is sent.
  • Changes to the setup will also send a message which usually gets reflected in the attributes of the heartbeat sensor

So the easiest way to test is to set the alarm or change a setting. Hope this helps in understanding the logs and setup a bit better!

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

No branches or pull requests

4 participants