user2684 / imou_life

Home Assistant custom component for controlling Imou devices
MIT License
128 stars 21 forks source link

Motion sensor not added #46

Closed oggy82 closed 1 year ago

oggy82 commented 1 year ago

Version of the custom_component

1.0.12

Configuration

"home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.1.7", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/Stockholm", "os_name": "Linux", "os_version": "5.15.90", "supervisor": "2023.01.1", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "vm", "run_as_root": true

Add your logs here.

Describe the bug

The Motion sensor is not added image

A clear and concise description of what the bug is.

Debug log

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.1.7", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/Stockholm", "os_name": "Linux", "os_version": "5.15.90", "supervisor": "2023.01.1", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "vm", "run_as_root": true

},
"imou_life": {
  "version": "1.0.12",
  "requirements": [
    "imouapi==1.0.12"

}, "integration_manifest": { "domain": "imou_life", "name": "Imou Life", "documentation": "https://github.com/user2684/imou_life", "issue_tracker": "https://github.com/user2684/imou_life/issues", "dependencies": [], "config_flow": true, "codeowners": [ "@user2684" ], "requirements": [ "imouapi==1.0.12" ], "version": "1.0.12", "iot_class": "cloud_polling", "is_built_in": false }, "data": { "entry": { "entry_id": "REDACTED", "version": 3, "domain": "imou_life", "title": "Kamera baksida", "data": { "api_url": "https://openapi.easy4ip.com/openapi", "device_name": "Kamera baksida", "app_id": "REDACTED", "app_secret": "REDACTED", "device_id": "REDACTED" }, "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "user", "unique_id": "REDACTED", "disabled_by": null }, "device_info": { "api": { "base_url": "https://openapi.easy4ip.com/openapi", "timeout": 10, "is_connected": true }, "device": { "device_id": "REDACTED", "name": "baksida", "catalog": "IPC", "given_name": "Kamera baksida", "model": "IPC-C26E-V2", "firmware": "Eng_P_V2.680.0000000.28.R.20210911", "manufacturer": "Imou", "status": "1", "sleepable": false }, "capabilities": [ { "name": "WLAN", "description": "Support access to wireless local area network (WLAN)" }, { "name": "Auth", "description": "Device end loopback RTSP requires authentication (Auth)" }, { "name": "DHP2P", "description": "Support Dahua P2P Service (DHP2P)" }, { "name": "HSEncrypt", "description": "Support Huashi WeChat Stream Encryption (HSEncrypt)" }, { "name": "BreathingLight", "description": "The device has a breathing light (indicator light) (BreathingLight)" }, { "name": "CloudStorage", "description": "Support for cloud storage of China Vision WeChat platform (CloudStorage)" }, { "name": "LocalStorage", "description": "Support device local storage, such as SD card or hard disk (LocalStorage)" }, { "name": "PlaybackByFilename", "description": "The device supports playback based on the file name (PlaybackByFilename)" }, { "name": "MT", "description": "Support streaming media forwarding capability (MT)" }, { "name": "CK", "description": "The device supports CustomKey (CustomKey) (CK)" }, { "name": "RD", "description": "The device has remote debugging capabilities and supports log extraction (RemoteDebug) (RD)" }, { "name": "RDV2", "description": "Support RD capability, support data burying point control, support debugging log upload (RDV2)" }, { "name": "LocalRecord", "description": "Support device local recording settings (LocalRecord)" }, { "name": "XUpgrade", "description": "Cloud Upgrade (XUpgrade)" }, { "name": "TimeSync", "description": "Device supports time synchronization (TimeSync)" }, { "name": "ModifyPassword", "description": "Support user name password information verification and password modification (ModifyPassword)" }, { "name": "LocalStorageEnable", "description": "Support device local storage enable switch (LocalStorageEnable)" }, { "name": "Siren", "description": "Siren (Siren)" }, { "name": "WhiteLight", "description": "White Light (WhiteLight)" }, { "name": "RTSV2", "description": "Real-time streaming supports private protocol streaming, supports dynamic port modification (RTSV2)" }, { "name": "PBSV2", "description": "The playback stream supports private protocol streaming and supports dynamic port modification (PBSV2)" }, { "name": "ESV1", "description": "Support 0x95 extension header encryption (ESV1)" }, { "name": "DaySummerTime", "description": "The device supports daily summer time (DaySummerTime)" }, { "name": "WeekSummerTime", "description": "The device supports weekly daylight saving time (WeekSummerTime)" }, { "name": "TAP", "description": "Time supports 12-hour and 24-hour switching (TAP)" }, { "name": "TimeFormat", "description": "Support time format setting (TimeFormat)" }, { "name": "AbAlarmSound", "description": "Abnormal alarm sound (AbAlarmSound)" }, { "name": "CheckAbDecible", "description": "Abnormal detection tone decibel threshold (CheckAbDecible)" }, { "name": "PlaySound", "description": "Device sound switch capability (PlaySound)" }, { "name": "CustomRing", "description": "Custom Ring (CustomRing)" }, { "name": "LinkDevAlarm", "description": "Associated Device Alarm (LinkDevAlarm)" }, { "name": "InfraredLight", "description": "Infrared Light (InfraredLight)" }, { "name": "SCCode", "description": "The device supports SC security code (SCCode)" }, { "name": "TimingGraphics", "description": "Support the device to capture multiple pictures (TimingGraphics)" }, { "name": "DevReset", "description": "Device Reset (DevReset)" }, { "name": "TLSEnable", "description": "Support TLS transmission (TLSEnable)" }, { "name": "DHCP", "description": "DHCP" }, { "name": "DLS", "description": "Direct log storage (DLS)" }, { "name": "ONLDLS", "description": "ONLDLS" }, { "name": "Reboot", "description": "The device supports restarting (Reboot)" }, { "name": "NEC", "description": "The device supports No encrypt capture (NEC)" }, { "name": "CCD", "description": "CCD" }, { "name": "ME", "description": "Support Message Engine (ME)" }, { "name": "LRRF", "description": "Local recording supports fast forward LocalRecordReplayForward (LRRF)" }, { "name": "CDD-OSS", "description": "CDD-OSS" }, { "name": "CDD-OBS", "description": "CDD-OBS" }, { "name": "CDD-US3", "description": "CDD-US3" }, { "name": "CDD-BOS", "description": "CDD-BOS" }, { "name": "CDD-COS", "description": "CDD-COS" }, { "name": "CDDV2", "description": "CDDV2" }, { "name": "CDD", "description": "CDD" }, { "name": "RemoteControl", "description": "Support remote linkage (RemoteControl)" }, { "name": "FrameReverse", "description": "Support screen flip (FrameReverse)" }, { "name": "AudioEncodeControlV2", "description": "Supports audio encoding control (on or off), only affects real-time video, video audio, and does not affect intercom audio control (AudioEncodeControlV2)" }, { "name": "MDW", "description": "motion-detect-window supports motion detection window settings (MDW)" }, { "name": "MDS", "description": "motion-detect-sensitive supports motion detection sensitivity setting (MDS)" }, { "name": "MobileDetect", "description": "Mobile Detection (Merged with PIR) (MobileDetect)" }, { "name": "SDLIFE", "description": "SD card life (SDLIFE)" }, { "name": "OSD", "description": "Support video channel OSD configuration (OSD)" }, { "name": "1080P", "description": "Maximum capability set supported by the device (1080P)" }, { "name": "mp4", "description": "mp4" }, { "name": "MDMD", "description": "MDMD" }, { "name": "VC", "description": "VC" }, { "name": "WDRV2", "description": "Wide dynamic v2, support 0-100 gear configuration (WDRV2)" }, { "name": "WLTM", "description": "WLTM" }, { "name": "VQS", "description": "VQS" }, { "name": "AudioTalk", "description": "Support voice intercom (AudioTalk)" }, { "name": "AlarmSound", "description": "Support alarm sound setting (AlarmSound)" }, { "name": "pushNotifications", "description": "Push notifications (pushNotifications)" } ], "switches": [ { "name": "localRecord", "description": "Local recording (localRecord)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "breathingLight", "description": "Status indicator (breathingLight)", "state": true, "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "audioEncodeControl", "description": "Record audio (audioEncodeControl)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "localStorageEnable", "description": "Local storage (localStorageEnable)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "whiteLight", "description": "White Light (whiteLight)", "state": false, "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "infraredLight", "description": "Infrared light (infraredLight)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "mobileDetect", "description": "Mobile detection (mobileDetect)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "tlsEnable", "description": "Tls enable (tlsEnable)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "linkDevAlarm", "description": "Siren Armed (linkDevAlarm)", "state": false, "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "abAlarmSound", "description": "Noise detection (abAlarmSound)", "state": true, "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "playSound", "description": "Device sound (playSound)", "state": null, "is_enabled": false, "is_updated": false, "attributes": {} }, { "name": "pushNotifications", "description": "Push notifications (pushNotifications)", "state": false, "is_enabled": true, "is_updated": true, "attributes": {} } ], "sensors": [ { "name": "storageUsed", "description": "Storage used (storageUsed)", "state": null, "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "callbackUrl", "description": "Callback url (callbackUrl)", "state": "", "is_enabled": true, "is_updated": true, "attributes": {} }, { "name": "status", "description": "Status (status)", "state": "Online", "is_enabled": true, "is_updated": true, "attributes": {} } ], "binary_sensors": [ { "name": "online", "description": "Online (online)", "state": true, "is_enabled": true, "is_updated": true, "attributes": {} } ], "selects": [], "buttons": [ { "name": "restartDevice", "description": "Restart device (restartDevice)", "is_enabled": true, "is_updated": false, "attributes": {} }, { "name": "refreshData", "description": "Refresh all data (refreshData)", "is_enabled": true, "is_updated": false, "attributes": {} }, { "name": "refreshAlarm", "description": "Refresh alarm (refreshAlarm)", "is_enabled": true, "is_updated": false, "attributes": {} } ], "sirens": [ { "name": "siren", "description": "Activate siren (siren)", "state": false, "is_enabled": true, "is_updated": false, "attributes": {} } ], "cameras": [ { "name": "camera", "description": "Camera (HD) (camera)", "is_enabled": true, "is_updated": false, "attributes": {} }, { "name": "cameraSD", "description": "Camera (SD) (cameraSD)", "is_enabled": false, "is_updated": false, "attributes": {} } ] } } }


Add your logs here.
user2684 commented 1 year ago

Hi, which model of camera is this? Motiondetection sensor is added based on a capability called AlarmMD which I recon is not exactly the best approach but can be easily fixed in case. Thanks

oggy82 commented 1 year ago

Hi, which model of camera is this? Motiondetection sensor is added based on a capability called AlarmMD which I recon is not exactly the best approach but can be easily fixed in case. Thanks

Hi, thanks for replying! My apologies, i thought i included the model. It's a Imou LOOC/ IPC-C26E-V2

user2684 commented 1 year ago

Thanks will look into it, I need to compare the capabilities of this camera with others to be sure to make the motion detection sensor showing up when is needed :-) I'll share progress in here, will likely be in a couple of weeks from now. Thx

17686481412 commented 1 year ago

I have the same problem ,and It`s a imou camera (LC-TS6-H5MOVE),made in china

user2684 commented 1 year ago

@17686481412 @oggy82 guys give v1.0.13 just released a try, it should fix the problem, if not, feel free to reopen this issue. Thanks!

oggy82 commented 1 year ago

@user2684 thanks !!!