Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to get zone configuration and status #8

Open
stezak77 opened this issue Aug 30, 2021 · 4 comments
Open

Add API to get zone configuration and status #8

stezak77 opened this issue Aug 30, 2021 · 4 comments

Comments

@stezak77
Copy link

stezak77 commented Aug 30, 2021

It would be useful to have methods returning details of all zones, such as, for each zone:

  • zone configuration:
    • name
    • type (disabled, entry, perimeter, interior...)
  • zone status bitmap (alarm, bypass, fault, low battery...)

To optimize requests and connections, it might be worth to have a single method returning both alarm status and zones info.

The goal is to have home assistant iAlarm integration eventually implement zone sensors once such support is available from this API.

@bigmoby
Copy link

bigmoby commented Oct 3, 2024

With PR #11 has been implemented the async def get_zone_status(self) -> list[ZoneStatusType]:. This function will return something like that:

[
   {
      "zone_id": 1,
      "name": "porta soggiorno",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 2,
      "name": "porta cucina",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>",
         "<StatusType.ZONE_ALARM: 2>",
         "<StatusType.ZONE_FAULT: 8>"
      ]
   },
   {
      "zone_id": 3,
      "name": "finestra soggiorno",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 4,
      "name": "finestra bagno",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 5,
      "name": "finestra cucina",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 6,
      "name": "porta ingresso",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 7,
      "name": "porta veranda",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>",
         "<StatusType.ZONE_LOSS: 32>"
      ]
   },
   {
      "zone_id": 8,
      "name": "porta salotto",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>",
         "<StatusType.ZONE_LOSS: 32>"
      ]
   },
   {
      "zone_id": 9,
      "name": "volumetrico salone",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 10,
      "name": "volumetrico soggiorno",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   },
   {
      "zone_id": 11,
      "name": "volumetrico veranda",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>",
         "<StatusType.ZONE_ALARM: 2>"
      ]
   },
   {
      "zone_id": 12,
      "name": "finestra veranda",
      "types": [
         "<StatusType.ZONE_IN_USE: 1>"
      ]
   }, [...]
]

@stezak77
Copy link
Author

stezak77 commented Oct 3, 2024

Thank you for this big milestone!
Do you plan to update the Home Assistant integration to have zone entities?
https://www.home-assistant.io/integrations/ialarm/

@bigmoby
Copy link

bigmoby commented Oct 3, 2024

Hi @stezak77 , yes I'll try to do my best in order to implement that. I'll create a PR in official integration github.

@stezak77
Copy link
Author

stezak77 commented Oct 3, 2024

Looking forward to it, thanks!

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

No branches or pull requests

2 participants