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
69.86k stars 28.95k forks source link

Integration: Prosegur. Alarm is always shown as armed #119325

Open lufetico opened 4 weeks ago

lufetico commented 4 weeks ago

The problem

The Prosegur Integration has not been working properly for a couple of days. The alarm is always shown as armed. If I try to disarm it from HA, it seems that the disarm request is sent as I receive the notifications in the Prosegur App.

image

image

I have not uploaded logs because I don't know if they could compromise my security.

What version of Home Assistant Core has the issue?

core-2024.6.1

What was the last working version of Home Assistant Core?

core-2024.5.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

prosegur

Link to integration documentation on our website

https://www.home-assistant.io/integrations/prosegur

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

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)

dgomes commented 4 weeks ago

I've faced the same situation recently, it seams Prosegur has renamed the contracts internally and HA can't find the configured contract.

Please try to add Prosegur again and check if the integration works

lufetico commented 4 weeks ago

I have tried but it still does not work. I have called Prosegur Spain because my wife can't control the alarm and I can't give her permissions. I have been told that my account has been moved to a new server. So maybe it's all related.

I will keep trying to see if it works. At the moment the alarm appears as active in HA.

dgomes commented 4 weeks ago

Could you share the diagnostics from the integration ?

lufetico commented 3 weeks ago
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.6.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Madrid",
    "os_name": "Linux",
    "os_version": "6.6.29-haos",
    "supervisor": "2024.06.0",
    "host_os": "Home Assistant OS 12.3",
    "docker_version": "25.0.5",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "daikin_onecta": {
      "documentation": "https://github.com/jwillemsen/daikin_onecta",
      "version": "4.1.3",
      "requirements": []
    },
    "presence_simulation": {
      "documentation": "https://github.com/slashback100/presence_simulation",
      "version": "4.8",
      "requirements": []
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "netro_watering": {
      "documentation": "https://github.com/kcofoni/ha-netro-watering",
      "version": "1.2.1",
      "requirements": [
        "requests==2.32.3",
        "validators==0.20.0"
      ]
    },
    "daikin_altherma": {
      "documentation": "https://github.com/tadasdanielius/daikin_altherma",
      "version": "1.4.0",
      "requirements": [
        "pyaltherma==0.0.21"
      ]
    },
    "watchman": {
      "documentation": "https://github.com/dummylabs/thewatchman",
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.0"
      ]
    },
    "edata": {
      "documentation": "https://github.com/uvejota/homeassistant-edata/",
      "version": "2023.06.6",
      "requirements": [
        "e-data==1.1.8",
        "python-dateutil>=2.8.2"
      ]
    },
    "tapo": {
      "documentation": "https://github.com/petretiandrea/home-assistant-tapo-p100",
      "version": "3.1.2",
      "requirements": [
        "plugp100==5.1.3"
      ]
    },
    "healthchecksio": {
      "documentation": "https://github.com/custom-components/healthchecksio",
      "version": "22.2.0",
      "requirements": [
        "integrationhelper"
      ]
    },
    "smartthinq_sensors": {
      "documentation": "https://github.com/ollo69/ha-smartthinq-sensors",
      "version": "0.39.2",
      "requirements": [
        "pycountry>=23.12.11",
        "xmltodict>=0.13.0",
        "charset_normalizer>=3.2.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "prosegur",
    "name": "Prosegur Alarm",
    "codeowners": [
      "dgomes"
    ],
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/prosegur",
    "iot_class": "cloud_polling",
    "loggers": [
      "pyprosegur"
    ],
    "requirements": [
      "pyprosegur==0.0.9"
    ],
    "is_built_in": true
  },
  "setup_times": {
    "null": {
      "setup": 9.304285049438477e-05
    },
    "b69d616bd2da22d44fef0efa7f9859e9": {
      "wait_import_platforms": -38.56257869163528,
      "wait_base_component": -0.0032853628508746624,
      "config_entry_setup": 43.73342537228018
    }
  },
  "data": {
    "installation": {
      "installationId": "334466",
      "description": "**REDACTED**",
      "image": 1,
      "installationType": "CLIMAX",
      "pinControl": true,
      "status": "AP",
      "hasDomotic": false,
      "preboarding": false,
      "detectors": [
        {
          "id": "8585438",
          "description": "**REDACTED**",
          "type": "Camera",
          "streaming": false
        },
        {
          "id": "8585439",
          "description": "**REDACTED**",
          "type": "Camera",
          "streaming": false
        },
        {
          "id": "8585437",
          "description": "**REDACTED**",
          "type": "Camera",
          "streaming": false
        }
      ],
      "videoDetectors": [],
      "services": [
        {
          "type": "CM",
          "statusCode": 200
        },
        {
          "type": "V",
          "statusCode": 200
        },
        {
          "type": "PB",
          "statusCode": 200
        },
        {
          "type": "A",
          "statusCode": 200
        }
      ],
      "partitions": [
        {
          "id": 2177069,
          "installationId": 334466,
          "key": 1,
          "name": "Partici\u00f3n 1",
          "status": "AP"
        }
      ],
      "domoticDevices": [],
      "latitude": "**REDACTED**",
      "longitude": "**REDACTED**",
      "contractId": "**REDACTED**",
      "contractType": "V",
      "address": "**REDACTED**"
    },
    "activity": {
      "result": {
        "code": 200,
        "description": "OK",
        "message": "User events list found successfully"
      },
      "data": [
        {
          "id": "8c84c4e0-05f9-47bb-8b38-43be4ca3a28f",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1718172034000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "eb3b54e0-4655-44b7-9251-f37eda389b8b",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by scene Desarmar ",
          "operation": "DA",
          "creationDate": 1718172032000
        },
        {
          "id": "ee679204-944d-4761-b667-4883c3eb7d01",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1718136335000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "f327bbd7-3793-44ca-a472-ea6f93f0b517",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by LUIS",
          "operation": "AP",
          "creationDate": 1718136334000
        },
        {
          "id": "58e41a9e-c7f2-4751-b231-9221c6e74334",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1718136314000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "2dbf2ed8-d237-4cfb-9b85-b9da784a11b4",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1718136313000
        },
        {
          "id": "262259d8-9612-4b0f-ac64-9c03c7f07009",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1718136045000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "285ad9d6-59bd-475e-b260-7fec25595ab7",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by scene Armar parcialmente",
          "operation": "AP",
          "creationDate": 1718136043000
        },
        {
          "id": "60852afc-55bd-4272-aeeb-f14d6b5807bc",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by scene Desarmar ",
          "operation": "DA",
          "creationDate": 1718085630000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "f0d9144c-1866-4b4e-8648-f092ce18089e",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Unable to turn on the camera with privacy Mode",
          "operation": "MP_ERROR_ACT",
          "creationDate": 1718049638000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "89495af3-68b6-4880-8409-1dfc5be28a19",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by scene Armar parcialmente",
          "operation": "AP",
          "creationDate": 1718049636000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "9c15a8df-7949-4907-a728-eddb3dc09cb6",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1718048379000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "62150292-a70f-4737-af04-ee6f9c9d585a",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1718038015000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "160512d5-eb81-4f60-b3fe-666294ec5793",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming from panel by ERIKA",
          "operation": "DA",
          "creationDate": 1718038014000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "5d1f3da8-e5b0-45ed-a4f9-a2eb26dff0df",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1718034112000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "8ede2ec2-afad-43dd-9e33-3cf25e52266e",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Full arming from panel by LUIS",
          "operation": "AT",
          "creationDate": 1718034111000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "a6facd12-e4fa-4a0a-9c4f-535ea4d680fa",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1718033373000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "170bb9db-c79a-413a-852a-5cb18a2efa7e",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1718026386000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "a54b2889-259c-45a3-b175-e1482be03557",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming from panel by ERIKA",
          "operation": "DA",
          "creationDate": 1718026385000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "ba87de36-18ca-4fe2-bdc2-e9af609597d2",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1718022728000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "95e0ec53-d04d-49ca-a8c7-962cdb6f94ed",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Full arming from panel by LUIS",
          "operation": "AT",
          "creationDate": 1718022727000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "1219e5af-e703-441d-94a9-25bf1b1a745d",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1718022466000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "548ad1f1-026e-46ad-a2c8-8f410fb755c0",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1718002194000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "ca3a3855-1822-406f-891f-eff5a0553aa3",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1717999241000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "99a96bb8-b38b-4b33-81ab-29cabaf9893f",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by scene Desarmar ",
          "operation": "DA",
          "creationDate": 1717999239000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "04f3dc16-ab04-4af7-8725-d9b853a846ee",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1717963234000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "4ebd2737-f63b-44a6-ad36-bc5d60cecb47",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by scene Armar parcialmente",
          "operation": "AP",
          "creationDate": 1717963229000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "dffa7e27-6ebe-416a-b30e-ac9a54a8aaf7",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1717918030000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "662a56dc-3a82-4b96-a7a3-93f4e87bd5f3",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1717912833000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "ee4ef903-02ab-42cf-ac7c-d38da5f3747d",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by scene Desarmar ",
          "operation": "DA",
          "creationDate": 1717912829000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "93bab3e2-6431-4977-9dbe-01c39095e819",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1717876829000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "f01bac35-a0f9-430f-9bc4-949984fa426e",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by scene Armar parcialmente",
          "operation": "AP",
          "creationDate": 1717876828000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "7df0163c-5b25-4eba-b1a2-635c1ce5104d",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by LUIS",
          "operation": "DA",
          "creationDate": 1717834808000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "9fcb31ae-20f0-49f7-8423-d71d24c90413",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1717826438000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "56b09b77-6296-41d4-b82b-e9c317246694",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming by scene Desarmar ",
          "operation": "DA",
          "creationDate": 1717826437000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "8c4de87f-b4a0-41bd-97dc-ed4984b3e014",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1717790621000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "2af04346-880e-4993-8762-8ae476c001da",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by LUIS",
          "operation": "AP",
          "creationDate": 1717790620000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "6450ac74-a6e3-4b98-9a28-d96f0ac6b51f",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1717743316000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "b912461b-5489-47e4-a444-e4eab670dc51",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming from panel by LUIS",
          "operation": "DA",
          "creationDate": 1717743315000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "827e3b73-6585-4c3b-83d1-e28efbc88cc6",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Burglar alarm",
          "operation": "LE",
          "creationDate": 1717743293000,
          "deviceName": "VENTANA SALON"
        },
        {
          "id": "fd05208c-920c-4601-9c71-ccc5b9ff67e6",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera on with Privacy Mode",
          "operation": "MP_ACT",
          "creationDate": 1717705253000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "5f173a97-2352-48f7-928d-66418c5c0304",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Partial arming by LUIS",
          "operation": "AP",
          "creationDate": 1717705253000,
          "deviceName": "Partici\u00f3n 1"
        },
        {
          "id": "8a3f0559-49de-489c-8c72-857552af0409",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Camera off with Privacy Mode",
          "operation": "MP_DIS",
          "creationDate": 1717574966000,
          "deviceName": "PTZ CASA"
        },
        {
          "id": "ad4c2574-5b5d-4013-a086-de0fc1b7731f",
          "installationId": "334466",
          "connectionId": "CL00236559",
          "logId": "-1",
          "description": "Disarming from panel by ERIKA",
          "operation": "DA",
          "creationDate": 1717574965000,
          "deviceName": "Partici\u00f3n 1"
        }
      ]
    }
  }
}
dgomes commented 3 weeks ago

Have you checked if the user configured in HA is an admin ?

lufetico commented 3 weeks ago

Yes, the users are admins in HA and Prosegur Apps.

dgomes commented 3 weeks ago

See nothing wrong, it gets all the information correctly, and you say you have permissions :/

lufetico commented 3 weeks ago

I have deleted the integration several times, restarted HA and I always see the alarm activated even though it is deactivated. :(

dgomes commented 3 weeks ago

The event

{ "id": "8c84c4e0-05f9-47bb-8b38-43be4ca3a28f", "installationId": "334466", "connectionId": "CL00236559", "logId": "-1", "description": "Camera off with Privacy Mode", "operation": "MP_DIS", "creationDate": 1718172034000, "deviceName": "PTZ CASA" },

show's that it get recent updates.

      "status": "AP"

Say's that it is partially armed... :/

Don't know how to help :(

lufetico commented 3 weeks ago

Maybe they have made a change in the API?

dgomes commented 3 weeks ago

If it exists, the old one still works ... at least in PT