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

:tada:
With the regex-based filters and frencks fix these annoying errors on HA startup now can be hidden.

logger:
  default: info
  logs:
    custom_components.my_integration: critical
  filters:
    # Browser_mod startup errors
    homeassistant.components.websocket_api.http.connection:
      - "Error handling message: Unknown error"

Hi, Iā€™m trying to get a switch that I can turn on normally but if I turn it off it should show me a popup (so I canā€™t turn it off by accident) As I couldnā€™t find a way to do this in Lovelace because there is only a tap action and no turn_off or so. I thought I could do it with a template switch, but I donā€™t know if it is possible or how I have to use the fire-dom-event. Did someone already do this?
Thanks

Hi, I have a RPi4 4GB with touch screen hanging against my wall. I use this for my smart home dashboard. It displays a live camera feed, some sensors and other buttons all via HA. I want this dashboard to show a screensaver, preferably the local time (which I have a card configured for) after about 2 minutes of the last use. I canā€™t quite work it out since my last seen sensor attribute using browsermod keeps updating, does anyone have a solution?

Thnx in advance!

Hi there, how could I use browser_mod.popup at tap_action at a entity-filter in a vertical-stack?
IĀ“m looking for the ability to toggle / switch the ā€œDesktop PCā€ switch, after click / tap at the ā€œsensor.power_69ā€ entity.

cards:
  - entities:
      - entity: sensor.waschmaschine_leistung
        icon: 'mdi:washing-machine'
        name: Waschmaschine
      - entity: sensor.3ddrucker_leistung
        icon: 'mdi:desktop-classic'
        name: 3D Drucker
      - entity: sensor.power_69
        icon: 'mdi:desktop-classic'
        name: Desktop PC
    show_empty: false
    state_filter:
      - operator: '>'
        value: 10
    type: entity-filter
   ...
   ...
show_empty: false
title: Aktuell
type: vertical-stack

Hi Tomas, Iā€™ve got a question:

When I open a popup, it will always highlights the first icon on the popup:

When I turn on the title, the ā€˜highlightā€™ moves to the close button:

Is this something that might be fixable in the browser mod? Or should I fix this by making this color transparent in the theme (although Iā€™ll still have to figure out which haha)?

Hi,
I recently started setting my themes with automation according to the sun, dark or light.
However I also have separate dashboard for the wallpanel, which theme is set separately on view level, and not supposed to be changed by that automation.
This all works perfectly except one thing, the browser_mod popups are always uses the theme selected by automation and ignoring the view level theme on my wallpanel dashboard.

Is there any solution for that? Maybe there is a way to set a theme in URL or something?

Thanks in advance.

Is it possible to make a group/Area in HA and add browser media devices to this group and then use service: tts.google_say to send notifications to browser mod devices ?. I cannot get it to work

Has the ability to override the more-info popups via the popup_cards section broken, or is it just me?

I havenā€™t made any changes to this lovelace yaml recently, but all of my more-info cards defined this way now no longer work (e.g. after getting the hotspot indicator from long pressing and releasing, nothing happens). All more-info cards not overridden this way work fine.

Guess Iā€™ll log an issue. Thanks anyway.

Found my own problem. I had to update browser_mod.js manually.

Had a question and wondered if the device-specific capabilities of browser_mod could be the solution. Right now iā€™ve got a conditional card that uses an input select button to display a certain remote control. So Click the button, and its the family room remote, click another, and its the bedroom remote.

The issue is, If Iā€™m downstairs and my wife is upstairs, we end up going through a constant remote toggle as the state of that input select is global. Would it be possible to show two different states of the input select depending on the device using browser_mod?

Hello,
I am in the creation of a java card. I want to put a popup for the attributes. I manage to make it work manually how to integrate it into my java file.

