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]: Index out of range #70

Closed JacquesDuToit closed 1 year ago

JacquesDuToit commented 1 year ago

Contact Details

jacques@itdecs.co.za

What happened?

i keep getting this after install i cant seem to get it to work is it something im doing wrong?

Version

2.2.2

Relevant log output

IndexError: list index out of range
2023-08-07 07:14:42.740 DEBUG (MainThread) [custom_components.olarm_sensors] Finished fetching Olarm Coordinator (19 plataan) data in 0.479 seconds (success: False)
2023-08-07 07:14:52.489 ERROR (MainThread) [custom_components.olarm_sensors] Unexpected error fetching Olarm Coordinator (19 plataan) data: list index out of range
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/olarm_sensors/coordinator.py", line 142, in _async_update_data
    return await self.update_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/olarm_sensors/coordinator.py", line 110, in update_data
    self.panel_data = await self.api.get_panel_states(self.devices_json)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/olarm_sensors/olarm_api.py", line 299, in get_panel_states
    if olarm_zones[area_num] == "":
       ~~~~~~~~~~~^^^^^^^^^^
JacquesDuToit commented 1 year ago

Sorry i have a paradox sp65

rainepretorius commented 1 year ago

Sorry i have a paradox sp65

Hi @JacquesDuToit ,

I will look into this error asap. This os the first error in a while that I have gotten. I will check what could cause it and make the relevant changes to resolve this issue.

JacquesDuToit commented 1 year ago

Hi did u manage to check the error is it something im doing wrong?

rainepretorius commented 1 year ago

I checked through the code and the error and could not replicate it. How is your Olarm Set up? How many areas do you have on your panel and how many zones are set up on Olarm here: Devices -> Setup -> Areas?

JacquesDuToit commented 1 year ago

2 areas 17 zonesSent from my Galaxy -------- Original message --------From: Raine Pretorius @.> Date: 2023/08/23 08:39 (GMT+02:00) To: rainepretorius/olarm-ha-integration @.> Cc: JacquesDuToit @.>, Mention @.> Subject: Re: [rainepretorius/olarm-ha-integration] [Bug]: Index out of range (Issue #70) I checked through the code and the error and could not replicate it. How is your Olarm Set up? How many areas do you have on your panel and how many zones are set up on Olarm here: Devices -> Setup -> Areas?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rainepretorius commented 1 year ago

Ok. And the setup on the app?

JacquesDuToit commented 1 year ago

I Don’t Konow what im doing wrong so I go to settings add integration add olarm sensonrs put in api code and then it gives me 1 device and 1 entity. Entity says button19_ Refresh when I refresh it gives an error

From: Raine Pretorius @.> Sent: Thursday, August 24, 2023 9:15 AM To: rainepretorius/olarm-ha-integration @.> Cc: JacquesDuToit @.>; Mention @.> Subject: Re: [rainepretorius/olarm-ha-integration] [Bug]: Index out of range (Issue #70)

Ok. And the setup on the app?

— Reply to this email directly, view it on GitHub https://github.com/rainepretorius/olarm-ha-integration/issues/70#issuecomment-1691133766 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AVXHZNR3LDQGCNM26L6OFD3XW35OXANCNFSM6AAAAAA3GPSD4Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AVXHZNXECAOKULKEIJP4DYDXW35OXA5CNFSM6AAAAAA3GPSD42WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTEZSTUM.gif Message ID: @. @.> >

JacquesDuToit commented 1 year ago

Here is the whole file I get

From: Raine Pretorius @.> Sent: Wednesday, August 23, 2023 8:39 AM To: rainepretorius/olarm-ha-integration @.> Cc: JacquesDuToit @.>; Mention @.> Subject: Re: [rainepretorius/olarm-ha-integration] [Bug]: Index out of range (Issue #70)

I checked through the code and the error and could not replicate it. How is your Olarm Set up? How many areas do you have on your panel and how many zones are set up on Olarm here: Devices -> Setup -> Areas?

— Reply to this email directly, view it on GitHub https://github.com/rainepretorius/olarm-ha-integration/issues/70#issuecomment-1689366957 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AVXHZNUKOY4PTX67LVSWYZDXWWQQ3ANCNFSM6AAAAAA3GPSD4Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AVXHZNU3IS67ZRAFSARBVFDXWWQQ3A5CNFSM6AAAAAA3GPSD42WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTEWGY22.gif Message ID: @.***>

rainepretorius commented 1 year ago

Hi @JacquesDuToit , I do not see the file. Can you maybe email it to me at raine.pretorius1@gmail.com ?

JacquesDuToit commented 1 year ago

From: Raine Pretorius @.> Sent: Wednesday, August 30, 2023 1:22 PM To: rainepretorius/olarm-ha-integration @.> Cc: JacquesDuToit @.>; Mention @.> Subject: Re: [rainepretorius/olarm-ha-integration] [Bug]: Index out of range (Issue #70)

Hi @JacquesDuToit https://github.com/JacquesDuToit , I do not see the file. Can you maybe email it to me at @. @.> ?

— Reply to this email directly, view it on GitHub https://github.com/rainepretorius/olarm-ha-integration/issues/70#issuecomment-1698973708 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AVXHZNSBXK43D4NKT4QCCN3XX4O5NANCNFSM6AAAAAA3GPSD4Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AVXHZNVUSY7C6IZTYC7NK6TXX4O5NA5CNFSM6AAAAAA3GPSD42WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTFIREAY.gif Message ID: @. @.> >

JacquesDuToit commented 1 year ago

IF i go to website on this it connects to the device how do i set this up in your software?

https://apiv4.olarm.co/api/v4/devices?accessToken=APIKEY


From: Raine Pretorius @.> Sent: Saturday, 09 September 2023 20:23 To: rainepretorius/olarm-ha-integration @.> Cc: JacquesDuToit @.>; Mention @.> Subject: Re: [rainepretorius/olarm-ha-integration] [Bug]: Index out of range (Issue #70)

Closed #70https://github.com/rainepretorius/olarm-ha-integration/issues/70 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/rainepretorius/olarm-ha-integration/issues/70#event-10324750508, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVXHZNSPYB3YETR2U6X4MBTXZSXZFANCNFSM6AAAAAA3GPSD4Y. You are receiving this because you were mentioned.Message ID: @.***>