AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
371 stars 37 forks source link

Everything works like a charm, except my security cameras. #28

Closed messinabr closed 1 year ago

messinabr commented 1 year ago

Everything works like a charm, except my security cameras.

When I go to the cameras, it shows my 3 cameras but with this error: Cant get URL for camera.namefomycamera

image

Any suggestions of what might be causing the problem:?

DigiLive commented 1 year ago

This library uses cards from WebRTC Camera which in turn makes use of go2rtc.

You should report your issue at https://github.com/AlexxIT/go2rtc/issues for support. I have this issue myself with NEST cameras, which apparently aren't supported (yet).

Alternatively, you can override the type of the card in the dashboard configuration to a type which does work. E.g.

strategy:
  type: custom:mushroom-strategy
  options:
    entity_config:
      - entity: camera.sala
        type: picture-entity

Please keep me informed.

AalianKhan commented 1 year ago

@DigiLive, do you think it is somehow possible to retrieve an error if the WebRTC card worked or not and react accordingly?

Also, since this issue has popped up a few times, I think should we consider using something like the picture entity card which will work every time? If someone wants to use WebRTC, they can use the entity_config.

DigiLive commented 1 year ago

@DigiLive, do you think it is somehow possible to retrieve an error if the WebRTC card worked or not and react accordingly?

I don't think so. Our code runs before the code of webRTC.

Also, since this issue has popped up a few times, I think should we consider using something like the picture entity card which will work every time? If someone wants to use WebRTC, they can use the entity_config.

I prefer using the the default hass card (picture entity) as well.

Also, the picture entity card has its limitations. E.g. An incompatibility between Firefox and Nest webRTC, it will also give an error. Works fine in other browsers, though.

cmerkle commented 1 year ago

I am having the same problem I have several Nest cameras and cannot get them to show up in the dashboard. I have added the following to my configuration per the above recommendation but it doesn't seem to change anything:

strategy:
  type: custom:mushroom-strategy
  options:
    entity_config:
      - entity: camera.living_room_camera
        type: picture-entity
      - entity: camera.front_yard_camera
        type: picture-entity
      - entity: camera.kitchen_camera
        type: picture-entity
      - entity: camera.backyard_camera
        type: picture-entity
      - entity: camera.garage_camera
        type: picture-entity
      - entity: camera.driveway_camera
        type: picture-entity
      - entity: camera.raspberrypi_logitech_c920
        type: picture-entity
      - entity: camera.raspberrypi_thumbnail
        type: picture-entity
views: []

image

DigiLive commented 1 year ago

The card type doesn't seem to be overridden.

Please try release 1.0.0-alpha.2 and update your configuration accordingly.

maslyankov commented 1 year ago

The card type doesn't seem to be overridden.

Please try release 1.0.0-alpha.2 and update your configuration accordingly.

I am currently using 1.0.0.-alpha.2 and the card overrides work except on the Mobile app.. (I am using iOS) On mobile and desktop browsers, the cards are changed appropriately. Also a must-have feature for this functionality I believe is the ability to set on which key the entity should be provided. Currently you can only use cards that get entity on key "entity_id".

Also, setting card by entity id is unnecessary work and repetition of config in most cases. It would be more useful to set cards by domain, ex: camera, climate, switch

PS: The webrtc default option for me has the same issues as the author of this Issue. I get "Can't get url for camera.xxx". They work fine using picture_entity and frigate card.