My current configuration:

  1. In file java
    const buttons = {
        user1: {
            label: 'User1',
            icon: 'mdi:alpha-u-circle',
            service: 'browser_mod.command',
            service_data: {
                command: 'popup',
                title: 'Score User1',
            },
        },

In manual card:

buttons:
  user1:
    label: AurƩlien
    icon: 'mdi:alpha-a-circle'
    service_data:
      title: Score AurƩlien
      card:
        type: entities
        entities:
          - attribute: Water
            entity: bodymiscale.aurelien
            unit: '%'
            icon: 'file:water'
            name: Eau
            type: 'custom:multiple-entity-row'
          - attribute: Visceral fat
            entity: bodymiscale.aurelien
            icon: 'file:visceral_fat'
            name: Graisse viscƩrale
            type: 'custom:multiple-entity-row'

I would like the popup to automatically take the attributes here. (It works in the card.)

    const body = {
        water: {
            key: 'Water',
            label: 'Water: ',
            icon: 'file:water',
            unit: ' %',
        },
        visceral_fat: {
            key: 'Visceral fat',
            label: 'Visceral fat: ',
            icon: 'file:visceral_fat',
        },

Thank you for your help

I have a popup card that calls another custom card (a tv remote card) working perfectly in my chrome browser on my computer, but it doesnā€™t work on my iPhone or iPad through the HA app. On my phone/tablet I just get the normal ā€œmore infoā€ popup.

Iā€™m very new to this so Iā€™m not sure where to start in terms of troubleshooting. What am I missing or where do I have this incorrect?

Thanks!

popup_cards:
  media_player.living_room_roku:
    card:
      type: 'custom:roku-card'
      entity: media_player.living_room_roku
      tv: true
      theme: slate
    title: Living Room Remote

I canā€™t get this to work:

My picture-entity card configuration:

type: picture-entity
entity: camera.garage_preview
show_state: false
show_name: false
tap_action:
  action: call-service
  service: script.live_camera
  service_data:
    camera: garage
    deviceID: this
hold_action:
  action: more-info

The script:

live_camera:
  alias: Live Camera
  sequence:
    - service: script.camera_message
      data:
        payload: "tap action {{ camera | upper }}ON"
    - service: browser_mod.navigate
      data:
        navigation_path: "/lovelace/{{camera}}"
        deviceID: "{{ deviceID }}"
        # deviceID: screen_basement_gentoo
    - service: system_log.write
      data:
        level: info
        message: 'Live Camera Navigate: Path: (/lovelace/{{ camera }}) Device: ({{ deviceID }})'

The script executes successfully when I tap, the mqtt message is sent, but the browser_mod navigation fails. It does not seem to understand this. It works if I hard code a deviceID, but I need it to work on this.

Can someone offer a correction to my code?

THANKS!

1 Like

am I being thick? but can you send live feed from a camera to a chrome browser? Iā€™ve been trying but nothing appears to be working

Or is it not possible?

- alias: test1
  initial_state: 'true'
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d0004017ca2
      click_type: single
  action:
    - service: browser_mod.more_info
      data:
        entity_id: camera.back_garden
        deviceID:
          - b7a1d13e_e3a6ef36
          - f668db92_40f3e5a9

- alias: test2
  trigger:
  - platform: state
    entity_id: binary_sensor.front_door_motion
    to: 'on'
  action:
  - service: browser_mod.command
    data:
      command: more-info
      entity_id: camera.back_garden
      deviceID:
      - f668db92_40f3e5a9
  hide_entity: true
  initial_state: 'true'         

Cheers

Can Thomas or someone help me please? I have the briwser mod working, great mod by the way. I have the a browser media player running on an old laptop and I send tts notifications to it that are the announced via the speaker connected to it. Works awesomeā€¦but then it is as if the home assistant tab ā€˜times outā€™ (?), I donā€™t know as it stops working.

If I connect to the laptop with remote desktop and interact with home assistant tab in chrome and then send a notification, it starts working again.

Does it ā€˜timeoutā€™? How do I keep it alive without physically interacting with it? Ia yhere perhaps something else Iā€™m missing.

Will appreciate any suggestions, thanks!

I have been using browser mod for a long time and it is working great. The one thing I struggle with though is old browser sessions.

When I view Home Assistant from my iPad or iPhone for example I get a new device id each time. This is intended. Same for my desktop browsers, chrome etc. New device id each time. My problem is that these old device ids are cluttering up my Home Assistant and never go away.

Is there a way for me to have these automatically cleaned up after some time?

Thank you!

I have the exact same issue. The mod is working great but this doesnā€™t work.

Hi @millsx2 did you ever figure this out how to use browser_mod on a Google Hub? I want to have my Hub as a HA controller dashboard. A device id is created, toasts are displayed but almost all other things donā€™t seem to work.

I was stumped also and this post helped.

Basically, your tap_action needs to be:

          tap_action:
            action: fire-dom-event
            browser_mod:
              command: call-service
              service: script.live_camera
              service_data:
                deviceID: this

Give it a try.