guerrerotook / securitas-direct-new-api

This repository contains the new securitas direct API that can be integrated in Home Assistant
Apache License 2.0
79 stars 30 forks source link

Can't disarm since V2.1.0.0 #90

Closed bilbon0bud closed 1 year ago

bilbon0bud commented 2 years ago

Hello

with release 2.1.0.0 and latest Home assistant, i can arm my alarm but i can't desearm it.

Best Regards

bilbon0bud commented 2 years ago

In the verisure logs, i can only see "Consultation de l 'état" (check state) when trying to disarm.

yyounes75 commented 2 years ago

Hi,

Same for me, the components can not disable the alarm. When we trigger the service "alarm_control_panel.alarm_disarm", it will check the status of the alarm (which work) and not disarm it.

2022-10-17 12:29:55.376 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Making request with device_id XXXXX, uuid XXXXX and idDeviceIndigitall 
2022-10-17 12:29:56.832 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] --------------Response--------------
2022-10-17 12:29:56.832 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] {"data":{"xSCheckAlarmStatus":{"res":"OK","msg":"Votre alarme a été activée en mode Nuit","status":"Q","numinst":"XXXXX","protomResponse":"Q","protomResponseDate":"2022-10-17 12:29:48.310"}}}

Same problem as this issue https://github.com/guerrerotook/securitas-direct-new-api/issues/71

sergiomart96 commented 2 years ago

teneis que configurar el code

rogelio-o commented 1 year ago

I'm having the same issues with the code in the master branch.

What do you mean by configuring the code? The only way to install the integration is by providing a code, even if it is not used to arm the alarm.

Update: It works when removing the lines alarm_control_plane.py:311-316, so it is because of the code, as @sergiomart96 mentioned. However, I configured the code when installing the integration.

rogelio-o commented 1 year ago

The problem is the commit 8e8082c. After removing the commit it works. With the conditional of the commit, we are comparing strings with integers and never making the next conditional pass with configured_code (string) == code (integer).

sergiomart96 commented 1 year ago

pues la verdad esque puse el code y me desarmo, por eso lo comente, pero estaba claro que el error estaba en el code, muy bien visto @rogelio-o, me imagino que habrá que esperar ha actualización o seguir buscando una solucion

bilbon0bud commented 1 year ago

@rogelio-o is it possible to have the file with the correction ? Best Regards

Javvaz commented 1 year ago

Correct. I just commented the below lines of the alarm_control_panel.py and now it is again able to disarm from away, home, or night status, however the issue with custom_by_pass status remains, since is not able to disarm from custom_by_pass status never more.

image

bilbon0bud commented 1 year ago

Thx, it works with this trick.

Have a nice day

glebiller commented 1 year ago

@guerrerotook This bug has been closed, however, I do not see any PR to actually fix the bug, am I missing something? Manually editing the file does not seems to be the best fix solution!