Imou Life - cloud integration

Hi, I have a bunch of Imou cameras and they integrate well through Onvif. However I’d like to have more granular control on things like enable/disable motion detection, enable/disable siren, etc. to be used in my automations.

Looks like this has been asked multiple times and in different ways in the past (*) but apparently with no answer so I’m evaluating to write the integration by myself but before doing so I’d like to ask if:

  1. There is already something out there doing what I want which I missed
  2. If there are additional requirements to consider on top of mine (list below)

What I would like to achieve is the following:

  • Priority 1: ability to control “camera switches” (motion detection, privay, etc.)
  • Priority 2: ability to retrieve alarms (I know motion detection can be achieved via Onvif as well BUT at least for me triggers for each motion even if human detection is on)
  • Priority 3: get the camera stream (probably not very useful since onvif integration works way better and is local to the network with not need to go to the cloud)

I’ve tried playing with Imou APIs and everything seems to be achievable.
Any comments / suggestions?
Thanks

(*):

5 Likes

Hi, I’m very interested about this because I want to buy a Imou Versa streamed with onvif and control if it’s possible the light, siren and motion detection, just because in muy country I can’t buy the wize cam v3 that can control everything with the wyze hacs integration and stream by rtsp (a wyze camera, that had bought me in the USA, has short-circuited).

So you are able to control all of this with Home Assistant? Share the project via hacs if it’s possible, that will be great and thanks in advance

Hi @janinho, I’m progressing with the development (being my first integration is taking some time) but I’d say 90% of the job is done. Actually I’m looking for some beta testers to involve once the code will be ready to validate that the approach is working also with different camera models and different HA configurations.

So far I’ve tested it with two models, the Imou Versa and Imou Cue 2e and seems to be working just fine. To start with, I do support a limited set of switches (the most interesting one of course) and two sensors reporting last alarm time and online status but many other things can be potentially added.
Here is how it looks like:

If you have other Imou cameras to give it a try or anybody else willing to test it, please let me know.
Thanks

5 Likes

Wow that looks great, keep it up. I am more and more convinced to buy the Imou versa camera unless you do not recommend it to me.

It is for this project that I do:

:stuck_out_tongue_closed_eyes:

1 Like

Hi @user2684 !

I would like to try your integration, I already have three Imou Ranger 2C that needs motion detection habilities :wink:

Let me know where can I get your package to give it a try, thanks a lot for your efforts!

Jordi

Thanks @janinho, @Despertaferro , will keep you posted then, it should take some more days to have a first beta version available to be tested (I’m trying to follow Home Assistant coding guidelines and since it is the first time, it is taking longer). As soon as I will have something ready I’ll drop a message here.

@janinho very nice project! I think the Versa fits well because is pretty compact and has also a magnetic mount which can be handy in your scenario. It has a 5V 1A input so just wonder how long can your battery last to keep it running :slight_smile:
Thanks

2 Likes

Wow, this is an awesome project! I have owned one Imou Rex 4MP version and looking for enable/disable privacy mode, LED light, etc… Can’t wait to integrate this to my HA integration! Thank you for making this project happen.

@janinho, @Despertaferro, @khuntop here we are with a first beta version :slight_smile:

It is available for now as a HACS custom repository, at GitHub - user2684/imou_life: Home Assistant custom component for controlling Imou devices.

Please follow installation, requirements and configurations instructions provided on Github for setting it up. It may of course still have bugs. Anything not working properly or any suggestion for making the documentation more clear, please let me know here or opening up issues on Github.

Initial support is for a limited set of switches only, those I could test on my devices. I can easily add more but I’d need to ask some details on your devices at a later stage.
Let me know if works of course :slight_smile: Thanks

6 Likes

Thank you for your hard work! It is easy to setup the integration and everything works fine. All camera switches and sensors work fine. Next step, is it possible to control on/off privacy mode? This is the most wanted feature I am looking for.

Thank you for this fantastic integration! I’m looking forward to buying the camera to test and I’ll tell you if it works. Report if there are any news too

