Skip to content

Handle cloud systems without partitions - #51

Open
TheeCoderAhmed wants to merge 1 commit into
OnFreund:masterfrom
TheeCoderAhmed:fix/cloud-partitions-none
Open

TheeCoderAhmed wants to merge 1 commit into
OnFreund:masterfrom
TheeCoderAhmed:fix/cloud-partitions-none

Conversation

@TheeCoderAhmed

Copy link
Copy Markdown

Some Risco Cloud systems have no partitions (e.g. Electronics Line iConnect). For these the cloud status returns "partitions": null, and Alarm.partitions raises TypeError: 'NoneType' object is not iterable. In Home Assistant this fails the whole alarm_control_panel platform setup (home-assistant/core#179592).

Alarm.partitions now returns an empty dict when the API sends null. Added a test for it.

Some Risco Cloud systems have no partitions and the cloud status returns
"partitions": null, which made Alarm.partitions raise TypeError.
Return an empty dict instead.
@ddeweerdt1970

Copy link
Copy Markdown

It reads like a solution but how do I apply this in home assistant or via another process to get it to work?

@ddeweerdt1970

Copy link
Copy Markdown

Thanks for working on this fix. I have a follow-up question about controlling a system without partitions.

My goal is to use a “Coming home” script in Home Assistant to disarm my Risco alarm, wait until disarming is confirmed, and then open my Nuki lock and turn on the lights.

My setup is a Risco WiComm system installed by Feenstra, connected through Risco Cloud. During diagnosis, I was running Home Assistant Container 2026.10.2 on a Synology NAS with pyrisco 0.8.1.

Login succeeds and the integration reads ten zones. However, the cloud status response contains:

partitions: null

systemStatus: 0

systemReady: true

armNotAllowed: false

disarmNotAllowed: false

type: 3

The alarm was disarmed when this response was captured. I can view and control the system through iRISCO, but Home Assistant does not create an alarm_control_panel entity.

As I understand PR #51, returning an empty dictionary prevents the exception, but still leaves Home Assistant with no partition to expose as an alarm entity.

Could pyrisco also support reading and controlling the whole system when partitions is null? Specifically:

How should systemStatus be mapped to disarmed, armed and partially armed states?

Is there a cloud command for whole-system arm/disarm, rather than the partition-based PartArm request?

Would this require changes in both pyrisco and the Home Assistant Risco integration, or could pyrisco expose a single logical alarm partition for these systems?

I would prefer to keep using the cloud connection without changing the panel’s local communication settings.

If you need additional diagnostics, please let me know which fields would be useful and how to collect them without exposing credentials or sending alarm-control commands.

Thanks for your help!

@ddeweerdt1970

Copy link
Copy Markdown

Can you please help out on the above? thanks a million or so

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants