Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Privacy mode - blur & dim picture based on a boolean entity #624

Open
alexruffell opened this issue Dec 10, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@alexruffell
Copy link

When showing my Home Assistant Dashboard to others, or sharing it online, I prefer to blur out the camera feeds.

Using the picture-glance card, this is how I was achieving it:

type: picture-glance
title: Driveway - East
entities:
  - entity: input_boolean.driveway_east_camera_privacy
camera_image: camera.driveway_east_camera
aspect_ratio: '16:9'
camera_view: live
state_filter:
  'on': brightness(40%) blur(10px) saturate(0.0)
  'off': brightness(100%)
entity: input_boolean.driveway_east_camera_privacy

Example of the privacy mode:
image

Now that I am using the webrtc-camera card I can't find a way to do it.

type: custom:webrtc-camera
entity: camera.driveway_east_camera
poster: camera.driveway_east_camera
title: East
media: video,audio
muted: true
digital_ptz:
  mouse_drag_pan: false
  mouse_wheel_zoom: false
  mouse_double_click_zoom: false
  touch_drag_pan: false
  touch_pinch_zoom: false
  touch_tap_drag_zoom: false
  persist: false

Would you kindly consider adding this feature?

@AlexxIT AlexxIT added the enhancement New feature or request label Dec 10, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Dec 10, 2023

It's not very smart to protect your camera on the client side. This protection bypasses.

@alexruffell
Copy link
Author

It is not a protection against unauthorized use or anything of the sort. I use the "privacy mode" when I take screenshots of the dashboards that include cameras, when I share my desktop (view only) to show something to those I help, or when I show Home Assistant on my phone to others. Streamers would also benefit from this.

If I need to be 100% sure that someone with dashboard access cannot see the feed, I can power down the camera (PoE) or disable HA's access to the NVR.

@AlexxIT
Copy link
Owner

AlexxIT commented Dec 10, 2023

url param supports Jinja2 https://github.com/AlexxIT/WebRTC#custom-card

@alexruffell
Copy link
Author

Are you suggesting that I can write a template that resolves to the correct camera feed if privacy mode is off, and to nothing if privacy is on?

If so, it gets me close but would be nicer if the privacy on mode had a predefined look rather than an error message for inaccessible camera.

Will have to research this as I don't have a clue on how to do this off the top of my head.

@AlexxIT
Copy link
Owner

AlexxIT commented Dec 11, 2023

You can create some dummy stream with streaming static file. But template will work only with url, not with entity.

@alexruffell
Copy link
Author

If I can't turn privacy on or off based on an entity then it seems this solution doesn't work for my case and I have to go back to the old card :( The picture-glance card is worse in nearly every way possible but I like 2 things about it: 1) state_filter allows me to implement my own custom privacy mode 2) It doesn't make it so obvious that the feeds are not loaded when you open the dashboard at first. With the awesome webrtc-camera card it is so obvious (black background with huge twirly circle until it loads) it is really annoying me to see how long it takes for the 5 feeds to load. I think I need to explore something in between HA and the NVR (maybe scrypted?) to make the feeds lighter (currently 4K, 264, 16Mbit streams)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants