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

hi,

I updated last night to 0.108.9 and have the last version of browser-mod installed. The following code works occasionally. Sometimes the popup works great and get my alarm control panel and sometimes i get the error below. I have the same problem on all my devices and in the android app. What I realize is when i reset the cache from the browser the plugin works again but after a while I have the problem reappears.

What my be the solution for this?

home_popup:
  sequence:
  - service: browser_mod.popup
    data_template:
      deviceID: '{{ deviceID }}'
      title: Set Alarm to home
      card:
        type: alarm-panel
        states:
        - arm_night
        - arm_away
        entity: alarm_control_panel.alarm
        name: Alarm

Currently I do not have the paid Pro version of Fully, I will look to see if I can find what all I need in the paid version to accomplish the media player to work with the Fire 8 tablet and then purchase the license for those items. Thanks again

I might also reset my fire tablet, maybe there is some setting in the fire os that is stopping this from working.

Hi Thomas,

as of late I have encountered my iPhone browser_mod Id changed, quite a few times I must admit. No first world problem, but still, relying on messaging to my phone, Ive found myself investigating the notifying setup, while in the end I had to conclude the id had changed againā€¦

Only way out of that is editing the section in configuration.yaml, and do a restart. (at least as far as I know)

wouldnā€™t it be possible to add a service browser_mod.reload of sorts, so we can edit the config file, click reload and be done with it?

would be a stop-gap, but still, it would make it somewhat easier to manage.
thanks for having a look!

Good job!
Iā€™m having a problem with browser_mod.popup!
I basically created 3 dashboards. One for the 10-inch tablet, one for the 7-inch tablet and one for the smartphone.
All three have the browser_mod.popup for certain entities.
And I see them like this:

This is for both the 7-inch tablet and the 10-inch tablet:

This is the smartphone:

Why donā€™t I see it like this?

The last photo I managed to get it through google chrome with the inspection (key F12)!
This is the code where I inserted the popup:

  - entity: alarm_control_panel.home_alarm
    tap_action:
      action: call-service
      service: browser_mod.popup
      service_data:
        card:
          entity: alarm_control_panel.home_alarm
          name: Allarme
          states:
            - arm_home
            - arm_away
          type: alarm-panel
        deviceID:
          - this
        style:
          '--ha-card-border-radius': 0vw 0vw 0.8vw 0.8vw
          border-radius: 0.8vw
          opacity: 0.9
        title: ALLARME
    icon: 'mdi:security'
    type: state-icon

Even if I change - this with the deviceID it doesnā€™t solve!
In the configuration.yaml I have this:

browser_mod:
  devices::
    9xxxxxxx-xxxxxxx3:
      name: PC_Desktop
    6xxxxxxx-xxxxxxx1:
      name: tablet_lenovo
    4xxxxxxx-xxxxxxxxc:
      name: Tablet
    bxxxxxxx-xxxxxxxxc:
      name: Smartphone

Why do I see it like this?
Thanks so much

The popups use the more-info dialog. On devices where that is displayed at full screen width, the popup will be too.

Thanks so much for the quick reply!
But I did not understand, what do I have to correct to get the result of the photo on the devices?

Thanks

Thanks for a great plugin @thomasloven!

I am using browser_mod to play a doorbell sound and pop up a live video feed of my Doorbird intercom on 4 control tablets scattered throughout the house .

Thereā€™s a small problem with the doorbell MP3 though. It plays on doorbell trigger with no issues. However, next time I touch the tablet (could be 30 minutes later), it plays the doorbell ring again! Happens consistently on 4 devices, each with the same config, everytime.

HA is running browser_mod in Fully Kiosk on Lenovo tablets. Hereā€™s the core doorbell script. TIA!

doorbell_ring:
 sequence:
#    - service: browser_mod.no_blackout
#      data:
#        brightness: 200
#        deviceID:
#          - kitchen_tablet
#          - corridor_tablet
#          - entrance_tablet
#          - upstairs_tablet
   - service: media_player.volume_set
     data:
       entity_id:
         - media_player.kitchen_tablet
         - media_player.entrance_tablet
#          - media_player.corridor_tablet
         - media_player.upstairs_tablet
       volume_level: '0.60'
   - service: media_player.play_media
     data:
       entity_id:
         - media_player.kitchen_tablet
         - media_player.entrance_tablet
