Upgraded to 0.81 and cameras are now minimized

Upgraded to the latest release (hassio) yesterday and since then my cameras are “minimized”, I need to click them to open the stream when using a PC (latest chrome version). On my Android phone they are not minimized and can be viewed directly when browsing HA.

I have 7 cameras from zoneminder and all are behaving the same way.
1 camera from raspberrypi/octoprint (MJPEG camera)
1 camera from a TP-link IPcam (MJPEG Camera)

I’m also using Custom-UI from https://github.com/andrey-git/home-assistant-custom-ui, disabled it and the problem is still there.

Tried clearing my cache and tried it from 3 different PC’s.

This is what they look like in Chrome

Just downgraded hassio to 0.80.3 and the problem is gone.

Capture

So I guess ill add a bug report

Edit: There was one already, https://github.com/home-assistant/home-assistant/issues/17899

similar issue here:

solved by using:

homeassistent:
  customize:
    weather.home_owm:
      custom_ui_state_card: null

and

camera.*:
  custom_ui_state_card: null

Apparently the new HA and custom-ui break this for the weather and camera cards, so ‘nulling’ the custom-ui for these solves it.

see: https://github.com/home-assistant/home-assistant-polymer/issues/1991

I’m seeing that too, for camera and also media_player.
Although I’m starting to like the camera look (cleaner UI this way, detailed picture is just one click away), it’s a pain for the media_player.

If I follow the logic, this should work ?

media_player.*:
  custom_ui_state_card: null

But if I do that, I’ll lose all custom_ui enhancements ? (mostly using dynamic hidden based on a template)

yes, the media_player.* works, all cards showing fine again.

no, the null is only for the entity you set it to. If you do it in _glob for all camera’s it will disable for all camera’s but remain enabled for all else.
You can null it for a single entity also, in regular (non _glob) customize.

there still are a few glitches, but I don’t know if that has to do with customize though. When I click a camera for more info, in my Mac Safari browser the small blue question mark shows, and no larger camera image is displayed.

25

This is done correctly on the iPhone app though, and on Chrome.

1 Like

I am seeing that in Lovelace picture-entitycards: Was used to click on the image (a camera) and would pop up a bigger image, very convenient.

Now, after upgrading to 0.81, not anymore

Yes, I had time to try this out, and it works as expected.
“media_player.*” brings all media players back as normal AND they keep the dynamic hide feature from customizer/customUI

I’ve left the cameras as a small icon after all. No problem to view larger image when I click it. I’m using both direct MJPEG camera and zoneminder API, both work.

I had the same issue on Chrome using lovelace until I changed my camera cards like this (note the “tap_action: more-info”):

  - id: 406_east_display
    type: picture-entity
    title: East
    entity: camera.406_east
    camera_image: camera.406_east
    show_state: false
    tap_action: more-info

Then my “big picture” came back.

1 Like

You gave me an idea ! With customUI, I could set all the cameras to display as badge, using the same logic :

image

For each camera I have now the main information as badges on top of the group, and the actions below. (scripts are to change preset)

I probably could have done the same before the bug :roll_eyes:

now that would be a nice card to share the yaml of…:_) would you?

Sure, but I need to explain how it works, there are a lot of configuration files involved (I don’t use packages)

There’s no Lovelace here !

So I have several cameras, all of them have the same logic, I’ll give the yaml code for the one upstairs that I got the screenshot from :

  • I’ve been using zoneminder for years, so I integrated the existing configuration. That probably was my first HA component !
  • There’s one device tracker per camera, based on the arp table in my firewall. Tells me if it’s still there !
  • zoneminder gives two sensors and a switch per camera : sensor._events, the number of motion recorded and sensor._status that tells the way the camera works : monitoring, motion detection… and switch._state to force this camera to enter a status. I’ve choosen to use monitor and motion detection, as only 2 status are possible.
  • the image comes from 2 sources : the one created by zoneminder (named camera.) and I added a direct connection to the camera to show the image when zoneminder is off. I named the cameras with the same name as in zoneminder and adding “direct” : camera._direct
  • customUI is used to hide what’s not needed : the number of events if it’s not important, the “direct” camera if zoneminder is on, the zoneminder camera if it’s off…
  • scripts are calling a shell command, running zmcontrol.pl to move between presets. If works even when zoneminder is turned off, the great thing is that there is only one place to configure the camera’s commands.

