rainepretorius / olarm-ha-integration

Integration for Olarm devices created by a BSC(Computer Science and Mathematics) student.
https://raine.pretoriusse.net
BSD 2-Clause "Simplified" License
30 stars 13 forks source link

[Bug]: Errors because not all expected json properties exist for all alarms (pgm and ukey) #90

Closed Cha0s2nd closed 11 months ago

Cha0s2nd commented 1 year ago

Contact Details

cha0s2nd@outlook.com

What happened?

The pgm and ukey json values do not exist for all alarms.

Some null checks or a try catch, should resolve the problem.

image image

Version

2.0.1

Relevant log output form Home Assistant

2023-10-30 10:16:10.922 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:16:10.922 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:18:10.931 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:18:10.931 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:20:12.522 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:20:12.522 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:22:12.945 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:22:12.945 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:24:13.513 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:24:13.513 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:26:13.920 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:26:13.920 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)
2023-10-30 10:28:13.918 ERROR (MainThread) [custom_components.olarm_sensors] Error geting pgm setup data for Olarm device (e844c8f2-587a-41b2-892e-cf638b00968f)

Downloaded integration debug logs.

N/A
rainepretorius commented 1 year ago

Thanks @Cha0s2nd , Will have a look. I see uou are also running version 2.0.1 where version 2.2.6 has been released last week to help try and battle the restrictions of Olarms api limiting.

Cha0s2nd commented 1 year ago

It's my brother's setup, it's not creating sensors so he hasn't updated, busy setting up a fix and will push shortly.

rainepretorius commented 1 year ago

It's my brother's setup, it's not creating sensors so he hasn't updated, busy setting up a fix and will push shortly.

A ok. Cause I wont be able to troubkeshoot old versions, as I do not have the code.

Cha0s2nd commented 1 year ago

Thanks @Cha0s2nd , Will have a look. I see uou are also running version 2.0.1 where version 2.2.6 has been released last week to help try and battle the restrictions of Olarms api limiting.

I'm finding the alarm panels to be very slow to update, more than the interval set, sometime it take a minute or 2. Seems like the too many requests are a big issue. Have you made any progress on it?

Also, the webhooks only do action updates, there's no zone updates from them.

rainepretorius commented 1 year ago

Thanks @Cha0s2nd , Will have a look. I see uou are also running version 2.0.1 where version 2.2.6 has been released last week to help try and battle the restrictions of Olarms api limiting.

I'm finding the alarm panels to be very slow to update, more than the interval set, sometime it take a minute or 2. Seems like the too many requests are a big issue. Have you made any progress on it?

Also, the webhooks only do action updates, there's no zone updates from them.

I have mode no progress with Olarm on the api limiter. They have said to me today that they plan to release the MQTT standard before year end. I was collecting data from the webhooks to share to end the discussion that webhooks will work once and for all.