🔹 Browser_mod - turn your browser into a controllable device, and a media_player

browser_mod.popup is a service so unless run using fire-dom-event you need to provide a Browser ID as backend needs to know where to direct it.

Two options:

  1. Provide a browser_id for browser_mod.popup in data. Also you will need to provide Dashboard url as a prefix to popup_card_id.
  2. (What I think you want) Use fire-dom-event method to make it a Browser call to run locally. See below.
  - type: button
    show_icon: false
    name: Settings
    tap_action:
      action: fire-dom-event
      browser_mod: 
        service: browser_mod.popup
        data:
          popup_card_id: games-room-fan-settings

EDIT: Doco Link

ok thanks, yep, that works. Thank you!

It would seem that those docs dont align with these then… or does that example only apply when using a service call / action?

Hi, just noted this in your code. FYI: This is decluttering card variable format.

I remember when I started with HA and that Google (these days AI) would lead me down strange paths that just would not work. Usually it was following some example where context was not fully documented.

Quick rule of thumb I use (others may have more):

  1. {{ 'home assistant core jinja template' }} {# jinja #}
  2. [[[ return 'usually button-card template' || 'button-card derived like honeycomb-menu'; //javascript ]]]
  3. '[[ i_am_a_decluttering_card_variable ]]' #quoted if on single line in yaml
1 Like

Good feedback. Thanks I can see where the documentation can be improved. `popup_card_id’ is new feature and would lead you to think it would just work the way you expect. However there is the need to work with the way Home Assistant services work, and that Browser popup service can work both ways. The doco should have both methods in that section.

EDIT: Documentation improvement request

1 Like

Hello everyone, I’ve been sitting in front of my PC for hours now trying to get Browser_Mod to work in Home Assistant.
What I’ve managed to do:
I can easily display a pop-up with text.

alias: 1 Test Stream Haustür Kamera
description: “”
triggers:

  • trigger: state
    entity_id:
    • input_boolean.testschalter
      from: “off”
      to: “on”
      conditions:
      actions:
  • action: browser_mod.popup
    metadata: {}
    data:
    dismissable: true
    autoclose: false
    title: Haustür
    size: normal
    timeout: 30000
    browser_id:
    - 7f8cef077f14d05e86ad643003a34618
    content: null
    type: picture-entity
    entities: camera.haustuer_cam_fliessend
    camera_view: live
    enabled: true
  • action: browser_mod.popup
    metadata: {}
    data:
    dismissable: true
    autoclose: false
    browser_id:
    - 7f8cef077f14d05e86ad643003a34618
    title: Haustür
    content: Test-Pop-up ist da!
    enabled: true
    mode: single

When streaming from a Reolink camera, no image appears, only the pop-up runs for 30 seconds. But no stream is displayed. The camera is integrated into Home Assistant and works.
Can anyone tell me what the problem is?
THX Reinhard

Hi. It’s likely a network/url issue of the media source stream, in that the resolved media url can’t be played by the Browser. If this is not working on your desktop, checking the browser console log will likely have an error to help you along. If it is a device that is not working, then you can try the Browser Mod media player for that device. If it fails, look at the media player device in states tab if Developer tools, look at the attributes to find the url that was attempted.

Usual issues here is that the Browser is using https to access Home Assistant, perhaps cloud, but the media is being streamed by http using local network URL. Another issue if both are http is that one is a named url and one an IP address, then being a CORS issue. All these sort of network issues can be first managed by checking your local and cloud URL in network settings. You can also set cors_allowed_origins under http in configuration.yaml if required.

I’m sorry, but I don’t understand. How can I narrow down the problem?

Read my post carefully. It describes steps to take to work out your issue.

Hi,

Thanks for your help and pointing me to the right direction. It took couple of days, to check and learn what you’ve suggested.

I revised my dashboards and now using button-card templates massively. thanks a lot!