Imou Life - cloud integration

Hope I did the right steps.

I have added this to configuration.yaml

logger:
  default: info
  logs:
    custom_components.imou_life: debug
    imouapi: debug

And try to add a new Imou device, stopping after the actual camera was discovered.

Then I go in Settings->System->Logs but I don’t find anything.

Are these the right steps?

Thanks

@woody4165 yes this is the way it is supposed to work, strange it hasn’t for you. But to make things easier I’ve just published version 1.0.1 which provides diagnostics information directly through the UI without the need to change any logging level.

Just go to the device page and click on “Download Diagnostics”. Review there are no sensitive information inside the file (there shouldn’t) and share it with me via PM :slight_smile:
Thanks!

1 Like

Sent you PM

Thanks!

Thanks! I understand now why the “raccolta audio dispositivo” was not showing up. Long story short the way Imou maps capabilities with switches is the following: they give you the list of capabilities for each device and IF the same capability name is listed as a switch here Device capability switch · Development documentation with the same name, then the switch is supported (very complicated IMHO and not always reliable).
In our devices, the capability was called AudioEncodeControlV2 while the switch is called audioEncodeControl so it was no created by the integration. This is en easy fix, I just need to get rid of the v1, v2, etc. to identify if a switch is supported or not :slight_smile: Will work on it.

Regarding the white light, I cannot see any mapping between your capabilities and potential switches in the documentation. I wouldn’t be surprised if inaccurate or outdated though. Only chance we have is a sort of bruteforcing: we get the value of ALL the switches (supported or not) so to identify what has changed once you change it on the app. This would require you can run some python code I can share with you, not necessarily on HA (or even better outside HA). Is it anything you can do for me? If so let me know and I’ll PM all the details :slight_smile:
Many thanks

Thanks @user2684 , just let me know and I’ll try to do my best!

Thanks! Will PM with all the details then :slight_smile:
Meanwhile version 1.0.2 just released should fix the missing switch issue (and you should see upon restart a new switch called device_name_audioencodecontrol)

1 Like

With the latest version I also see more switches (bullet 2c) :wink:
Now I am only looking forward to the motion detect sensor (at this moment I use the change of state of the last alarm data, but due to the delay it is not reliable / usable).
Thank’s for your great job

1 Like

I’m seeing the new switch that you are talking about, Audio encode control, but it is hidden.

Should I set all them visible, or they are hidden for some reason?
If I go inside the hidden switches, i see them Disabled, not hidden.

Schermata 2022-10-19 alle 13.29.08

Thanks!

PS:
strange thing happens with Audio encode control switch, if I change from HA, it changes also in the app, but not the opposite.
Regarding Wide Dynamic, I don’t understand what should be the relative switch in the app

Thanks for confirming. This is the expected behaviour, all the discovered switches (apart from a few of them), will be loaded in a disabled state. You can simply go and enable them through the UI. This is to avoid too many API calls to the backend, by default. Of course the list of switches which is automatically enabled can be changed in the integration’s code as well as the default icons. So if you guys have a different view of what should be enabled/disable by default, let me know.

Regarding the audio encode switch, I think this is expected as well. The integration updates the status of the switches every 15 minutes so if you change anything in the app, will be reflected in HA only after the update cycle. The 15 minutes are configurable of course. But I’m thinking of a button through which we can trigger the refresh at any time, manually or through automations.
Wide Dynamic, I have the same, no clue what it does and documentation does not help at all :wink:
Thanks

1 Like

Wide Dynamic = HDR switch :wink:

1 Like

OT
Is anyone having issue on changing device password (not the account password) ?

Hello all, thanks to @woody4165, we did discover a few things regarding missing switches. As previously mentioned, the API documentation says available switches are those having a device capability (Device capability set · Development documentation) with the same name of a switch (Device capability switch · Development documentation) BUT we discovered that:

  1. There are a few capabilities which are also switches even if not listed in the available switch documentation. Those are CloudStorage, LocalStorage and MT. None of those are interesting to be controlled by the integration IMO
  2. There are capabilities not documented in the capability documentation such as WLM (stands for White Light Management? Who knows)
  3. There are switches that can be controlled even without the corresponding capability. This was linkagewhitelight in @woody4165’s device. Also the motionDetect switch actually is not mapping to any capability