@khuntop thanks for the update! Good news everything is working just fine so far!

To get the privacy switch in I need a favour from you:

  • ensure you have v0.1.1 installed
  • enable debug logging (instructions on GitHub)
  • restart HA
  • do a device discover like when you added your cameras
  • in the logs you should see for each discovered device a long detailed description with a list of capabilities and available switches
  • copy and paste it here, one snippet for each camera model in case you have multiple models
  • ensure of course there are not sensitive information in what you are pasting here (there should not since with 0.1.1 any sensitive data like tokens and so on are redacted from the logs)

Thanks!

Now, I have only one IMOU Rex Camera and here is the info in the logs

  • Device ID: {{DEVICE_SERIAL_NUMBER}}

    Name: Front Door

    Catalog: IPC

    Model: IPC-A46L-D

    Firmware: 2.800.0000000.11.R.220812

    Online: yes

    Capabilities:

      - Support access to wireless local area network (WLAN)
    
      - Support streaming media forwarding capability (MT)
    
      - Support Huashi WeChat Stream Encryption (HSEncrypt)
    
      - Support for cloud storage of China Vision WeChat platform (CloudStorage)
    
      - Support device local storage, such as SD card or hard disk (LocalStorage)
    
      - The device supports playback based on the file name (PlaybackByFilename)
    
      - The device has a breathing light (indicator light) (BreathingLight)
    
      - The device has remote debugging capabilities and supports log extraction (RemoteDebug) (RD)
    
      - Support device local recording settings (LocalRecord)
    
      - Cloud Upgrade (XUpgrade)
    
      - Device end loopback RTSP requires authentication (Auth)
    
      - Support user name password information verification and password modification (ModifyPassword)
    
      - Support device local storage enable switch (LocalStorageEnable)
    
      - Siren (Siren)
    
      - White Light (WhiteLight)
    
      - Real-time streaming supports private protocol to pull streaming (RTSV1)
    
      - Playback stream supports private protocol to pull stream (PBSV1)
    
      - Voice intercom streaming supports private protocol to pull streaming (TSV1)
    
      - Support 0x95 extension header encryption (ESV1)
    
      - Support time format setting (TimeFormat)
    
      - Device sound switch capability (PlaySound)
    
      - The device supports restarting (Reboot)
    
      - Infrared Light (InfraredLight)
    
      - Associated Device Alarm (LinkDevAlarm)
    
      - Abnormal alarm sound (AbAlarmSound)
    
      - The device supports SC security code (SCCode)
    
      - Support RD capability, support data burying point control, support debugging log upload (RDV2)
    
      - The device supports daily summer time (DaySummerTime)
    
      - The device supports weekly daylight saving time (WeekSummerTime)
    
      - Support TLS transmission (TLSEnable)
    
      - Support the device to capture multiple pictures (TimingGraphics)
    
      - Support Three code megre (TCM)
    
      - White light, does not support brightness adjustment ability (WLV2)
    
      - Local recording supports fast forward LocalRecordReplayForward (LRRF)
    
      - CDD
    
      - CDDV2
    
      - Direct log storage (DLS)
    
      - CDD-OSS
    
      - CDD-OBS
    
      - CDD-US3
    
      - CDD-BOS
    
      - CDD-COS
    
      - AUTODSTV2
    
      - Support motion detection alarm (AlarmMD)
    
      - Support PTZ operation (PT)
    
      - Supports audio encoding control (on or off), only affects real-time video, video         audio, and does not affect intercom audio control (AudioEncodeControlV2)
    
      - Support screen flip (FrameReverse)
    
      - Support remote linkage (RemoteControl)
    
      - motion-detect-window supports motion detection window settings (MDW)
    
      - motion-detect-sensitive supports motion detection sensitivity setting (MDS)
    
      - Support head detection (HeaderDetect)
    
      - Support collection points (CollectionPoint)
    
      - Support timed cruise (TimedCruise)
    
      - Support Smart Tracking (SmartTrack)
    
      - Support wifi report (WifiReport)
    
      - Wide Dynamic (WideDynamic)
    
      - Support to close the camera (CloseCamera)
    
      - Abnormal detection tone decibel threshold (CheckAbDecible)
    
      - Ranger2 only supports 4-way pan/tilt capability. Does not support zoom in and out Does not support        digital zoom operation (PT1)
    
      - CCSC
    
      - PTZS
    
      - RQD
    
      - CLOUDAIV1
    
      - EventFilter
    
      - WLM
    
      - RSRS
    
      - Support voice intercom (AudioTalk)
    
      - The device supports WIFI capability (WIFI)
    
      - motionDetect
    

    Available Switches:

      - Local Record (localRecord)
    
      - Motion detection (motionDetect)
    
      - Breathing light (breathingLight)
    
      - Smart Tracking (smartTrack)
    
      - Head Detection (headerDetect)
    
      - Device local storage (localStorageEnable)
    
      - White Light (whiteLight)
    
      - infrared light (infraredLight)
    
      - close camera (closeCamera)
    
      - easy4ip dedicated tls enable switch (tlsEnable)
    
      - Associated device alarm (linkDevAlarm)
    
      - Abnormal alarm sound (abAlarmSound)
    
      - Device sound (playSound)
    
      - Wide Dynamic (wideDynamic)
    

    Configured Switches:

      - Motion detection (motionDetect): OFF
    
      - Breathing light (breathingLight): OFF
    
      - Head Detection (headerDetect): OFF
    
      - Abnormal alarm sound (abAlarmSound): OFF
    

    Sensors:

      - Last alarm (lastAlarm):
    

    Binary Sensors:

      - Online (online): OFF

