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
72.65k stars 30.41k forks source link

New generation motion detectors not detected by the integration #98986

Closed bobat-h closed 1 year ago

bobat-h commented 1 year ago

The problem

The new generation motion sensors are not showing up in the devices

What version of Home Assistant Core has the issue?

core-2023.8.4

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

SimpliSafe

Link to integration documentation on our website

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

Diagnostics information

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.8.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.4",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.08.1",
    "host_os": "Home Assistant OS 10.5",
    "docker_version": "23.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.32.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "hildebrandglow_dcc": {
      "version": "1.0.3",
      "requirements": [
        "pyglowmarkt==0.5.5"
      ]
    }
  },
  "integration_manifest": {
    "domain": "simplisafe",
    "name": "SimpliSafe",
    "codeowners": [
      "@bachya"
    ],
    "config_flow": true,
    "dhcp": [
      {
        "hostname": "simplisafe*",
        "macaddress": "30AEA4*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/simplisafe",
    "integration_type": "hub",
    "iot_class": "cloud_polling",
    "loggers": [
      "simplipy"
    ],
    "requirements": [
      "simplisafe-python==2023.05.0"
    ],
    "is_built_in": true
  },
  "data": {
    "entry": {
      "entry_id": "9a4b52451dc55b88310e11582fc7b4a7",
      "version": 1,
      "domain": "simplisafe",
      "title": "**REDACTED**",
      "data": {
        "username": "**REDACTED**",
        "token": "**REDACTED**"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": "**REDACTED**",
      "disabled_by": null
    },
    "subscription_data": {},
    "systems": [
      {
        "address": "**REDACTED**",
        "alarm_going_off": false,
        "connection_type": "wifi",
        "notifications": [],
        "serial": "**REDACTED**",
        "state": 10,
        "system_id": "**REDACTED**",
        "temperature": null,
        "version": 3,
        "sensors": [
          {
            "name": "Entrance",
            "serial": "**REDACTED**",
            "type": 1,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "alarm": 4,
              "lowPowerMode": false
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Bathroom",
            "serial": "**REDACTED**",
            "type": 9,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "alarm": 1
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Back Door",
            "serial": "**REDACTED**",
            "type": 5,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 1,
              "home2": 1,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "announceName": false
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Front Door",
            "serial": "**REDACTED**",
            "type": 5,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 1,
              "home2": 1,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "announceName": false
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Bathroom",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Dining Room",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Entrance",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Hallway",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Kitchen",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Living Room",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "off": 0,
              "home": 0,
              "home2": 0,
              "away": 1,
              "away2": 1,
              "instantTrigger": false,
              "sensitivity": 2
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Back",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "alarmVolume": 3
            },
            "trigger_instantly": false,
            "triggered": false
          },
          {
            "name": "Front",
            "serial": "**REDACTED**",
            "type": 99,
            "error": false,
            "low_battery": false,
            "offline": false,
            "settings": {
              "alarmVolume": 3
            },
            "trigger_instantly": false,
            "triggered": false
          }
        ],
        "alarm_duration": 240,
        "battery_backup_power_level": 5600,
        "cameras": [
          {
            "camera_settings": {
              "spotlight": {
                "enableColorNightMode": false
              },
              "videoFlip": {
                "enable": false,
                "verticalFlip": false,
                "horizontalFlip": false
              },
              "alarmState": {
                "recordOnAlarm": true,
                "recordOnCount": true,
                "spotlightFlashOnAlarm": true,
                "sirenOnAlarm": true
              },
              "motion": {
                "enable": {
                  "off": true,
                  "home": true,
                  "away": true
                }
              },
              "notifications": {
                "motion": {
                  "off": true,
                  "home": true,
                  "away": true
                }
              },
              "cameraName": "Kitchen",
              "pictureQuality": "1080p",
              "nightVision": "auto",
              "statusLight": "on",
              "micSensitivity": 100,
              "micEnable": true,
              "speakerVolume": 75,
              "motionSensitivity": 50,
              "shutterHome": "open",
              "shutterAway": "open",
              "shutterOff": "closedAlarmOnly",
              "wifiSsid": "AmpliFi Alien",
              "canStream": false,
              "canRecord": false,
              "pirEnable": false,
              "vaEnable": false,
              "notificationsEnable": false,
              "enableDoorbellNotification": true,
              "doorbellChimeVolume": "off",
              "doorbellChimeType": "Mechanical",
              "privacyEnable": false,
              "hdr": true,
              "vaZoningEnable": false,
              "vaZoningRows": 0,
              "vaZoningCols": 0,
              "vaZoningMask": [],
              "maxDigitalZoom": 10,
              "supportedResolutions": [
                "480p",
                "720p",
                "1080p"
              ],
              "admin": {
                "tinyYolo": {
                  "numFramesToAnalyze": 5,
                  "confidenceThreshold": 0.9,
                  "positiveFramesThreshold": 0.5
                },
                "powerControl": {
                  "disabled": false
                },
                "wakeModeOperation": {
                  "custom": {
                    "upperRFThresholdRX": 0,
                    "lowerRFThresholdRX": 0,
                    "upperRFThresholdTX": 0,
                    "lowerRFThresholdTX": 0
                  },
                  "mode": "AUTO"
                },
                "IRLED": 0,
                "pirSens": 0,
                "statusLEDState": 1,
                "lux": "lowLux",
                "motionDetectionEnabled": false,
                "motionThresholdZero": 0,
                "motionThresholdOne": 10000,
                "levelChangeDelayZero": 30,
                "levelChangeDelayOne": 10,
                "audioDetectionEnabled": false,
                "audioChannelNum": 2,
                "audioSampleRate": 16000,
                "audioChunkBytes": 2048,
                "audioSampleFormat": 3,
                "audioSensitivity": 50,
                "audioThreshold": 50,
                "audioDirection": 0,
                "bitRate": 284,
                "longPress": 2000,
                "kframe": 1,
                "gopLength": 40,
                "idr": 1,
                "fps": 20,
                "firmwareVersion": "2.6.2.126",
                "netConfigVersion": "",
                "camAgentVersion": "",
                "lastLogin": 1692872447,
                "lastLogout": 1692872397,
                "pirSampleRateMs": 800,
                "pirHysteresisHigh": 2,
                "pirHysteresisLow": 10,
                "pirFilterCoefficient": 1,
                "logEnabled": true,
                "logLevel": 3,
                "logQDepth": 20,
                "firmwareGroup": "public",
                "irOpenThreshold": 445,
                "irCloseThreshold": 840,
                "irOpenDelay": 3,
                "irCloseDelay": 3,
                "irThreshold1x": 388,
                "irThreshold2x": 335,
                "irThreshold3x": 260,
                "rssi": [
                  [
                    1692871154,
                    -2
                  ],
                  [
                    1692876048,
                    -2
                  ],
                  [
                    1692879648,
                    -2
                  ],
                  [
                    1692883248,
                    -2
                  ],
                  [
                    1692886848,
                    -2
                  ],
                  [
                    1692890448,
                    -2
                  ],
                  [
                    1692894049,
                    -2
                  ],
                  [
                    1692897649,
                    -2
                  ],
                  [
                    1692901253,
                    -2
                  ],
                  [
                    1692904849,
                    -2
                  ],
                  [
                    1692908449,
                    -2
                  ],
                  [
                    1692912049,
                    -2
                  ],
                  [
                    1692915649,
                    -2
                  ]
                ],
                "battery": [],
                "dbm": 0,
                "vmUse": 153604,
                "resSet": 10948,
                "uptime": 43232.18,
                "wifiDisconnects": 0,
                "wifiDriverReloads": 0,
                "statsPeriod": 3600000,
                "sarlaccDebugLogTypes": 0,
                "odProcessingFps": 8,
                "odObjectMinWidthPercent": 6,
                "odObjectMinHeightPercent": 24,
                "odEnableObjectDetection": true,
                "odClassificationMask": 2,
                "odClassificationConfidenceThreshold": 0.95,
                "odEnableOverlay": false,
                "odAnalyticsLib": 2,
                "odSensitivity": 85,
                "odEventObjectMask": 2,
                "odLuxThreshold": 445,
                "odLuxHysteresisHigh": 4,
                "odLuxHysteresisLow": 4,
                "odLuxSamplingFrequency": 30,
                "odFGExtractorMode": 2,
                "odVideoScaleFactor": 1,
                "odSceneType": 1,
                "odCameraView": 3,
                "odCameraFOV": 2,
                "odBackgroundLearnStationary": true,
                "odBackgroundLearnStationarySpeed": 15,
                "odClassifierQualityProfile": 1,
                "odEnableVideoAnalyticsWhileStreaming": false,
                "wlanMac": "08:fb:ea:be:8e:3a",
                "region": "us-east-1",
                "webRTCProvider": "simplisafe",
                "recordingProvider": "simplisafe",
                "enableWifiAnalyticsLib": false,
                "alwaysUploadBitmap": 0,
                "pirLevel": "medium",
                "ivLicense": ""
              },
              "pirLevel": "medium",
              "odLevel": "medium"
            },
            "camera_type": 0,
            "name": "Kitchen",
            "serial": "**REDACTED**",
            "shutter_open_when_away": true,
            "shutter_open_when_home": true,
            "shutter_open_when_off": false,
            "status": "online",
            "subscription_enabled": true
          }
        ],
        "entry_delay_away": 30,
        "entry_delay_home": 30,
        "exit_delay_away": 60,
        "exit_delay_home": 30,
        "gsm_strength": -65,
        "light": true,
        "locks": [],
        "offline": false,
        "power_outage": false,
        "rf_jamming": false,
        "wall_power_level": 6363,
        "wifi_ssid": "**REDACTED**",
        "wifi_strength": -67,
        "alarm_volume": 3,
        "chime_volume": 0,
        "voice_prompt_volume": 3
      }
    ]
  }
}

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Getting this error in os logs

Logger: simplipy
Source: components/simplisafe/__init__.py:578
First occurred: 24 August 2023 at 23:59:47 (8 occurrences)
Last logged: 24 August 2023 at 23:59:47

Unknown device type: 20
Unknown device type: 22

Additional information

No response

home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `simplisafe` 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 simplisafe` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


simplisafe documentation simplisafe source (message by IssueLinks)

bachya commented 1 year ago

This should be a simple bump of simplisafe-python to the latest version.

There's one oddity. Your logs show this line:

Unknown device type: 22

...but your diagnostics don't include any mention of a device with type 22. If you scan it, are any of your devices missing from the diagnostics?

bobat-h commented 1 year ago

Yes that is the indoor camera. Is it possible to have the stream showing in homeassitant?

bachya commented 1 year ago

@bobat-h Unfortunately, no: no one has been able to reverse-engineer the camera feed in a stable manner. https://github.com/bachya/simplisafe-python/issues/85

bobat-h commented 1 year ago

After doing some digging the other device seem to be the Outdoor Alarm Security Bell Box

bachya commented 1 year ago

Thanks for the update, @bobat-h.

jspiro commented 1 year ago

I'm confused at the outcome of this. I have a brand new SimpliSafe system see none of my three motion sensors (let alone the one indoor motion camera I have). Only entry, leak keypad, panel, and one device of type "3".

bachya commented 1 year ago

@jspiro I need to see debug-level logs and diagnostics for the SimpliSafe integration in your instance to comment further.

jspiro commented 1 year ago

@jspiro I need to see debug-level logs and diagnostics for the SimpliSafe integration in your instance to comment further.

Got it! I see the motion camera mentioned but none of the other sensors. One of the missing sensors is called Back Door and has SN# 02582a95, each has different configs of instant trigger and pet mode and alarm modes, so if those were an issue surely one would have shown up.

config_entry-simplisafe-d5f14217813acf7088ecf6cba74264f9.json.txt

bachya commented 1 year ago

Your diagnostics show two devices named Back Door (a v2 motion detector and an entry sensor):

[
  {
    "name": "Back Door",
    "serial": "**REDACTED**",
    "type": 20,
    "error": false,
    "low_battery": false,
    "offline": false,
    "settings": {
      "off": 0,
      "home": 0,
      "home2": 0,
      "away": 1,
      "away2": 0,
      "instantTrigger": true,
      "sensitivity": 2
    },
    "trigger_instantly": true,
    "triggered": false
  },
  {
    "name": "Back Door",
    "serial": "**REDACTED**",
    "type": 5,
    "error": false,
    "low_battery": false,
    "offline": false,
    "settings": {
      "off": 0,
      "home": 0,
      "home2": 0,
      "away": 1,
      "away2": 0,
      "instantTrigger": false,
      "announceName": false
    },
    "trigger_instantly": false,
    "triggered": false
  }
]

(Incidentally, I also see two other v2 motion detectors: Front Door and Garage.)

Please confirm whether:

  1. You're missing another sensor (also called "Back Door")
  2. One of these sensors is the device in question, and it's not showing up in the HASS UI
jspiro commented 1 year ago

Thanks @bachya! Ah, I missed those (I was searching for 'motion'). So all of them are present in the JSON, but none of the motion sensors show up in the UI. I'm new to HA and this automation, so I may have missed something!

bachya commented 1 year ago

@jspiro Can you post a screenshot of what SimpliSafe devices are on the configuration page? Go to your SimpliSafe integration page, then click on XX devices in the left-hand menu (where XX is a number). Make sure you are showing disabled devices via the upper-right filter menu:

CleanShot 2023-09-20 at 19 19 23

jspiro commented 1 year ago

Only 20 devices. Disabled is included. Nothing is disabled. I assume that motion would show up as its own type, separate from entry, yeah? When I select an entry sensor I see it as open or closed, nothing related to motion sensing.

Screenshot 2023-09-22 at 3 15 33 PM Screenshot 2023-09-22 at 3 16 08 PM

bachya commented 1 year ago

Got it. I've found the issue and will tag the fix for the next patch release.