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

I try to use deviceID: ā€œ{{ deviceID }}ā€ but it doesnā€™t work.

mod-card in itself is not bad, but to use it where it is not required adds more problems than it solves.

As a bad example (DO NOT DO THIS), I see lots of:

type: custom:mod-card
# AGAIN, THIS IS A BAD EXAMPLE
style: |
  ha-card {
    --primary-color: red;
    # add various workarounds and hoop-jumping caused by unnecessarily using mod-card here
  }
card:
  type: entities
  entities:
    ...

that should have been

type: entities
style: |
  ha-card {
    --primary-color: red;
  }
entities:
  ...

Your example is actually a good one, using mod-card there makes sense, but using stack-in-card is also a great method which I assume makes your configuration easier too.
You could also use state-switch to avoid the jinja template processing and increase performance a tad.

Can you tell me please, is it possible to store ā€œdeviceIDā€ value as input_text?

Thanks, yes I looked at state-switch a while ago but I donā€™t think I managed to get it to display no card at all, if i remember rightly it was ā€˜display one card OR anotherā€™.

But Iā€™ll take another look.

I have no idea what you mean or what you wish to accomplish.

I am trying to call pop up window when I am disarming Template Alarm Control Panel.

My panel code:

- platform: template
  panels:
    safe_alarm_panel:
      value_template: "{{ states('alarm_control_panel.perimetr') }}"
      arm_away:
        service: alarm_control_panel.alarm_arm_away
        data:
          entity_id: alarm_control_panel.perimetr
      disarm:
        - service: script.entrance_panel_button_perimetr_disarm
          data_template:
            deviceID:
              - this

and script:

entrance_panel_button_perimetr_disarm:
  sequence:
    - service: browser_mod.popup
      data_template:
        deviceID: "{{ deviceID }}"
        title: "Keyboard" 
        large: false
        card:
          type: alarm-panel
          entity: alarm_control_panel.perimetr_s_kodom
          name: Perimetr
          states:
             - arm_away
1 Like

Browser_mod will inject the deviceID in any call-service action from the frontend where it finds deviceID: this.
If you cannot call a service or cannon change its data, then thereā€™s no way for the backend to know which device the action originated from, unfortunately.

I added the code to the previous post. Can you check it please?

I am having problems with browser_mod not seeing my fire 8 tablet while using fully kiosk browser. It will detect the tablet id if I use Chrome browser on the fire 8 tablet, but for some reason I canā€™t get it to create any id while using fully. The version of Fully I am using is 1.38 Fire. I donā€™t know if there is settings inside Fully that is preventing browser_mod from working or not. Have tried restarting HA several times, cleared cache, tried local address of HA and duckdns address. I can get browser mod to see my phone and desktop pc and use light and media player on those. Any help would be much appreciated.

That wonā€™t work, unfortunately, because the disarm service call is run from the backend.
I donā€™t know of any way to accomplish what you are trying to do. Sorry.

Do you have the paid PRO version?
That shouldnā€™t be a requirement for some functionality. Just trying to find out what could be wrong.

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.