guerrerotook / securitas-direct-new-api

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

No Device or entity appearing #167

Closed marcoelgordo closed 10 months ago

marcoelgordo commented 10 months ago

Hi,

I have installed the V.2.4.0.2 on Home Assistant 2023.11.1 The api used to work fine until today, From Today I'm able to add the Securitas user but then no Entity or Device is created.

Thank you in advance and thank you for your great work. Muchas gracias

guerrerotook commented 10 months ago

¿Puedes compartir logs o algo? es que con eso no puedo saber nada más

javico88 commented 10 months ago

I'm a new user and have just installed this with HACS. However, I can't find where I can configure or see my devices

guerrerotook commented 10 months ago

I'm a new user and have just installed this with HACS. However, I can't find where I can configure or see my devices

So, is that an issue or what?

javico88 commented 10 months ago

I'm a new user and have just installed this with HACS. However, I can't find where I can configure or see my devices

So, is that an issue or what?

No lo sé, porque no sé si es algo que me falta por hacer o estoy haciendo algo mal. ¿Después de instalarlo tengo que configurar manualmente el archivo de instalación?

Sorry, I'm going to make a new discussion for this

guerrerotook commented 10 months ago

Tienes que agregar el componente, iniciar sesion con tu cuenta de seguritas, hacer lo del sms a tu movil y entonces funciona.

marcoelgordo commented 10 months ago

Hi I have created the user and password is correct also the sms validation is correct and the integration is added successfully

El log dice:

This error originated from a custom integration.

Logger: custom_components.securitas.securitas_direct_new_api.apimanager Source: custom_components/securitas/securitas_direct_new_api/apimanager.py:159 Integration: Securitas Direct (documentation, issues) First occurred: 11:30:16 AM (1 occurrences) Last logged: 11:30:16 AM

Unauthorized

2023-11-10 11:30:16.071 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Making request with device_id b6f8c05099604b28, uuid b6f8c05099604b28 and idDeviceIndigitall 2023-11-10 11:30:16.328 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] --------------Response-------------- 2023-11-10 11:30:16.328 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] {"data":{"xSLoginToken":{"__typename":"XSLoginToken","res":"OK","msg":"User validated successfully","hash":null,"refreshToken":null,"legals":false,"changePassword":true,"needDeviceAuthorization":false,"mainUser":false}}} 2023-11-10 11:30:16.329 DEBUG (MainThread) [custom_components.securitas] Log in Securitas: True 2023-11-10 11:30:16.329 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Making request with device_id b6f8c05099604b28, uuid b6f8c05099604b28 and idDeviceIndigitall 2023-11-10 11:30:16.440 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] --------------Response-------------- 2023-11-10 11:30:16.440 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] {"errors":[{"message":"Unauthorized","name":"SecurityError","time_thrown":"2023-11-10T11:30:16.402Z","data":{"auth-code":"10010"},"path":["xSInstallations"]}],"data":{"xSInstallations":null}} 2023-11-10 11:30:16.441 ERROR (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Unauthorized

guerrerotook commented 10 months ago

I see, because you can create users in the app, did you give permissions to the user? did you try to log in with that user in the app and see how it goes?

marcoelgordo commented 10 months ago

Todo bien, ahora funcciona con la ultima version Muchas gracias por su ayuda

marcoelgordo commented 10 months ago

Hi I have a new issue now. I can't arm or disarm the alarm (code is correct and credentials as well). Here is the log

2023-11-10 14:26:35.274 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Making request with device_id 2b9b1b9d64e74f9c, uuid 2b9b1b9d64e74f9c and idDeviceIndigitall 2023-11-10 14:26:35.372 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] --------------Response-------------- 2023-11-10 14:26:35.372 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] {"errors":[{"message":"Invalid token: Expired","name":"ApiError","time_thrown":"2023-11-10T14:26:35.349Z","data":{"res":"ERROR","err":"60022"},"path":["xSCheckAlarm"]}],"data":{"xSCheckAlarm":null}} 2023-11-10 14:26:35.372 INFO (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Login is expired. Login again 2023-11-10 14:26:35.373 DEBUG (MainThread) [custom_components.securitas.securitas_direct_new_api.apimanager] Making request with device_id 2b9b1b9d64e74f9c, uuid 2b9b1b9d64e74f9c and idDeviceIndigitall