home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Integration "Movistar Prosegur" not working #123858

Open magarto opened 4 weeks ago

magarto commented 4 weeks ago

The problem

Since today, Movistar Prosegur alarm integration is not working any longer. Alarm entity is showing "armed_home" always, even if I change state using HA or the alarm app or panel itself. Also I recharged integration and deleted and added it again. Maybe it is due to the change from smart.prosegur.com to https://alarmas.movistarproseguralarmas.es/smart-mv/login.html#!/ web. https://github.com/home-assistant/core/blob/dev/homeassistant/components/prosegur/alarm_control_panel.py

What version of Home Assistant Core has the issue?

2024.8.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Prosegur

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

zonzof commented 4 weeks ago

Hi, im just having the exact same issue. What i see is that the Prosegur App also shows the alarm as Armed in the alarms list, but it shows it as disarmed in the alarm page. It is the same behaviour that can be seen in the diagnostics of the HA Prosegur integration: "Data.status" is "AP" (Armed Partial) , while last "Activity.data.operation" is "DA" (disarmed). So it seems to be an issue or a change in the Prosegur API. A Possble workaround could be to use this "Activity.data.operation" value as State for the alarm control, but i dont know if it is possible without patching thre integration code. diagnostic.txt prosegur

home-assistant[bot] commented 4 weeks ago

Hey there @dgomes, mind taking a look at this issue as it has been labeled with an integration (prosegur) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `prosegur` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign prosegur` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


prosegur documentation prosegur source (message by IssueLinks)

magarto commented 4 weeks ago

Armed_away and armed_disarmed HA service works well but not armed_home

dgomes commented 4 weeks ago

There are changes going on in Prosegur for sure, I'm currently unable to arm/disarm using their app (which uses the same API as the integration)

Can you successfully use the Prosegur App ? (iOS / Android) ?

The "Activity.data.operation" is literally what the HA integration uses to get information

zonzof commented 4 weeks ago

There are changes going on in Prosegur for sure, I'm currently unable to arm/disarm using their app (which uses the same API as the integration)

Can you successfully use the Prosegur App ? (iOS / Android) ?

Yes, my App arms and disarms and show the correct status in the alarm view, but shows always "Armed Home" in the alarms list view (see previous image)

The "Activity.data.operation" is literally what the HA integration uses to get information

It is weird, then, as in my case, HA status says "Armed home" with this data (seems the status is taken from "data.status"):

"data": { "installation": { "installationId": <<<<<<<<<<<<<<<<<<< "description": "REDACTED", "image": 1, "installationType": "CLIMAX", "pinControl": true, "status": "AP", "hasDomotic": false, "preboarding": false, "detectors": [ ......... }, "activity": { "result": { "code": 200, "description": "OK", "message": "User events list found successfully" }, "data": [ { "id": <<<<<<<<<<<<<<<<<<<<<<<<<<<<< "installationId": <<<<<<<<<<<<<<<<<<< "connectionId": <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "logId": "-1", "description": "Disarming by Home Assistant ", "operation": "DA", "creationDate": 1723612805000, "deviceName": <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

zonzof commented 4 weeks ago

Just contacted Prosegur tech support. They were able to reproduce the error using its internal app simulator, and then forwarded the error to the app development team.

dgomes commented 4 weeks ago

So your app was also not working accordingly ?

I've been debuging and see they have a new endpoint just to check the status of the panel, might update the integration to support this new API.

Let us know of any updates

zonzof commented 4 weeks ago

So your app was also not working accordingly ?

Yes, Prosegur App behaves exactly as HA: It Arms and Disarms the alarm (as HA does), but says always in the alarms list that it is "armed home". (Prosegur app shows the status of the alarm in two different places, alarms list and alarm page. While the alarm page shows the status correctly, the alarms list always shows "armed home".)

I've been debuging and see they have a new endpoint just to check the status of the panel, might update the integration to support this new API.

👍

Let us know of any updates

wilotas commented 4 weeks ago

Same here.

In my Prosegur app (Spain) I see alarm disconnected but in HA I see Armed_home.

Something changed in their API I think.

javierbrea commented 3 weeks ago

In my case, the only thing that works in HA from yesterday is disarming the alarm. It also has the state "armed_home" always. From the Prosegur App everything works except the detail in the list that commented @zonzof, which is displaying also "armed_home" even when it is disarmed.

Please let me know if I can help somehow.

ad0lf030 commented 3 weeks ago

Same here

lazynoda commented 3 weeks ago

Another one here with the same problem. I'm able to control the alarm, setting the desired state, but not reading it properly. Like everyone else, I'm always at "Armed home".

I had a call today with Prosegur and also notified the issue to them. Lets pray for a quick solution. Any way we can help @dgomes ? 🫶

dgomes commented 3 weeks ago

We need to wait for Prosegur to stabilize their backend. When it’s stable I can re evaluate the integration

lazynoda commented 3 weeks ago

I'd assume it's stable, just different. The app works well for me, showing the real state (disarmed, home or away). It's just the HA integration showing always home.

Albruaje commented 3 weeks ago

In my case, HA is always at DISARMED. I can arm HOME or AWAY from HA, but not disarm, cause it shows DISARMED all the time. The APP works also well for me, showing the real state.

davilro commented 3 weeks ago

Same problem here. I can arm, but never disarm from HA.

My logs says:

    <ClientResponse(https://smart.prosegur.com/smart-server/ws/installation/xxxxxx/status) [503 Service Unavailable]>
mrivero33 commented 3 weeks ago

Same here. HA shows DISARMED all the time. I can arm HOME or AWAY. The app is ok.

davilro commented 3 weeks ago

It seems that Prosegur changed their API domain.

The new domain is: api-smart.prosegur.cloud.

I manually updated it in alarm_control_panel.py, line 72, and it worked for me.

Changed:

configuration_url = "https://smart.prosegur.com"

To:

configuration_url = "https://api-smart.prosegur.cloud"
mrivero33 commented 3 weeks ago

I have HA OS. Where is that file located?

lazynoda commented 3 weeks ago

It's working again for me since 17:54 (when status went back to Disarmed). I tried arming home and disarming and works well. Haven't updated anything. Weird...

Albruaje commented 3 weeks ago

In my case, HA is always at DISARMED. I can arm HOME or AWAY from HA, but not disarm, cause it shows DISARMED all the time. The APP works also well for me, showing the real state.

It is now working perfectly again. Nothing done by my side.

dgomes commented 3 weeks ago

If you copy the folder prosegur from this repository to your custom_components folder you can then edit the manifest.json file and change the version of pyprosegur to 0.0.11 and test the new API endpoint

wilotas commented 3 weeks ago

working again without changing anything...¿?¿?¿

lazynoda commented 3 weeks ago

If I had to take a guess, they did something and been trying to fix whatever it was during the week. Friday, almost 6pm and still no result, better to rollback and try again on Monday.

I hope to be wrong, but I'd expect issues again next week. Pray to the IT gods I'm wrong 🙏