Logi Circle camera with HASS

Sensor showing up now. :+1:

Totally agree. Would be nice to get this implemented as a (big) step one.

hi, can you please explain me how to use logi_livestream_snapshot ?
iā€™ve exposed the tmp dir in homeassistant but i cant grab any screenshot recalling the service camera.logi_livestream_snapshot with :

{ "entity_id": "camera.salotto", "filename": "/tmp/snapshot_{{ entity_id }}.jpg" }

edit:
if i recall the service changing the path to /config/tmp/
i can find the screenshotā€¦

Iā€™m guessing youā€™re running Home Assistant from a docker container. If so, the filename you specify will write the image inside the containerā€™s filesystem. Writing to /tmp is probably not desirable here as youā€™ll need to use docker cp to copy the file from the container to wherever you want it placed in the host OS.

I use docker too, and Iā€™ve set up an additional mount to write media to. But for starters, you can just write to /config, which is a mount pointed at wherever you store your hass config in your host OS.

If you do want to create an additional mount, just specify this at the time you create the container, eg.
$ docker run -d --name="home-assistant" -v /path/where/you/want/to/dump/screenshots:/hassmedia -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
Following this example, you can then write to /hassmedia from your home assistant service calls and itā€™ll go wherever you mounted it.

1 Like

To find out what your root folder is, click on the ā€œinfoā€-icon under the developer tools. Below the version number youā€™ll find something like this ā€œPath to configuration.yaml: /configā€. See what youā€™ve got, and go from there :+1:

1 Like

thankā€™s ! iā€™ve configured the path for the snapshot to /config/tmp/

thankā€™s for the explication!

Iā€™m pretty close to raising a pull request. Code is pretty much done + polished and documentation has been written. Iā€™ve got one implementation detail left that Iā€™d be very grateful if a 2nd gen owner could clarify.

For 2nd gen owners, does the camera have an on/off toggle? This is how my 1st gen appears in the web UI:

If itā€™s anything else, please let me know what you see.

And regardless of whether itā€™s an on/off toggle or something else, can one very kind person please share the request the web UI sends when you change the on/off state? If youā€™re in Chrome, open the menu, go to More Tools then open Developer Tools (F12 on Windows, Option+Cmd+I on MacOS). Open the Network tab. Then, change the on/off state. Youā€™ll see a flurry of requests, generally itā€™s the 2nd request after you performed the action that contains the relevant payload. Iā€™ve taken a screenshot of my dev tools below so you know what look for (whatā€™s highlighted in red).

DO NOT SHARE A SCREENSHOT OF YOUR DEV TOOLS (if youā€™re not careful, youā€™ll expose details that would allow others to steal your session). All I need is the content of the payload when you change the on/off state (if itā€™s on/off, I need the payload for on, and for off. If itā€™s something else aside from on/off, then every combination please).

Thank you!

Hi! I can confirm my WebUI looks like yours with the 2. gen camera.

Payload OFF:
54

Payload ON:
41

1 Like

Perfect! Thank you so much!

Quick update: The pull request into home assistant has just been merged, so Logi Circle support becomes official in 0.79. Thanks for everyoneā€™s help with testing! Next to no new features come with the official component, but a few bugs have been squished and the names of the component, platforms and services have all changed slightly. In particular, live stream recordings should be much more reliable.

When it goes live, the documentation will be available from: https://www.home-assistant.io/components/logi_circle/

For now, you can look at the documentation preview here (I have no idea how long this link will work): removed, component now live

You can continue using the custom components for as long as you want - though obviously Iā€™d suggest you switch over to the official component when 0.79 is released.


Next up, Iā€™m looking to add:

  • Optional configuration to show last activity video when opening camera (already working)
  • If I can, optional configuration to show live stream when opening camera (getting livestream = already possible, continuously streaming it to hass in near real-time = tricky)
  • Motion alerts (exposed via a binary sensor)
2 Likes

Great work! Iā€™ve been using the custom component for a while now, and itā€™s working fine! Looking forward to getting it implemented in HASS.

@evanjd Fantastic work! Just upgraded to 0.79 and it works for me! Thank you! Cheers man!

1 Like

Hi @evanjd,

Any progres on live feed?

Really looking forward to this!

1 Like

Sorry for the radio silence. Work has been busy so I took a bit of a break.

Someone from Logitech has reached out and pointed me in the direction of a soon-to-be-released public API, so my first priority will be updating the API wrapper and home assistant integration to use this. This will be a worthwhile change for a few reasons:

  • The API the hass integration targets will be stable (the current one could break at any time if Logitech update anything in their private API the web app uses)
  • It uses OAuth, so no more passing your username and password directly to Home Assistant.
  • It looks like state changes and events can be pushed, rather than polling every 30-60s as it does now. This will also enable real motion alerts from home assistant.
  • More features, simplifies the implementation on the hass end, etc

I will try and integrate the live stream better at the same time. In the mean time, I can post an updated camera component that gives you the last activity video (instead of the still) when you open the camera in the hass UI. Iā€™ll get that up in the next 24 hours.

1 Like

Someone from Logitech reaches out to you about an official api? Thatā€™s great!

Keep up the good work!

As promised Iā€™ve posted a quick update to the component staging repo: https://github.com/evanjd/hass-logi-circle

Itā€™s not much, it just adds support for showing the last activity video instead of the still image when you open the camera in home assistant. If your last activity video was very short it might zoom by pretty quick and just show a white window - thatā€™s how home assistant behaves when being served a video with a finite length.

Iā€™ve noticed that logi_circle sensor is broken on 0.81. Iā€™ve verified it works correctly on 0.80.3. The logi circle implementation hasnā€™t been touched since my PR on 0.79 so looks like a breaking change somewhere else in home assistant. Iā€™m looking into it.

1 Like

Iā€™ve raised a PR to fix the sensor regression: https://github.com/home-assistant/home-assistant/pull/17909. Iā€™ve also updated the hass-logi-circle repo with the fix.

I just got a Circle 2 today and tried to configure it into home-assistant. But it simply just doesnā€™t want to show up. I made extra sure that I used the correct username and password.
Did I write something wrong or is something missing in the process?

#
logi_circle:
  username: [email protected]
  password: xxxxxx
#
camera:
  - platform: logi_circle
#

Your config looks correct. Have you looked in the logs for clues?

1 Like