Imou Life - cloud integration

I already have the Imou versa camera and unfortunately in the app it can’t control the white light, it’s ridiculous, it only turns on automatically with a specific night mode. I have already discussed with the customer support center that a firmware update must required.

Can you tell me if you have the same model of versa IPC-C22F-C and if you have a switch to turn on the light?

Regarding your integration, it works to turn on the status LED but not the siren, I have already done the update integration and more switches have come out, although I don’t know if everything work.

Thank you for your hard work again! for version 0.1.1 when I turn on breathing light or other switches sometimes it shows error “expire token” but after updated to version 0.1.2 everything works fine so far.

@janinho regarding the Versa, unfortunately you’re right. Actually I did start looking at the API specifically for finding out an undocumented way to manipulate the white light. I discovered that it doesn’t turn on on motion as advertised but only if you change the night mode to a specific value but in this case will stay on all the time which is not ideal. Maybe an option can be to capture the motion event, change the night mode through the api for e.g. a minute and then restoring its value back. I will look into this down the road. Still not ideal of course.

The siren should be associated with the “Associated device alarm” (I took the name of the switches from the api documentation which is probably a poor translation from Chinese). If you enable it, you should see the siren switch you have in the app enabled.

Thanks for the screenshot! Was it you enabling all the switches right? Just to confirm they showed up as disabled as they should after the upgrade.
Thanks

@khuntop thanks, I’m afraid the access token expired issue is still there also with 0.1.2, it is what I’m working on right now which is critical to be fixed, thanks for pointing it out! (temporary workaround is to manually reload the integration when it shows up).

Hello, version 0.1.3 just release should have the expired access token issue fixed :slight_smile:
Thanks

1 Like

The switches were active for being active in the app and the same for the non-active ones.

Hopefully they do a firmware update to be able to turn on when we want the white light.

Thanks again for the work you do with this integration

Hi all, for those who had the chance to test the integration, wonder if it can be considered stable enough so I can add it to the default HACS repository. And if you have any feedback on the documentation for installation/setup to be more clear for new users, let me know.

