šŸ”¹ Browser_mod - turn your browser into a controllable device, and a media_player

Does browser_mod work with the IOS companion app or only the browser app? Also, does the iphone need to be unlocked with screen on and ios app having focus for a sound to be played?

Hello,

I have google speakers around house on which I can cast internet radio stations via URL and they all play without any issues.

image

When looking for a solution how to play this radios inside the home assistant tab in browser I found this addon. When trying to play online radio station from url (http://nrj.de/rock) to media_player.alias_id nothing is beeing played, but under states it says it is playing.

I can see an error under browser console:

Playing such streams is not possible or I am doing something wrong?

Thank you.

bome da
muči te browser, u biti radio, meni je ovo pomoglo

Hi, Most possible a simple answer, however I have been looking through this thread and can not finde anything, and I can not get it to work form the documentation.

I use the browser_mod.more-info with this code, and it works perfectly for me. The reason for the entiti_id is beeing part of a declutteringcard. Works perfectly.

However, it opens on all browsers, and I would like it to only open on active screen where the tap_action is started.

I have looked all over, however not able to figure it out. There is a lot of examples like this, however not working for me. Anyone have a good working example
image

@doktordoc : Iā€™ve done exactly like bearder tinker on that video. Doesnā€™t work on browsers. Works on tablets, and i guess that it works on add-on speakers, too. But not in browser (on PCā€™s soundcard).

Iā€™ve tried so many combinations and changes, my head has exploded. Can anyone suggest what I am doing wrong?

          - type: glance
            entities: 
            - entity: switch.fanpower
              name: Dyson Fan
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
#                  title: Dyson Fan Controls
                  card: 
                  - type: horizontal-stack
                    cards:
                    entities:
                    - entity: switch.fanpower
                      tap_action:
                        action: toggle
                    - entity: switch.master_bedroom_auto_mode
                      tap_action:
                        action: toggle
                    - entity: switch.master_bedroom_night_mode
                      name: Night
                      tap_action:
                        action: toggle
                    - entity: switch.oscillation
                      tap_action:
                        action: toggle

HI All,

IS there a way to config the browser_mod integration to stop register new browsers?
I have 2 in useā€¦ (FKB and my iMac) on my work IP address is changing all the time so I get many new entities. I will stop this. I tried disable ā€œEnable newly added entitiesā€ but didnā€™t work.

Ya, I facing this too. I cannot get the popup work. Hope some one can find out.

From what I know you have to have a title line. Yours is commented out. Here is how mine looks,

    tap_action:
      action: fire-dom-event
      browser_mod:
        command: popup
        title:  []
        card:
          type: "custom:vertical-stack-in-card"
          cards:
1 Like

Yes, same here.

tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: Wecker
    card:
      type: entities
``
1 Like

Thanks, looks like you are right and the title is required. Thank you!

Just double-checked again. In both cases

tap_action:
  action: fire-dom-event
  browser_mod:
    command: call-service
    service: browser_mod.popup
    service_data:
      deviceID: this
      title: Wecker
      card:
        type: entities

	
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: Wecker
    card:
      type: entities

you are right and it is only working with title here as well.

I have a question regarding browser_mod integration because Iā€™m facing out an annoying situation.

Each time I reset my browser cache with cookies (which often happens with Home Assistant troubleshooting :slight_smile: ), it creates a new device when I log back with the same browser.

After a time, I get a huge list of unavailable devices.
image
in the above screenshot, I have 12 devices (cache cleared two days ago, Iast time I got until >50 devices), while only 3 browsers still exist.

I can remove manually the entities from the ā€œentities panelā€, but I donā€™t find a way to remove devices easily.

How do people deal with that? By my side, the only solution I found for the moment is to delete the integration and re-add it.

Thanks for your feedback.

I think the trick lies in disabling.

I originally had your same problem until I did this.

Thanks again @rmertz3282 & @arganto, I have it working again finally :slight_smile:

If you are interested @kazihaha , below is my working card config, if you compare it to my previously posted one above:

          - type: glance
            entities: 
            - entity: switch.fanpower
              name: Dyson Fan
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  title: 'Dyson Fan Controls'
                  card: 
                      type: glance
                      entities:
                      - entity: switch.fanpower
                        name: Power
                        tap_action:
                          action: toggle
                      - entity: switch.master_bedroom_auto_mode
                        name: Mode
                        tap_action:
                          action: toggle
                      - entity: switch.master_bedroom_night_mode
                        name: Night
                        tap_action:
                          action: toggle
                      - entity: switch.oscillation
                        name: Oscillation
                        tap_action:
                          action: toggle

I think the trick lies in disabling.

I originally had your same problem until I did this.

Thanks for your answer.

This only disables all entities related to devices (available or unavailable), but devices are still there.

If the devices are unavailable (and for sure it will never be back in the future), Iā€™m not able to delete them without removing the integrationā€¦ thatā€™s my concern.

As browser_mod is probably based on a cookie that is related to the session context, the behavior seems correct: when clearing the entire cache, it will delete the ID related to the device and create a new one when the browser reconnects the next time because it is considered as a new device.

But I would like to clean up the mess without having to remove and re-add the integration.

By looking at the community feed I finally found an old thread that cover this problem : Delete individual device (and entity) from integration - #55 by SnoWake

This is apparently not only related to browser_mod.

Hi all,
A question.
Is it possible to make a button when i click on it, i get a popup showing the new energy dashboard or the media browser (with other button) inside the popup?
Iā€™m not sure how.

Use iframe (web) card inside the popup and put your energy dashboard or media browser address as URL.

1 Like

Why didnt i think of that myself lol
Great will do that :slight_smile:

Iā€™m having issues with this card. I have the following in my config.yaml:

browser_mod:
  prefix: "browser_"
  devices:
    a1521498_ea1ae31b:
      name: mbp_13_safari
      disable:
        - light
        - media_player
    218f8982_b93c0162:
      name: master_tablet_fully
      disable: 
        - media_player
      enable:
        - camera
        - binary_sensor
        - sensor
        - light
  disable:
    - all

However, in Developer Tools/States, I only see entities with the browser mod ID (i.e. 218f8982_b93c0162) and only camera and media_player with no sensor.

My goal is to manage charging based on the battery of my tablet (Fire HD 10) running Fully Kiosk, so maybe thereā€™s another way thatā€™s a bit simpler. Very curious what Iā€™m missing here.

Thank you!