Let’s start with the main configuration file (only relevant parts, I’ve added comments):

  customize: !include config/customize.yaml
  # all per-object customui in this file
  customize_glob:
    "*.*":
      custom_ui_state_card: state-card-custom-ui
    camera.*:
      state_card_mode: badges
    # actually, the only thing I added today to have cameras as badges. Easier to put it here to change all cameras at once, direct and zoneminder
  customizer:
  # customui configuration
    custom_ui: local
    hide_attributes:
      - custom_ui_state_card
    columns: 
      - 30
      - 700
      - 1500
      - 2100
  zoneminder:
  # way to access the zoneminder server
    host: !secret zm_host
    username: !secret zm_user
    password: !secret zm_pass

sensor.yaml: (exposes the event count and the status for each camera)
- platform: zoneminder

switch.yaml: (creates one switch per camera in zoneminder, to force the camera in motion detection or just monitoring)

- platform: zoneminder
  command_on: Modect 
  command_off: Monitor

camera.yaml:

- platform: zoneminder
  # the zoneminder cameras, names come from the zoneminder configuration
- platform: mjpeg
  # example of one camera for direct access
    mjpeg_url: http://192.168.7.14/videostream.cgi
    still_image_url: http://192.168.7.14/snapshot.cgi
    name: etage_direct
    username: !secret zm_user
    password: !secret zm_pass

customizer.yaml: The custom-ui options, I have this for each camera, mostly to display information as badges

  device_tracker.Cam_Etage:
    group:
      group.cam_etage:
        state_card_mode: badges
        friendly_name: Camera Etage
  sensor.etage_events:
    state_card_mode: badges
    friendly_name: Alarmes Etage
    templates:
      hidden: "return ((state === 'unknown') || (state <= 10));"
      # don't show the badge if the server isn't ready or of there are not many events
  sensor.etage_status:
    state_card_mode: badges
    templates:
      hidden: "return (entities['switch.zmmonitor'].state === 'off'); "
      # status of the camera shows only when zoneminder is running
  switch.etage_state:
    templates:
      hidden: "return (entities['switch.zmmonitor'].state === 'off'); "
  camera.etage:
    templates:
      hidden: "return (entities['switch.zmmonitor'].state === 'off'); "
  camera.etage_direct:
    templates:
      hidden: "return (entities['switch.zmmonitor'].state === 'on'); "
      # shown only if zoneminder is off : display the direct camera access instead of the zoneminder source

Last thing is to create a group for each camera, that has all items in the proper order. Note that this group doesn’t show, I add it to some other group to place it where needed :

  cam_etage:
    view: no
    name: Camera Etage
    control: hidden
    entities:
    - device_tracker.Cam_Etage
    - sensor.etage_events
    - sensor.etage_status
    - camera.etage
    - camera.etage_direct
    - switch.etage_state
    - script.ptz_escalier
    - script.ptz_chambre
    - script.ptz_pallier
    - script.ptz_bureau
    - script.ptz_chambres

Of course, if you don’t use zoneminder, there are not so many things to do !

1 Like

thx! have to digest this and keep for future reference (in the process of camera addition to the system…)

cool.

thanks that solved the issue

Good luck :wink:

Nah, just kidding. There are a lot of people here knowing a lot and willing to help.

If I may, I would recommend you to use zoneminder to integrate the cameras, not directly to HA.
I’ve been using ZM for a long time, and I was unhappy with it : minimal interface, rules and filters are limited. I wasn’t able to use it as I wanted, a video alarm system, that sends me a mail/notification when an unusual motion is detected.
BUT… then came HA. Interfacing ZM with HA let’s you benefit the integration ZM has of the cameras : PTZ for many kind of model, video stream, motion detection (that is great once you have tuned it). And over that, you build the automation to get the notification ZM isn’t able to provide.
For instance, I could build a “all motion” sensor that sums up the cameras events recorded, giving different weight to each camera (I don’t want an alarm if a cat cross the garden, but 10 cats are unlikely, and still, any motion in the dark basement is worth more). And HA notifies only when the increase of events isn’t normal, using the trend sensor over that.