I am very interested in this product https://www.getkuna.com/ in particular MAXIMUS SMART SECURITY LIGHT. It would be great if I can automate lights with this camera sensor and also notifications via Home Assistant. I would like to see the cameras using the HA frontpage as well. That way I can see all my cameras.
You can add me to the list of interested person! Kuna light are ideal for outside camera as it doesnāt stick out like standard camera. It doesnāt make your home look like a rockstar protected mansion!
Having them integrated in Home Assistant would be ideal!
I poked at this a bit a month or two ago, as I have a Kuna (early kickstarter backer, back when they promised thereād be API access and such, long before I started with Home Assistant.)
The camera actually connects back to their servers (running on AWS) via an SSL tunnel, so difficult to get anything meaningful from the data flow. No way to get any sort of status from the local device I could find, and the extent of their API/integration to date is āyou can use our Alexa skill to turn the light on/off.ā They claim itās due to security concernsā¦ but I suspect it has more to do with a desire to sell their cloud video recording service.
I love the physical form factor of the light, but unfortunately canāt recommend it if you want any ability to integrate it into your Home Assistant system.
I donāt think those APIs have been exposed for more than a few months but yea Iām happy we finally have a way of pulling info down from those cameras in real-time. I recently created a hassio addon (here), mainly to determine if/when the motion sensor gets triggered, but it is also bringing some other (semi-useful) information from the responses back to HA. The thumbnail endpoint doesnāt appear to be real-time so I avoided pulling the URL in, but as you suggested (and loghound appears to have documented to a greater extent), there may be other endpoints out there that we can take advantage of. At least we have a URL to hit
FWIW the thumbnail URL is real-time or close to it; I tested by pulling an image, switching the light off, pulling again and got a dark image immediately, so I think itās useable. Just doesnāt update without a new pull.
This is great to hear, I actually asked them a few days ago about APIās and they replied there wouldnāt be any shared! And as another poster said they just want you to pay for their cloud service is the only reason they havenāt opened it up Yet.
Hey all, Iāve just started looking into this as I own a Maximus light myself and want to integrate it with Home Assistant. To that end, Iāve written and released v0.1.0 of pykuna: https://github.com/marthoc/pykuna.
Before I start working heavily on the Home Assistant integration, it would be helpful if interested people could test pykuna (especially those who have more than one device in their account). To do so:
The debug script will log into your account and dump the data for each camera in it. Copy and paste the output into a DM to me. The only āsensitiveā data contained in the dump will be your cameraās serial number, but (among other things) Iām trying to figure out if we can determine device model type from the serial number since it doesnāt appear to be indicated in the API response otherwise. For each camera in the dump, please let me know what model it is (i.e. Maximus Smart Security Light, Toucan, etc.) so that I can see if there are variations in the API response between different models of camera.
Building on my initial work, Iāve written a custom component for HA that starts to integrate Kuna cameras.
Iāve made a couple of big assumptions about how the API works given that I only have one device and, accordingly, I only know how the Maximus Smart Security Light is modelled in the API. Iām assuming the other Kuna devices work similarly but Iād be happy to hear otherwise so that I can fix and update.
If you would like to test, please grab the release from GitHub: https://github.com/marthoc/kuna/releases. Installation and configuration instructions are in the README. Currently you should get a binary sensor (motion) and switch (control the cameraās light bulb) for each camera in your account - support for an actual camera entity will follow soon, Iām working on it.
Itād be really great to eventually be able to have events around recordings - one of the inconveniences of the Kuna is having to download the videos via the mobile app. Itād be great to have thumbnails and videos automatically pulled and available for notifications.
I cloned the component and installed it. Havenāt had a chance to test the motion detection yet, but light toggling and status checking seems to work, with one caveat - upon initial restart with the component, the light status was shown as āonā when it was actually off. Once I manually toggled it once, it seems to keep up just fine, even with light changes triggered from the Kuna app.
Edit: I noticed that the switch state wasnāt reflecting the actual state of the light (showed on when it was off), despite it having been several hours since the Kunaās light turned off. I opened the Kuna app on my phone to verify that the Kuna app showed the correct results and at that time HAās view of the switch status finally updated, even though I didnāt do anything other than open the Kuna app.
The API does seem a bit finickyā¦ Iāve also noticed that sometimes the API responses donāt reflect the actual state of the device, which isnāt a problem I can solve unfortunately (the component just reads the values that are there). I also think that sometimes a command from the app (like light toggling) makes the correct API call but for whatever reason even though the device reacts as it should, the API isnāt updated.
Since opening the app (without actually toggling anything) seems to cause the status to properly update again, Iām guessing that if thereās been no motion activity from the camera, and nobody triggers a connect from the app, then the servers stop tracking the deviceās state. Perhaps thereās a particular endpoint that triggers them to refresh the state.
One way to test your hypothesis would be to wait till the light is out of sync in Hass then trigger a motion detection. Does the switch status update to the correct state?
Thanks for working on this, great to see support. Unfortunately, due to the lack of support at the time, I did not purchase a Kuna and went with a Nest Hello. Also placement of my Kuna would not have worked well for my front door.
Best of luck, keep me posted. Maybe I will purchase one in the future for my backyard.
RE: the addon - I had something unexpected come up and couldnāt look at HA for 3 months. The one thing keeping me from releasing a fix now is an issue being tracked on git related to the recently released webhook component, which is needed for bringing thumbnails in via the push camera platform. Once resolved, the addon should be reliable for bringing polling-based status updates and thumbnails into HA.
@marthocoo - thanks for working to wrap an HA component around the API. My use case is limited only to motion detection, which is why the docker addon made sense. But now knowing the full scope of what the API allows, it definitely makes sense to create a more complete integration directly in the HA code base.
FYI, I poked around with Charles and noticed that in addition to allowing certain camera settings to be updated, a live websocket rtsp stream exists @ wss://server.kunasystems.com/ws/rtsp/proxy?authtoken=authtokengoeshere