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

By the way, just because @thomasloven hasnā€™t merged any PRs lately, I tweaked a few stuff and added some PR changes:


Not a replacement, just a filler until browser-mod gets updated. Add as a custom HACS repo to use.
- id: Trigger_after_5_min_of_inactivity
  trigger:
  - platform: template
    value_template: '{% if (as_timestamp(now())-as_timestamp(states.light.e37f5f55_9be1ddf3.attributes.last_seen)) > 300 %}true{% endif %}'
1 Like

Hi,
Does anyone know how to get a full width popup? I want to display a full screen clock after some inactivity. Cant get the popup to cover the whole screenā€¦

It wonā€™t cover the full screen, but you can try

large: true
2 Likes

Hi, I already installed the promising component. Looks good like all the others from Thomas.
But even I see my devices with sensor, light and media player, it is not possible to play a sound on any device. Neither the speech test nor the sound is working.
The best is: testing my mobile with a speech test, on my mobile a popup appears with the message that connection to HA is not possible, even my App is already connected.
Did I miss something?

New case: on another device (Galaxy S6 ) I got a certificate error with the option to continue. Nothing else happens

Ok: Now I found out, that even it is an android device, with the app wallpanel one have to klick one time on the screen, then everythings working.
With the companion app, I still got a HA connection message with the options got to settings, refresh or wait.

PS2: Ok. I figured out, that the connection popup only appears, when the media player is tested via states list. Playing a sound via automation works. So everything is fine :slight_smile:

Is it still possible to define the window to specific size using style LARGE: TRUE is too bigā€¦ Any suggestions?

Hi, I just started to use browser_mod. I am trying to display popup using script. But popup is not displaying with following in the script.

deviceID : ""{{ deviceID }}"

But popup window displays and script works correctly when I use following in the script

       deviceID: 
          - 1cd0f936-1e4ff60c

Please suggest if any changes are required in my code.

Below find whole piece of code
ui-lovelace.yaml

type: horizontal-stack
cards:
    - type: custom:button-card
      entity: light.dining_room
      tap_action: 
         action: call-service
         service: script.test_popup_room_scene
         service_data:
            title: 'Test 1 PopUp using script'
            deviceID:
               - this
            group_name: Dining Room
      #hold_action:
      #double_tap_action: 
    - type: custom:button-card
      entity: light.lounge_room
      tap_action: 
         action: call-service
         service: script.test_popup_room_scene
         service_data:
            title: 'Test 1 PopUp using script'
            deviceID:
               - this
            group_name: Lounge Room
      #hold_action:
      #double_tap_action: 

script.test_popup_room_scene

test_popup_room_scene: 
    #alias: Popup Scene Card
    sequence:
      - service: browser_mod.popup
        data_template:
           deviceID: #"{{ deviceID }}"
              - 1cd0f936-1e4ff60c
           title: "{{ title }}"
           group_name: "{{ group_name }}"
           card: !include ../lovelace/views/home/12_scenes.yaml

ā€¦/lovelace/views/home/12_scenes.yaml

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
       - type: picture
         image: /local/images/philips/relax_ball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Relax
         #hold_action:
         #double_tap_action:
       - type: picture
         image: /local/images/philips/reading_ball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Read
         #hold_action:
         #double_tap_action:
       - type: picture
         image: /local/images/philips/concentrate_ball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Concentrate
         #hold_action:
         #double_tap_action:
  - type: horizontal-stack
    cards:
       - type: picture
         image: /local/images/philips/energize_ball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Energize
         #hold_action:
         #double_tap_action:
       - type: picture
         image: /local/images/philips/brightball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Bright
         #hold_action:
         #double_tap_action:
       - type: picture
         image: /local/images/philips/dimmedball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Dimmed
         #hold_action:
         #double_tap_action:
       - type: picture
         image: /local/images/philips/nightball_thumb.webp
         tap_action:
            action: call-service
            service: hue.hue_activate_scene
            service_data:
              group_name: "{{ group_name }}"
              scene_name : Nightlight
         #hold_action:
         #double_tap_action:

        

Not everything in Home Assistant supports templating. Try "this".

Hi, how shall a script know, who ā€œthisā€ is?
Launching pop-ups does not work in scripts or automations.
It doesnā€™t work, even if you launch the script via front end.
In a script, you havto know exactly, where you want to launch the pop-up and set the device ID explicitly or you do it everywhere.
Thatā€™s my understanding of the architecture.
I placed a feature request for that.

EDIT: I saw the docs, this should work, I donā€™t know whyā€¦

I am using browser_mod in a similar way as example given in cookbook.

@RAUS also trying the same way as in the cookbook not working for me eitherā€¦

Does not work for me as well.

I have read in many places that Browser_mod is compatible with Fully Kiosk. Unfortunately I prefer WallPanel instead as it is much simpler and is free. It seems it is at least partially compatible with Browser_mod (I can turn the browser screen off via the ā€œlightā€ entity), but I canā€™t get it to play audio (via tts or otherwise) from the media player. Has anyone gotten this functionality working with WallPanel? It seems like itā€™s just displaying the browser window in android webview, which is, I think, what Fully Kiosk also does.

Is your audio turned up? Also it might be auto-blocking audio that wasnā€™t initiated by a gesture.

Thanks for the reply! If I open a regular browser and point to my HA URL, I can use that new device to send audio without changing any settings. Volume is turned up. I have also tested with Fully Kiosk on the same tablet, and it also works fine. It is an Amazon Fire 7" tablet if that helps at all.

Do you see any errors in the log?

hmmā€¦ I checked, but maybe Iā€™m not sure where to check for the log. Iā€™m fairly new to all of this.

Config > Logs (https://yourhomeassistant.duckdns.org/config/logs)

Nothing in there regarding browser_mod, media playing, or anything else that looks related. :-/