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

Hi, Iā€™m pretty new with HA and Iā€™m a little lost with this, I saw in the git repository there is a reference to HACS, so I went to HACS and tried to install browser_mod but I canā€™t find it.
When I try to add the custom repository it says it already exists. Im in HA 2021.5.5, ican you help me out confirming if the only way to install it is doing it manually ?

Itā€™s an integration.

Hi everyone,
deviceID: - this is not working for me,
I use Home Assistant 2021.6.6, browser_mod 1.4.0
please help me, I canā€™t config to show popup for only one current device (browser, mobile, ā€¦) I donā€™t want to show popup for all device.
If this is not possible, how I can get current deviceID like localStorage["lovelace-player-device-id"] and Iā€™ll insert into config like this

    deviceID:
      - d2fc860c-16379d23

pls see this video

sorry, Iā€™m beginer
thanks

type: custom:button-card
layout: icon_state
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    close_on_all: true
    deviceID:
      - this
    title: Hello
    card:
      type: markdown
      content: |
        Hello
entity: switch.eb84d158e1e2be906fhudl
state:
  - value: 'on'
    icon: mdi:lightbulb
  - value: 'off'
    icon: mdi:lightbulb-off-outline
styles:
  card:
    - width: 100px
    - height: 100px
    - background-color: rgba(200,200,200,0.1)
  icon:
    - width: 50px
    - height: 50px
    - color: '#F0F0F0'
  state:
    - font-size: 10px
show_state: true

You havenā€™t done much research, do you? (even few posts above yours)

This is what works for me:

tap_action:
  action: fire-dom-event
  browser_mod:
    command: call-service
    service: browser_mod.popup
    service_data:
      card:
        entity: alarm_control_panel.kvm_sec
        states:
          - arm_away
          - arm_home
        type: alarm-panel
        name: KVM
      deviceID:
        - this
      title: Security
1 Like

Hi @Nath,
Yes Iā€™m beginer, I just studied for 2 weeks
Thank you so much
I replace action call-service by fire-dom-event, now it worked :smiling_face_with_three_hearts:

Sure thing, we all have been there but that doesnā€™t mean you canā€™t search a bitā€¦ :wink:

Iā€™m glad it works for you!

1 Like

Hello, guys!
I try to make media player work on my PC , but i get no sound no matter what i do. I get stuck even at very beginning: in developer tools i find media_player ā€¦ with my ID (which is definitely correct one, selected with debug service), then i select ā€œinfoā€ and enter some ā€œtext-to-speechā€ data ā†’ thereā€™s silence, although it says ā€œplayingā€ However, that "playing never stops. No errors (that i can seeā€¦).
This is happening on 3 different PCā€™s and also on my Samsung S8 android phone, so it must be some funky setting. Volume is all the way up, other sounds work perfect.

Same happens on main HA installation and as well as in my test installation.

Interesting thing is: in developer tools when i enter text-to-speech a link to that ā€œtranslatedā€ mp3 shows up (media_content_id). If i copy/paste that link into browser IT PLAYS translated textā€¦
I also tried to install media player exactly as BearderTinker explained it his youtube video, but i get only silenceā€¦

Any clues what iā€™m doing wrong? What i forgot? I did extensive search already, but it seems that no-one has this problem but meā€¦

EDIT: i managed to play sound on my android tablet and also on my phone with using fully kiosk. So it must be some setting in chrome browser on PCā€¦ but which oneā€¦?

Greetings.
Iā€™ve been trying to build an automation which simply navigates to another tab when the trigger occurs.
Iā€™m using browser mod in order to the change to only occur in the device Iā€™m currently using.

my yaml looks like this:

automation: 
  - alias: "navigate to other place" 
    trigger:
      - platform: state
        entity_id: input_boolean.sneaky_slider
        to: 'on'
    action:
      - service: browser_mod.navigate
        data_template:
          navigation_path: /dashboard-guest/main_menu
          deviceID: 
            - this

With the current code, nothing happends. However, if I remove

 deviceID: 
   - this

