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

It cannot control the overall device volume setting, but only the relative volume of the audio sent to the browser_mod media player device.

I started using a wall mounted tablet with Fully kiosk and would like to be able to set the theme automatically, so found browser_mod, which is great.
Unforunately, it seems i canā€™t get it to work.
I try with a basic automation script:

- id: tablet theme
  alias: Browser tablet1 - Set custom theme
  trigger:
  - minutes: /1
    platform: time_pattern
  action:
  - data:
      deviceID:
      - cdd414ea-f9905d9e
      name: noctis-grey
    service: browser_mod.set_theme
  initial_state: 'true'

No errors in the logs and the automations triggers:

2020-05-28 11:58:00 INFO (MainThread) [homeassistant.components.automation] Executing Browser tablet1 - Set custom theme
2020-05-28 11:58:00 INFO (MainThread) [homeassistant.components.automation] Browser tablet1 - Set custom theme: Running script
2020-05-28 11:58:00 INFO (MainThread) [homeassistant.components.automation] Browser tablet1 - Set custom theme: Executing step call service

Allready tried clearing cache and restarted Fullyā€¦
What am i doing wrong ?

I have a panel in my living room that has multiple views. There is a left hand menu that can be used to switch between pages / views. This works well.

I would like to have the panel go to the main page after a period of inactivity. Users walk away from the panel after using it and often leave it on one of the additional views. The main view is where the important information is and I like to be able to view this as a default.

My entity for the panel is sensor.living_room_panel and I have the following attributes

type: browser_mod
last_seen: '2020-05-28T07:52:48.872415'
deviceID: a5c9f6d9-8f78aacf
path: /lovelace-panel/main
visibility: visible
userAgent: >-
  Mozilla/5.0 (Windows NT 10.0; ) AppleWebKit/537.36 (KHTML, like Gecko)
  Chrome/83.0.4103.61 Safari/537.36
currentUser: tablet
width: 1280
height: 800

I am struggling to write an automation that will change the panel path back to /lovelace-panel/main after a period of inactivity on another page, example /lovelace-panel/climate I have multiple other views / paths that the table might have been left on.

Can anyone help me?

Thank you Thomas for your quick reply. I have figured out that if the browser_mod device has an alias in the config file, the browser-player wonā€™t recognize it as the same device and therefore wonā€™t control it. The workaround solution is to remove the alias for the device and use long ID everywhere. Regards and thanks again.

Hmā€¦ thatā€™s a bug.
Thanks for letting me know!

Someone suggestions ?

Thanks Thomas I looked up the cookbook and it makes sense but for some reason it does nothing

Is it possible to have an iframe as the popup? Neither of these display anything when I click the button but the button does ā€˜shadowā€™ so the press is registered.

  - type: custom:button-card
    icon: mdi:123
    tap_action:
      action: call-service
      service: browser_mod.popup
      service_data:
        title: Title
        card:
          type: iframe
          url: /local/page/index.html

This next one was a guess :wink:

  - type: custom:button-card
    icon: mdi:123
    tap_action:
      action: call-service
      service: browser_mod.popup
      service_data:
        title: Title
        card:
          type: custom:hui-elements
          card_type: iframe
          url: /local/page/index.html

and yes, this does display the iframe

  - type: iframe
    url: /local/page/index.html

I tried the options to play audio on the desired device with the following options:

entity_id: "media_player.browser_513b4669"
message: 'de bel!'
language: 'nl'


entity_id: media_player.browser_513b4669
media_content_id: 'http://hass:8123/local/audio/doorbel.mp3'
media_content_type: music

It works well in the browser and chromecast devices but not in the Android HASS app. I have to open the Android app and tap the volume slider or mute/unmute the audio once.
Then it works fine for a while. Then it stops working after a sudden time.

Could this the same as with the Apple behavior?

1 Like

Hello,

First of all, great job @thomasloven with this custom component!

Iā€™ve just started using it to override the more-info popup with my own entity card, following the instructions in the componentā€™s ReadMe. However, I noticed the history graph of the entity in not shown anymore when more-info is overridden.

Is there an easy way to display that at the bottom of my entity card popup as in the original more-info dialog?

Thanks in advance

Add the History Graph Card after your entities card.

Thanks @thomasloven!

Are you saying that I can define multiple cards in the lovelace interface?

This is how I have defined it so far:

    "popup_cards": {
        "switch.my_light": {
            "card": {
                "entities": [
                    {
                        "entity": "switch.my_light"
                    },
                    {
                        "entity": "input_select.my_input_select"
                    }
                ],
                "show_header_toggle": false,
                "type": "entities"
            },
            "title": "bar"
         },

Can I just go ahead and queue another ā€œfooā€ history-card after the ā€œbarā€ entity-card?

The popup accepts only one card, for more you need the vertical-stack.

    popup_cards:
      switch.my_light:
        title: bar
        card:
          type: vertical-stack
          cards:
            - type: entities
              entities:
                - ...
                - ...
            - type: history-graph
              hours_to_show: 24
              refresh_interval: 10
              entities:
                - ...
                - ...
1 Like

@VDRainer - that did the trick, thanks!!

Thereā€™s also more-info-card which displays the more-info dialog, but as a card, so you canā€¦ show the more-info-dialog in the more-info-dialogā€¦ dawgā€¦

No, really, this is the reason I made it.

Cool, good to know, thanks!

very nice im just lookig for thise! :slight_smile: you make a solution?

Not yet, I took a break from my UI. Was getting burnt out.

upon updating to 0.111, thereā€™s a new error in the startup log:

2020-06-11 09:41:51 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2894248144] Received invalid command: browser_mod/connect

not sure it is fatal or not, but Iā€™ve never seen that before, so maybe an issue with 111? Or has the logging simply been improved upon.

Youā€™re not the only one seeing those on 0.111: https://github.com/thomasloven/hass-browser_mod/issues/105