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

is there a way to have a browser-mod media-player set a default (lowā€¦) volume?

always scares the living day(night)light out of me when my mobile device starts notifying me of events in the middle of the nightā€¦

There is a slider, and yes, Iā€™ve taken that down now many times, but it always ends up being maxed out again. both on the opening screen of the iPhone, and in the Lovelace frontend for the media_player for my iPhone.

clicking the cogwheel does nothing

this is for all browser-mod devices btw.

@photo64 answered this question literally 3 posts above yours

Hi Thomas,

please let me ask if youā€™d be willing considering a FR adding severaL built-in variables to Browser-mod, next to the currently available
deviceID, path, userAgent and currentUser .

I ask because with the demise of Custom Header we can no longer reach its built-in vars, which I suppose stem from card-tools to begin with, and could be made available in browser-mod because of that?

userid,
viewTitle
viewIndex
url
and the 2 binaries:
isAdmin and isOwner

In developer mode, I was able to use these in the frontend to check and see if all was as expected, via a template, and now have to use several tricks manually in the inspector (to check the path and view) or am not able at all, because even inspector wonā€™t show/canā€™t reach that.

Would be really very nice if these could be added to the sensor for the browser.

1 Like

Hello,

Can anyone help me to figure out how to fix this error?
I have this error multiple times when ik reboot my HA. I have reinstalled browser-mod once with hacs. But still keep the error.