The automation causes every device I have to navigate to the path. My question is if is is possible to setup an automation in which only the device Iā€™m using is affected. I saw there were some breaking changes a while ago but I could not find any example with automations

Why donā€™t you just use navigate service call inside a button, instead of an automation?

The real automation is more complex from what I posted. Indeed on option would be to call both my automation and the navigate command in a button

I am looking to do something similar and instead of using ā€œ- thisā€ I used the actual device id of the device I want it to change on and it seemed to work.

Did someone figured that out? I was not able to at least find an example here or on the browser_mod_page.

service: tts.cloud_say
data:
  entity_id: media_player.browser_mod_b0049a37_88f50229
  message: Hello

Most probably it is straight forward to other examples, but I didnā€™t get this. How to e.g. call the service above with/on the current device browser_mod media_player?

Are you trying on PC? If so, i couldnā€™t get sound to work on my PCā€™s either. It works on tablet and phone, but in none of my PCā€™s. I didnā€™t explore much, but i think it has something to do with googleā€™s chromecastā€¦

Was this an answer to my post?

It is working here on every device, if I address it with an absolut entity. My questions is: How tts only in the current device. A kind of

service: tts.cloud_say
data:
  entity_id: media_player.browser_mod_<currenct_deviceID>
  message: Hello

I am new to HA and came across browser_mod. Basic questions, does Browser_mod control the browser only when logged in to HA and the tab has focus? Also, does Browser_mod work with the IOS app or only the browser app. Same question about ios app, does the iphone need to be unlocked with screen on and ios app having focus?

Every time I open a new browser I get a new deviceID. Is this normal?

Can I leverage the config to make this static and not create new ones?

Hi i created an automation that as soon as doorbell is pressed, i get a tts on my google home hub + a picture of it, but i want it also to show the picturen on my tablet as well (running fully kiosk browser)

This is the automation


- id: 'Deurbel_gedrukt'
  alias: Deurbel gedrukt
  description: 'Verwittiging iemand aan de voordeur'
  trigger:
    - entity_id: binary_sensor.deurbel_ringing_sensor
      platform: state
      to: 'True'
  action:
    - service: tts.google_translate_say
      entity_id: media_player.keuken
      data:
        message: "Er staat iemand aan de voordeur!"
        language: nl
    - delay: "00:00:08"
    - service: camera.snapshot
      data_template:
        entity_id: camera.deurbel
        filename: "www/tmp/deurbel_snapshot.jpg"
    - delay: '00:00:01'
    - service: media_player.play_media
      data:
        entity_id: media_player.keuken
        media_content_type: "image/jpg"
        media_content_id: !secret image_url_deurbel_snapshot
    - service: browser_mod.popup
      data:
        title: Voordeur
        card:
          type: picture-entity_id
          entity: camera.deurbel
          url: !secret image_url_deurbel_snapshot
        deviceID:
          - 41b5a475-fe0bd9fc
    - delay: "00:02:00"
    - service: media_player.turn_off
      entity_id:
        - media_player.keuken  

The automation works , but not for the part of the tablet

Any ideas?

Here is an idea that may be usefulā€¦
For my tablet running FKB, I use the following, which shows a live video feed instead of a still image:

      - service: browser_mod.more_info
        data:
          entity_id: camera.YOUR_CAMERA_ID
          deviceID:
            - YOUR_BROWSERMOD_DEVICE_ID_OR_ALIAS #Alias is case sensitive

In this example, a Home Assistant popup window with a live video feed shows up.

1 Like

Hi,
I have the exact same issue you are reporting and already wrote about it in this thread in #1150

I did not test it with FK Browser, but any other Browser (Firefox, iOS App) which worked before Update to 2021.06 are not working anymoreā€¦ Unable to send tts.cloud_sayā€¦ But, media_player.play_media works, when putting the correct link to mp3. (If local, with IP address, if remote, with nabu-casa link). I have also checked that I have the correct values in Internal&Externall Address in HASS Settings.

My tablets stop working after every time I restart Home Assistant. To get them working I have to reboot the tablet then push on a few buttons on screen. After this procedure the tablet start talking again. I guess they get disconnected in some way. Worth trying to see if this resolves it for you.