#          - media_player.corridor_tablet
         - media_player.upstairs_tablet
       media_content_id: "/local/Doorbell-chimes-melody.mp3"
       media_content_type: "music"
   - service: browser_mod.popup
     data:
       title: Someone's at the gate...
       large: true
#        auto_close: true
       card:
         type: picture-glance
         title: Front gate
         entities:
           -  switch.front_gate_intercom_relay_1
           -  cover.aeon_labs_zw062_garage_door_controller_barrier_state_label
           -  script.car_gate_toggle
         tap_action:
           action: call-service
           service: switch.turn_on
           service_data:
             entity_id: switch.front_gate_intercom_relay_1
         hold_action:
           action: url
           url_path: intent:#Intent;launchFlags=0x10000000;component=com.doorbird.doorbird/de.thousandeyes.intercomlib.activities.MainContainerActivity;end
#            action: call-service
#            service: script.doorbell_ring_open_doorbird
         camera_image: camera.front_gate_intercom_live
         camera_view: live
       deviceID:
         - kitchen_tablet
         - corridor_tablet
         - entrance_tablet
         - upstairs_tablet
1 Like

Hi,

How did you solve this?
I have the same problem.
Here is my code.

```
  • entity: binary_sensor.motion_terrace
    tap_action:
    action: call-service
    service: browser_mod.popup
    service_data:
    card:
    entity: alarm_control_panel.ha_alarm
    states:
    - arm_away
    type: alarm-panel
    deviceID:
    - this
    title: Alarm
    ```
    Thanks.

I have the same problem with alarm panel. Other types/cards work.

Yep here aswell. The strange thing is that it only gives me the error of: hui-alarm-panel-card on my Ipad. On my pc and android phone, it is working as designed.


on ipad:

Not sure why but it is now working on my fire table. I noticed the fire tablet had an update, and once it restarted everything worked. Thanks for your help.

I was wondering if it is possible the adjust the size of the popup. I want to make it bigger in width. But everything I do, it seems to be a fix size. I want to have 2 card horizontal but I get it vertical.

If the large parameter isnā€™t enough for your needs, CSS styles can be applied by the style parameter.

Hello, sorry for writing this but I cant activate any camera of the devices.

browser_mod:
  prefix: "browser_"
  devices:
    xxxxxxxx-xxxxxxxx:
      name: pocophone_chrome
      camera: true
    xxxxxxxx-xxxxxxxx:
      name: pocophone_app
      camera: true
    xxxxxxxx-xxxxxxxx:
      name: laptop_vivaldi
      camera: true
    xxxxxxxx-xxxxxxxx:
      name: laptop_chrome
      camera: true

I have all the sensors created, but I canā€™t reach to the camera authorization messages from chrome.
I have cleared the cache and restarted HA several times.
Working in hassos.

EDIT: This is the related message error I suppose
http://192.168.1.59:8123/browser_mod.js:60:6872 Uncaught TypeError: Cannot read property ā€˜getUserMediaā€™ of undefined

All the custom cards donā€™t work on iPadā€¦

Hmm, but the popup doesnā€™t seem to work on the official Android app. It does in Chrome browser on the same phone. Code:

        cards:
          - type: picture-glance
            title: Sophie
            camera_image: camera.sophie
            camera_view: live
            aspect_ratio: 16:9
            tap_action:
              action: call-service
              service: browser_mod.popup
              service_data:
                deviceID:
                  - this
                title: Kamer Sophie
                card:
                  type: picture-glance
                  title: Sophie
                  camera_image: camera.sophie
                  camera_view: live
                  aspect_ratio: 16:9
                  entities:
                    - binary_sensor.deursensor_sophie_contact      
                    - light.sophie
                  large: true

Any idea why?

I am trying to switch themes on my Wall Tablet using the below:

- alias: walltablet_themeset_night
  initial_state: true
  trigger:
    - platform: sun
      event: sunset
  action: 
    - service: browser_mod.set_theme
      service_data:
        theme: "Google Dark Theme"
      deviceID:
        - Fire7-WallTablet

But i am getting Property Service_data not allowed in VS Code.

Invalid config for [automation]: [service_data] is an invalid option for [automation]. Check: automation->action->0->service_data. (See /config/configuration.yaml, line 214). 

The readme says:

All examples below are given in the syntax used for calling them from lovelace via e.g. an entity-button card with tap_action: set to call-service . If you call the service from a script or an automation, the syntax will be slightly different.

Ah ok. Sorry. Must have missed that. I will fiddle with the syntax.