> 2020-11-06 08:26:02 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547652275360] Error handling message: Unknown error
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
>     handler(self.hass, self, schema(msg))
>   File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
>     devices[deviceID].update(msg.get("data", None))
>   File "/config/custom_components/browser_mod/connection.py", line 83, in update
>     self.sensor = self.sensor or create_entity(
>   File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
>     adder = hass.data[DOMAIN][DATA_ADDERS][platform]
> KeyError: 'sensor'

Hi,
Can I use browser_mod on IOs campanion app?

Hello,
Thanks for this awesome mod! A feature was added to force a screen to stay awake, but it doesnā€™t work on my amazon echo show. After 5 minutes of inactivity it still forces the browser to shut down. The echo show has 2 browsers: firefox and Amazonā€™s own Silk, but both close down.

Is there a workaround for this? Or a way to force some background activity to stop it from closing?

Iā€™ve been using Browser Mod for awhile now with a few Nest Hubs. With the latest update, the sensor entity is no longer created - only the media_player & light.

Has anyone else experienced this? And is there a way to regain the functionality associated with the sensor entity?

I have this error multiple times when ik reboot my HA. I have reinstalled browser-mod once with hacs. But still keep the error.

Hello,
Same error on my side, anyone found a solution for this ?

Hey all, is there a possibility to call the mediabrowser card with a tap action for a specific player device?

Hi guys. Iā€™m trying to get this working and somehow I stuck on very beginning:(
I run HA on venv on Rapsberry Pi4 with monitor connected. But I run it by: http://localhost:8123/lovelace/0?kiosk - This gives me a clean view without tabs and unnecessary options visible - just cards and backgroundā€¦ And on this config - it doesnt work - The media player card added to view shows only red color with info that ā€˜there is no such cardā€™ā€¦
However, when I run this by http://localhost:8123/lovelace - so normal mode - it works fine - I can see the card, the ID, I can do blackout (locally and also remotely from another host)ā€¦
Any Idea how to solve it ?

Hi so im using browser mod with Wallpanel on a fire tablet
i am unable to get my camera feed to autoplay. i have to press the play button everytime
Is there something i can do to bypass this?

Hi,
I was trying browser_mod, but I canā€™t import an entire card (complex, about 600 lines of code) to be able to open it with the command:

tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    deviceID:
      - this

The beginning of my card code is as follows:

type: 'custom:stack-in-card' 
mode: horizontal
style: |
  ha-card {
          width: 410px !important;
  }
cards:
  - type: conditional
    conditions:
      - entity: input_boolean.temperatura_thermostat
        state: 'off'
      - entity: input_boolean.umidita_thermostat
        state: 'off'
    card:
      type: thermostat
      name: thermostat
      entity: climate.thermostat
      style: |
        ha-card {
          height: 270px !important;
          width: 250px !important;
          box-shadow: 0px 0px;
        }
  - type: conditional
    conditions:
      - entity: input_boolean.temperatura_thermostat
        state: 'on'
    card:
      animate: true
      color_thresholds:
        - color: '#f39c12'
          value: 20
        - color: '#d35400'
          value: 30
        - color: '#c0392b'
          value: 35
      decimals: 2
      entities:
        - sensor.termostato_thermostat_temperature
      name: TEMPERATURA thermostat
      height: 200
      unit: Ā°C
      points_per_hour: 5
      show:
        labels: true
        extrema: true
        icon: false
        name: false
      type: 'custom:mini-graph-card'
      style: |
        ha-card { 
          height: 240px !important;
          width: 243px !important;
          margin: 10px 0px 5px 5px;
          box-shadow: 0px 0px;
        }
  - type: conditional
    ...
    ...
    ...

Can you help me to insert it correctly to be called by browser_mod?

THANKS

Hello,

I had a card for spotify with a pop up card and in the popup card i had a ā€˜custom:stack-in-cardā€™ with a entity card and a conditional card.
I did not use the card for a while an now i mention only the conditional part is working but not the enity part.
Her is my code:

type: 'custom:button-card'
aspect_ratio: 2/1
entity: media_player.spotify_dennis_bos
name: Spotify
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    card:
      type: 'custom:stack-in-card'
      cards:
        - type: entities
          entities:
            - entity: input_select.spotify_playlist
            - entity: input_select.spotify_speakers
          title: Spotify Test Card
        - type: 'custom:button-card'
          aspect_ratio: 4/1
          entity: script.spotify
          icon: 'mdi:spotify'
          tap_action:
            action: call-service
            service: script.spotify
        - card:
            artwork: full-cover
            entity: media_player.spotify_dennis_bos
            hide:
              controls: false
              power: false
              progress: false
              source: true
              volume: false
            info: scroll
            style: ''
            tap_action:
              action: more-info
            type: 'custom:mini-media-player'
          conditions:
            - entity: media_player.spotify_dennis_bos
              state_not: idle
          type: conditional
    deviceID:
      - this
      - dashboard
    title: Spotify

when i put he stack-in-card part in a normal stack-in-card (no pop-up) everything works fine.image
Her is the code of the normal card which i want in a pop-up card:

type: 'custom:stack-in-card'
title: spotify
cards:
  - type: entities
    entities:
      - entity: input_select.spotify_playlist
      - entity: input_select.spotify_speakers
  - type: 'custom:button-card'
    aspect_ratio: 4/1
    entity: script.spotify
    icon: 'mdi:spotify'
    tap_action:
      action: call-service
      service: script.spotify
  - type: conditional
    conditions:
      - entity: media_player.spotify_dennis_bos
        state_not: idle
    card:
      type: 'custom:mini-media-player'
      artwork: full-cover
      entity: media_player.spotify_dennis_bos
      hide:
        controls: false
        power: true
        progress: false
        source: true
        volume: false
      info: scroll
      style: ''
      tap_action:
        action: more-info

What is wrong on the first code why i get a empty pop-up?

Hey all, no one knows if we can use tap_action to call specific mediabrowser ā€œcardā€?

i got brower_mod working for a long timeā€¦
However, since yesterday it stopped working.
I didnt change muchā€¦ any idea how i can troubleshoot why the mod isnt working anymore?

i see this in the log

Logger: homeassistant.setup
Source: /usr/local/lib/python3.8/asyncio/events.py:81
First occurred: 19:27:55 (1 occurrences)
Last logged: 19:27:55

Setup of browser_mod is taking over 10 seconds.

Little help needed, how to check why my popup not working at all?

Hi @thomasloven thankā€™s for your work and this components !

Iā€™m using FullyKioskBrowser, and iā€™ve a stupid question, why are you included in the binary_sensor entity, the battery_level, battery_charging, battery, charging, ip information ? Why not included in an other sensor entity with other information ?

I will be happy to contribute if a new entity is created.

Anthony

You can, but itā€™s a workaround and doesnā€™t seem to work on iOS. I have this myself, see > Show off your picture-elements uses

The card on the left is the media browser (which is inside a vertical stack and a input select + script button below). I put the media browser url inside an iframe and played around with aspect ratio and card-mod. Also added a home-button to back to the main tab. This is all inside a picture-elements card, together with all the other cards you see.

This works on Android (Fully Kiosk) and Chrome/Edge. On iOS it keeps reloading and fails. You can also put that iframe card inside a browser.mod popup which I also did successfully.

I have recently started using Logitech Media Server instead of Chromecast and Spotify Connect, so I donā€™t use this setup anymore and donā€™t have the code anymore either. It was meant as an experiment and temporary solution till LMS. I was happy with the results though.

2 Likes

This looks great. You donā€™t have any code left on how you managed to get the media browser url or something from here? Just the part where you embed the media browser past in would help so much

Itā€™s just iframe card, it only needs the media browser url. Just open the media browser dashboard from your sidebar en copy the url you see from your browser and use that in iframe card ;). That is your-HA-instance/media-browser