Great thanks! It must be the closeCamera switch, I’ll add it along the weekend then.
I’ll also add linkDevAlarm, whiteLight and smartTrack which all seem useful to control.

Theoretically I could have all of them automatically added but each switch means a new periodic api call and I’m afraid if too many could hit the daily limit of imou Cloud api, especially if one have multiple cameras.
And also it may be confusing for the user I think to have too many not significant switches, if this makes sense.

Thanks

1 Like

Thank you! That makes sense. I’m looking forward to.

Hello I own sevral imou IPC-C22C and your integration works great, but I need some help. I’m probably OT but I have tried everithing without success. Using the ONVIF integration I can only stream (add) one camera at the time; as sson as I try to add second onvif camera I get the message that the camera has already been added and the integration crashes. Any clue on how I could solve that problem?
thanks and gratz for the integration again.

@isiden1 I think you hit the same issue I had. Have a look at my post here and check if the workaround I’ve used works for you as well: Onvif multiple camera configuration - #15 by user2684
Thanks

Yesssss thanks, I’ve been tracking that post for almost one year and I’ve missed your answer of 2 weeks ago…
I can confirm that now everything works fine. Thanks again :slight_smile:

Hello,

does this integration support Imou video doorbells (Imou DB61)?

@dlogic I’m very optimistic it would since the underlaying APIs are the same. But I’d need to have a look at your device capabilities to confirm since I don’t have one to test.
Can you please go through the steps highlighted on Imou Life - cloud integration - #11 by user2684 to discover your device and share the ouput from the debug logs?
Thanks

@khuntop and all, I’ve just made available version 0.1.2. If previous versions have been installed via HACS, the update should show up in the HACS interface as you are used to.

In this release, instead of adding the new switches we discussed in the last few days, I went for an approach which I hope can be even more flexible: for each device ALL the discovered switches are added as entities but only a few (the one we selected) are enabled by default in HA, the others show up as disabled. In this way a user can enable it without requiring any change to the integration’s code.
Minor but nice change, I’ve added icons and logos :wink: After the upgrade, the new switches should show up without the need to remove and re-add the device back again.

Let me know if it works as expected (would be nice also if you can share a screenshot of the device in HA, just for my own curiosity)

Please of course still consider this integration as an early beta since not tested extensively.
Thanks

2 Likes