What does it mean? Good news is that we can still control almost everything through the API. Bad news is that is not so intuitive to derive available switches per device automatically.

For now I’d fix this in a kind od empirical way: I will use the WLM capability found in the bullet2e device to make the linkagewhitelight showing up, until we will discover it works in a different way. I don’t see WLM in other devices (cue2e, versa, rex) and also is not there in the versa, which has the white light but cannot be linked to the motion detection, hence seems to have sense.

If you guys have any other model to share with me diagnostic information via PM, would greatly help in figuring out other potential connection :slight_smile:
Thanks

1 Like

I sent you a PM with my camera diagnostic

Hey @user2684 - thanks for your efforts in the community.
Would your integration in any way be possible to control Imou vacuum cleaner robots (i.e. model Imou RV-L11-A)? I currently do have to use the Imou Life app which is awful. Rather I’d like to integrate into HA.

If not, do you plan to extend the plugin in such way?

Thanks!

@massocin theoretically the APIs should be the same, even if in the documentation I couldn’t see much regarding vacuum cleaner and don’t have one to try out :slight_smile:
I’d recommend to go and install the integration, configure it and see if any device will popup during the discovery. If so, add it and share with me the diagnostic information via PM so I can have a look how it looks like and the possibilities we have there.
Thanks!

Is there a way to get a sensor when motion is activated or can I use the last_alarm sensor to evaluate the motion?

Thanks

I did just that, unfortunately the device does not pop up in the installation process. Any way I can help providing more info regarding that robot?

FYI: That does work though in the Google Home app, I can link my Imou account there and my robot shows up.

@woody4165 not now but we can get realtime notifications upon alarms or when a device goes offline. I’ve put together a more consistent roadmap here so we can track what is missing and the priority: Roadmap · user2684/imou_life Wiki · GitHub. Push notification are there :slight_smile:

@massocin do you mean after the installation you add a new integration and even with the “Discover registered devices” enabled the list of devices returned empty right? If this is the case, wonder if they are using a different set of APIs for vacuum cleaners…will investigate further, meanwhile I’ve added it to the roadmap.
Thanks

1 Like

@user2684 Yes, I assume there should be a dropdown-list do choose devices from, there is none for me (see screenshot).

Screenshot 2022-10-22 150532

Please let me know if I can help out in any way (i.e. Postman responses or else) - thanks a lot for looking into it and sorry for going off camera topic.

Hi guys, lot of new things in version 1.0.3 just released :slight_smile:

  • Added support for making the linkagewhitelight switch showing up in Bullet2e cameras to turn the white light on upon motion events. @woody4165, let me know if it shows up and works, the switch should be enabled by default.
    @janinho I forced the same with our Versa, maybe it was supported but just hidden but unfortunately I got a not supported error message when I try to enable it, so yes, we need to wait for the firmware update…
  • Added Night Vision Mode switch, for those devices supporting it. @woody4165 same as above
  • Added “Storage Used” sensor (percentage)
  • All the sensors, not only the switches, are now showing up only if there is a corresponding capability (e.g. night vision mode appears only if the device supports it). This should have no impact but let me know if there is something which was showing up before which is no more appearing
  • Added support for push notifications @snatch7 and others. Please go and read the instructions at GitHub - user2684/imou_life: Home Assistant custom component for controlling Imou devices for setting it up. It may be still have bugs.

Finally I spent a good amount of time to integrate in the CLI of the api library all the available API endpoints to facilitate troubleshooting. @massocin this could help us understanding if vacuum cleaner are hidden somewhere or not.
Please run the following, where you have python 3.9 environment and preferably outside HA:

  • pip3 install imouapi
  • python3 -m imouapi.cli --app-id <your_app_id> --app-secret <your_app_secret> api_deviceBaseList
  • python3 -m imouapi.cli --app-id <your_app_id> --app-secret <your_app_secret> api_deviceOpenList
    Share with me via PM the output of the last two commands.

Thanks!

3 Likes