Code Monkey home page Code Monkey logo

Comments (25)

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024 1

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

from sia.

IamMikl avatar IamMikl commented on August 30, 2024

I have the same issue.

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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.

from sia.

IamMikl avatar IamMikl commented on August 30, 2024

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

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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.

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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?

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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.

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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

from sia.

akarpenkoua avatar akarpenkoua commented on August 30, 2024

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

from sia.

akarpenkoua avatar akarpenkoua commented on August 30, 2024

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

from sia.

akarpenkoua avatar akarpenkoua commented on August 30, 2024

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?

from sia.

akarpenkoua avatar akarpenkoua commented on August 30, 2024

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 (

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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.

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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.

from sia.

jyourstone avatar jyourstone commented on August 30, 2024

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?

from sia.

akarpenkoua avatar akarpenkoua commented on August 30, 2024

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

from sia.

eavanvalkenburg avatar eavanvalkenburg commented on August 30, 2024

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!

from sia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.