Also wanted to ask you your feedback to prioritize possible future developments. Some random throughs here below in a sort of prioritized order:

  1. Ability to modify night vision mode
  2. Ability to receive push notifications (alarm status change and device offline)
  3. Ability to modify other alarm settings from within HA (e.g. motion detection sensitivity, alarm schedule, etc.
  4. Ability to take a snapshot

I’d put priority on #1 which can be helpful if we want to turn on programmatically the led on the Versa device from HA, and #2 which allows reacting upon alarms in real time (the sensor with the time of the last alarm we already have updates only every polling cycle and the motion detection through onvif does not take into account the human detection setting). What do you think?
I assume instead bringing video streaming in does not make sense, too complex and onvif integration works way better and faster.

Thanks

After 7 days testing, there is no more “expired token” issue. Everything works fine so far.

Hi all and thanks to @user2684 for the fantastic job in the Imoulife integration

I have a Bullet 2E camera and these are the switches and sensors available:

# Switches

(Enabled and visible by default)
Breathing light
Head Detection
Motion detection
White Light

(Disabled and invisible by default)
Local recording
Local storage
Tls enable
Wide Dynamic


# Sensors

Last alarm
Online

it would be nice, if possible, to have some other switches and sensors like storage left, enabling/disabling notifications, selecting night vision modes and enabling/disabling audio

I was looking also to Ezviz cam, but after I discovered your integration now I more convinced to remain with Imou!

PS: Another thing that could be interesting is, if possible, to have the switch to enable/disable the light when motion is detected.
From the app there is only the option to enable or disable without any possibility to manage the timing when this should be done. So even during a clear sky day, when motion is detected, it will turn light on.
It should be something the the Imoulife app should do, but if there is a possibility to have that switch available in HA, it could be easy to have the light turn on only when needed

Amazing work, I have been looking for this for a long time, this is amazing and it works :slight_smile: I can confirm it’s working with Ranger 2C, I have played with “Head detection” and “Smart Tracking” but can’t figure out what they do, I don’t see any changes, it would be nice to have some documentation of what each switch does.

I have also observed that when you change a switch state I think you are sending all the other switch states, I had my privacy switch to “ON” then from the app I opened the camera and deactivated the privacy switch, but as you mentioned this is not “LIVE” as it’s with poling, so HAS did not show that it was now disabled, so when I clicked another switch on HAS, I got on my app the privacy turned back to “ON” as in HAS, are you sending some sort of JSON with all the current values?

UPDATE
I added my camera also with onvif integration and now i can make a snapshot with service camera.snapshot :wink:

Hi thanks for your work!! i start to use your integration today and it seems work without problems!
I hope that you can add the 4 bullet (snapshot)!
(i use bullet 2c camera)

I see that in my last_alarm sensor time is 2 hours ahead…what can he derive from?
i have also another question, it’s impossible to have a motion detection sensor? (last_alarm change with large delay respect android notification) → second bullet of next feature…
I look forward to this new feature :slight_smile: sorry

First of all thanks for all the feedback guys :slight_smile: Let me answer point by point:

@khuntop Thanks, happy the token renewal issue has gone.

@woody4165 theoretically all the available (supported) switches should be already there, if this is not the case we need to investigate :slight_smile: What do you see that it is missing? storage left could be a nice addition, I will add it to the list, thanks. Night vision mode is already in the TODO list so perfect. What do you mean by enabling/disabling audio? Do you mean the alarm which triggers when there is noise? This should be already there with the name “Abnormal alarm sound” for those cameras supporting it.
As for the notifications this was something I was interested as well. It turned out (unfortunately) that it is not something related to the API but to the Imou Life app itself. The app register a callback url and receive all notifications, then, based on the configuration of the app, makes the notification showing or not showing. Actually we can reproduce the same behavior with the item #2 Ability to receive push notifications above. Of course this will run in parallel with the Imou Life notification configuration. Not ideal but I couldn’t find a better way.
The enable/disable light switch. Unfortunately I only have a Versa model with a light which does not turn the light on motion so cannot test it. But wonder if the “White Light” switch is what you are looking for. Try enabling/disabling it to see if it does what you have in mind.

@PonyOny “Head detection" maps to human detection in the Imou Life app. So far I’ve been using the name of the switches from the Imou API documentation which I think is a pretty poor translation from Chinese. I’ll try providing a better translation so make those labels more self-explanatory. “Smart Tracking” I guess is the capability of the camera to follow the movement once a motion is identified. The only documentation available is on Device capability switch · Development documentation but does not tell much. We probably need to provide a more detailed description whenever available from within the integration, agree.
Regarding the switches which turned on, this is weird. When we do the polling (15 minutes by default which can be changed in the options), I do poll of course all the sensors. But when you set a switch, it only set THAT switch. I did notice though that sometimes when you change something, other switches move behind the scene. E.g. if you have both motion detection and human detection on and turn motion detection off and then back on again, human detection stays off even if was on before. But this is the same behavior of the Imou Life app. Theoretically with this integration we should see the same behavior of the app cause we are calling the same APIs. If what you noticed can be reproduced, I’d be interested in having a look at you debug logs.

@snatch7 thanks, I didn’t know snapshots could be taken through the onvif integration so my roadmap item #4 above does not make sense anymore :slight_smile: Last alarm two hours ahead…wonder if it is because of the timezone, will double check it thanks.

To all, thanks again a lot for the feedbacks so far! Before going ahead with the development of the new capabilities that we discussed I first want to move the integration out of beta, bumping to a 1.0 version and request to be added on the HACS default repository. Please beware, expect by then a potential breaking change: so far switches have been named <devicename>_<switchname> as entity id with switchname the full name of the switch. This is a BAD idea because if the name of the switch change in the code or if we will add translations, the entity id will change as well which is not something which should happen. I will use the “short name” in the next version instead (e.g. instead of devicename_abnormal_alarm_sound will be something like devicename_abalarmsound). If you are using the switches through the UI, will have no impact, if using it in automations, you may want to fix the names there as well after the upgrade.
Will keep you posted along the way of course.
Thanks

1 Like

Thanks for you answer @user2684 !

By enabling/disabling the audio I mean just the switch in the app, not a trigger, just the ability to ear or record the audio during a live or recording.
Same for enabling/disabling the light when motion is detected. The white light switch toggle the light, independently from motion, while there is an option under Light (or Led in english, since I have the app in Italian) that triggers the light when motion is detected and that can be enabled/disabled.

Thanks!

same for me.
also in my video or snapshot recordings, the time is 2 hours ahead of the time shown in the live video. This should be a bug in the app

same for me.
also in my video or snapshot recordings, the time is 2 hours ahead of the time shown in the live video. This should be a bug in the app

@woody4165 for enabling/disabling the audio, since you have Imou Life in Italian as I do, are you referring to the setting called “Raccolta audio dispositivo”? If so I have the same so I can do some testing with it.
As for enabling/disabling the light, I wonder if it is the switch called linkageWhiteLight in the Imou API but then should be created automatically. Can you please share with me the list of Capabilities of that specific model, wonder if I missed some mapping there. The list of capabilities are printed out in debug logs, just above the supported switches that you posted a few days ago.

Got it about the last alarm issue, should be an easy fix, agree.
Thanks!

1 Like

Ciao @user2684 !

Yes, it’s the “raccolta audio dispositivo” the one.
Regarding the list of capabilities, I haven’t understood where to find it. If you want you can write me in Italian with a PM.

Regarding the alarm issue, ok, but it should be fixed by Imou, since I see same error in video or snapshot recordings.

Thanks again

Hi guys, version 1.0.0 just released; as anticipated no major changes but it fixes two things:

  • Last alarm sensor now shows the right time (provided the camera and home assistant have the right timezone set)
  • Entity IDs are now based on the name of the sensor, not the description

The latter change, at least based on my tests, has no impact on already configured devices so no changes are required, differently to what I was assuming and writing a few days ago. But just keep in mind that when you will add the next camera after the upgrade, sensors will will have a different default entity id (e.g. instead of devicename_abnormal_alarm_sound will be something like devicename_abalarmsound). Up to you if you want to keep things as they are or re-add them back again.

I will now proceed to request the integration to be part of the default HACS repository, once done, I will start looking at the development items we discussed :slight_smile:
Let me know if something is not working as expected.

Thanks

2 Likes

@woody4165 got it, will have a look at this audio switch, thanks

Regarding the capabilities, let me write it here since can be useful to other people. Follow the procedure to enable debug logging (Imou Life - cloud integration - #11 by user2684) and copy and past the long list of capabilities of the discovered device here so for me to understand if there is any capability which is not mapping to a switch.
I will probably need publish this procedure somewhere and make this information more accessible in the next releases :slight_smile:

As for the alarm issue, try the latest version just released and ensure your camera has the right timezone configured, it should work just fine now.
Thanks!

1 Like