guerrerotook / securitas-direct-new-api

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

Strange bug since v2.5.x #204

Closed beufanet closed 6 months ago

beufanet commented 8 months ago

Hello,

Since the v2.5.x version, I cannot fetch anymore the status of alarm. I haven't change anything, and also tried to uninstall / reinstall. Now using the v2.7.0.0

Here some logs I have:

('alarm-manager.alarm_process_error', {'errors': [{'message': 'alarm-manager.alarm_process_error', 'name': 'ApiError', 'time_thrown': '2024-01-29T08:36:31.945Z', 'data': {'res': 'ERROR', 'err': '10', 'status': 500}, 'path': ['xSCheckAlarm']}], 'data': {'xSCheckAlarm': None}}, {'app': '{"appVersion": "10.102.0", "origin": "native"}', 'User-Agent': 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.41', 'X-APOLLO-OPERATION-ID': '*****', 'X-APOLLO-OPERATION-NAME': 'CheckAlarm', 'extension': '{"mode":"full"}', 'numinst': '*****', 'panel': 'SDVFAST', 'X-Capabilities': '*****', 'auth': '{"loginTimestamp": 1706517390374, "user": "*****, "id": "OWA_______________******_______________******", "country": "FR", "lang": "fr", "callby": "OWA_10", "hash": "*******"}'}, {'operationName': 'CheckAlarm', 'variables': {'numinst': '*********', 'panel': 'SDVFAST'}, 'query': 'query CheckAlarm($numinst: String!, $panel: String!) {\n xSCheckAlarm(numinst: $numinst, panel: $panel) {\n res\n msg\n referenceId\n }\n}\n'}

How can I debug further to understand what's wrong ?

Thanks !

cantupaz commented 8 months ago

I see the same errors in my logs, but I see them at random times and I cannot seem to replicate them. I have not noticed any problem with arming/disarming alarms or getting the status, but it's probably because they happen randomly and not very often.

Do you see these errors regularly or after doing something?

beufanet commented 8 months ago

Hold on, seems I found something, but need the help of local technician to verify the installation.

cantupaz commented 7 months ago

@beufanet Did you find anything about this? I see these errors occasionally in my logs, but I still cannot replicate them. Thanks.

beufanet commented 7 months ago

Seems linked to an issue when the main central is unreachable from verisure after an update :(

beufanet commented 6 months ago

Hello, I can confirm this is due because the central is not correctly seen by the Verisure API.

After 2 hard resets from the technician, I reduced the interval between queries, and everything is working correctly now !