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

where is the dom under developer-tools?

without the . it dont work

The DOM is the tree in Elements.

And there you have to look, where to apply. The one is inside shadow root, the other is directly adjustable.

image

    style: 
      .: |
        app-toolbar {
          color:red !important;
          background-color: blue !important;
        }
      $: |
        .mdc-dialog {
          backdrop-filter: blur(1px) grayscale(50%) !important;
          background: rgba(0,0,0,0.5);
        }

BTW Are you sure, that you backdrop-filter is working without !important if you assign the really there? Here it is working only with.

3 Likes

thank you for explaining, now i can work with other classes and problems.

yes here is my code for blur, this works well.

style:
              $: |
                .mdc-dialog .mdc-dialog__container{
                  width: 100%;
                  height: 100%;
                  backdrop-filter: blur(17px);
                  background: rgba(0,0,0,0.2);
                  -webkit-backdrop-filter: blur(17px);
                }

hi,

i have a question about browser mod,
iā€™m trying to pop up a card on a single device, not on all my decices like i have now,

is there anyway to do this?

deviceID: this
is not working

anyone?

Try something like this, just tested and working to bring popup up on only device it was clicked.

cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: fire-dom-event
          browser_mod:
            command: call-service
            service: browser_mod.popup
            service_data:
              deviceID: this
              title: Choose Your Light!
              card:
                type: entities
                entities:
                  - light.office_lamp
                  - light.office_ceiling_light
                  - light.living_room_lights

1 Like

Is it possible to ā€œpopupā€ a grid card, with multiple cards inside the grid? Either itā€™s not possible or Iā€™ve completely messed up the YAMLā€¦

It is possible.

I have problem with pop-up
Doesnt cower the gole screen on a tablet


hi, someone knows whats wrong with this code? i donĀ“t get a popup.

type: custom:button-card
entity: climate.all
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    card:
      type: custom:button.card
      entity: climate.all

Fist: Try it with a set title (like here) Second: button.card is wrong.

damn typo, thanks :smiley:
doesnĀ“t work for me tho.
what i got right now:

type: custom:button-card
entity: climate.all
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: test
    card:
      type: custom:button-card
      entity: light.bad

And what is happening? No popup? Empty popup? And did you install browser_mod? And is it working outside this problem? Your new yaml is working here 1:1

doesnĀ“t do anything.
browser_mod is installed using HACS and i added browser_mod: to my configuration.yaml and restarted.

edit: popups also donĀ“t work with the pre-done UI-Lovelace-Minimalist light popup card. so i guess there is something wrong with my browser_mod setup.
Reinstalled it and made sure to have browser_mod: in my configuration.yaml. This didnĀ“t fix the problem tho

edit2: navigation also doesnĀ“t work. figured i get this error message, maybe helps finding the problem

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:601
First occurred: 22:39:23 (6 occurrences)
Last logged: 22:40:20

Entity light.browser_mod_b6d9daad_a0a33413 (<class 'custom_components.browser_mod.light.BrowserModLight'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.browser_mod_b6d9daad_a0a33413 (<class 'custom_components.browser_mod.sensor.BrowserModSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity media_player.8ea4f635_3a8a216b (<class 'custom_components.browser_mod.media_player.BrowserModPlayer'>) implements device_state_attributes. Please report it to the custom component author.
Entity light.8ea4f635_3a8a216b (<class 'custom_components.browser_mod.light.BrowserModLight'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.8ea4f635_3a8a216b (<class 'custom_components.browser_mod.sensor.BrowserModSensor'>) implements device_state_attributes. Please report it to the custom component author.

Is there any way around having to refresh browsers on devices that are being controlled/monitored via Browser_mod after restarting HA?

Every time HA is rebooted, all devices through browser_mod become unavailable until each instance is refreshed.

Seems not - I ended up creating an automation that did it for me.

thanks for the reply I thought about this but after the reboot HA canā€™t ā€˜seeā€™ the devices to then run the automation through browser_mod to refresh?

Are you refreshing them via a different method?

My method assumes you have fully licensed Fully Kiosk Browser set up on each device.

I have a rest command set up, which exploits FKBā€™s device management feature via its REST API - this way I can try refreshing the device first (passing the ā€œtriggerMotionā€ command), and then if that doesnā€™t make the device available (using a wait timeout in the script), I reload Home Assistant on the device by sending a ā€œloadStartUrlā€ command. I normally use the deviceā€™s media player entity to test its overall availability.

Itā€™s not 100% foolproof, as occasionally I find the FKB app seems to have lost focus on the device, and is unresponsive to any rest commands, but it works for the vast majority of the time.

By the way, I followed this guide for creating the rest commands - highly recommended.

Hope this is helpful - I can share my startup script if you like, but it may be a bit too tailored to my scenario to be of much use.

FURTHER EDIT: I guess this only applies to Android devices, so apologies if this is all irrelevant to your case

Hi Chris!
Since i have the same problem and iā€™m total newbie in rest api, i wonder if you can share your ā€œload start urlā€ setting? I created service for rest command with appropriate url, but running this service doesnā€™t reload page. My rest command:

rest_command:
  kiosk_reload_url:
  url: !secret rest_url_kiosk_reload

this ā€œsecret urlā€ does reload page if run in web browser, but running rest service in HA does NOTā€¦
What am i missing?

EDIT: yipiii, it works! I found out that my problem was too complex password - iā€™ve had equal sign in my password. Is it any way to enter that kind of password, say ā€œmyname=doggyā€ ? That ā€œ=ā€ sign causes problems in rest urlā€¦

Glad you got it to work - let me know if it also helps solve the wider issue of device unavailability.

On the password issue, you might need to URL escape the ā€˜=ā€™ sign. In this case, itā€™s a reserved character which for FKB means ā€˜what follows is a parameter I need to act onā€™

Well, i tried a few options for password, including 'and " ā€¦ nothing worked, so i changed password to ā€œallowedā€ oneā€¦
I need this auto-page-reload because i have two tablets on my walls (one in 1st floor, one in 2nd floor) and i have speech set-up. After HA restart speech doesnā€™t since browser mod is not available. I have also set up automation which auto-reloads page after lovelace cards change, and this also doesnā€™t work without page refresh after restart.