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

Here is one wayā€¦Take a look at the debug command. Execute it anywhere but then go to the browser/device of interest and see what shows up.

I am fairly new to HA so when you say ā€œexecute it anywhereā€, that would probably be obvious to most HA users but I tried to use the Call Service function in Developer Tools like this:

http://imgur.com/a/A671pnU but nothng showed up.

To clarify, I was trying to answer your last question.

Try the debug command without a deviceID

If you mean, do what I did above (see image), without any data, That too does nothing.

I have finally gotten browser_mod to work, at least in so far as seeing the device in the Developer Tools states list and being able to control it. I can see the browser (Chrome) that I am logged in with on the MacMini running HA. However, from IOS devices (iPhone or iPad) I cannot seem to play a sound using the media_player when the browser is logged in to HA, only when I use the ios HA app. Is this the expected behavior?

This is an old query but no one ever answered you and I was working on this so hereā€™s what I worked out. I was trying to use last_seen but because itā€™s an attribute of the sensor created by browser mod it becomes unavailable as soon as my iPad kiosk sleeps and the related template becomes invalid. last_updated, however, is still accessible when the sensor is unavailable.
Sensor:

  - platform: template
    scan_interval: 10
    sensors:
      kiosk_last_updated:
        friendly_name: "seconds ago kiosk was last updated"
        value_template: "{{ (as_timestamp(now()) - as_timestamp(states.sensor.bm_ca_kiosk_ipp.last_updated)) | int() }}"
        unit_of_measurement: 'sec'

Automation:

- id: 'id 30.2'
  alias: "kiosk revert to home"
  trigger:
    - platform: state
      entity_id: binary_sensor.hue_motion_sensor_2_motion
      to: "on"
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: |
          {{ states("sensor.kiosk_last_updated") | int() > 300 }}
      - condition: or
        conditions:
          - condition: time
            after: '17:00:00'
            before: '09:25:00'
            weekday: 
              - mon
              - tue
              - wed
              - thu
              - fri
          - condition: time
            weekday:
              - sat
              - sun
  action:
    - delay: "00:00:02"
    - service: browser_mod.navigate
      data:
        navigation_path: /kiosk-yaml/0
        deviceID:
          - 67796da9-c098a881
          - bm_ca_kiosk_ipp

I have the time conditions in there because during market hours a second automation sends the kiosk to my stocks page. As a PSA, Iā€™m using this brilliant trick to wake the iPad into guided access mode based on a Hue motion sensor (which I donā€™t think browser mod can do).

1 Like

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.