vanackej / risco-mqtt-local

Provide Risco alarm system integration to Home assistant using local TCP communication (no cloud required) and MQTT
MIT License
24 stars 11 forks source link

Support group arming #52

Open OnFreund opened 2 years ago

OnFreund commented 2 years ago

Risco systems allow arming of groups. There are 4 groups - A,B,C,D - and the list of zones associated with each one can be customized by the installer. This allows you to have more than just the default 2 arming modes (AWAY and STAY). The native HA integration, based on Risco Cloud, has support for group arming. Through the integration options, you can control the mapping from Risco states to HA states (e.g. when group A or B is armed in Risco, HA will report this as Armed Night), and from HA to Risco (e.g. when arming in night mode in HA, arm group A in Risco). The integration documentation also lists the default mapping.

Can we add group arming support to local Risco version? More than happy to help in any way I can.

vanackej commented 2 years ago

Yes I was just looking at your cloud communication library : https://github.com/OnFreund/pyrisco/blob/master/pyrisco/risco.py

I think I get the idea, and it would be possible to integrate it to this addon if I can find the command to send at the socket level. and honestly, i've got no idea how to find it.

I have access to the groups arming status (to read it), but now idea how to select the groups to arm when arming a partition

Maybe the original author of the lan communication library (@TJForc) knows how to ARM only some groups ?

vanackej commented 2 years ago

Something like ARM=1;GRP=1,2 maybe ?

ekkesa commented 2 years ago

I have done something similar to this using scripts triggered by input_booleans. It is a bit of a PITA to configure the scripts the first time, but it is absolute magic once it is done.

For example - I created "states" I commonly use on the alarm. For example, when at home at night (different times have different arming states for the partitions), bypassing zones should they not be armed and could interfere.

Group arming will definitely make this a bit easier - even more so is this could be maintained from HA.

OnFreund commented 2 years ago

I believe it's GARM*1=1 to arm group A on partition 1, GARM*2=1 to arm group B, etc...

vanackej commented 2 years ago

I believe it's GARM*1=1 to arm group A on partition 1, GARM*2=1 to arm group B, etc...

Great ! I'll give a try, thanks

tetionet commented 2 years ago

Hey awesome maintainers, any news on the topic? In this way we still need to have both integration in home assistant to provide some automations...

pergolafabio commented 2 years ago

yes, its in beta, wait for a week @OnFreund created local support offcially in HA , it supports also group arming

pergolafabio commented 2 years ago

https://github.com/home-assistant/core/pull/75874