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

Iā€™ve tried that as well, but clicking on the link still doesnā€™t actually change the device id. If I press enter in the address bar or reload the page on a desktop browser after clicking on the link it does change, but I canā€™t do that in the mobile app.

Iā€™m assuming that the script is only checking the query string parameters when it loads, and navigating to a link doesnā€™t trigger a reload of the script while manually entering the url in the address bar or reloading after clicking the link is.

Iā€™m also working on a way to set the deviceID using the browser-player card, but thereā€™s some fine tuning left.

2 Likes

Hi,

I use swipe-card with browser_mod, and itā€™s works fine with HA 112.4 and Browser _mod29. Atfer upgrade to HA 114.1 and browser_mod 1.1.6 the swipe-card is not working. Here is a simple example:

Browser:mod popup with swipe-card with 1 entity:

aspect_ratio: 5/2
color_type: card
entity: input_boolean.redony_vezerles
icon: 'mdi:format-line-weight'
show_name: false
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    card:
      cards:
        - entities:
            - cover.ablak_redonyok
          type: entities
      parameters:
        allowTouchMove: false
        centeredSlides: true
        navigation:
          keyboard:
            enabled: true
            onlyInViewport: true
        pagination:
          type: progressbar
        slidesPerView: auto
        spaceBetween: 8
      type: 'custom:swipe-card'
    deviceID:
      - this
      - dashboard
    large: false
    title: Covers
type: 'custom:button-card'

popup_with_swipe_card

Browser:mod popup without swipe-card with 1 entity:

aspect_ratio: 5/2
color_type: card
entity: input_boolean.redony_vezerles
icon: 'mdi:format-line-weight'
show_name: false
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    card:
      cards:
        - entities:
            - cover.ablak_redonyok
          type: entities
      type: vertical-stack
    deviceID:
      - this
      - dashboard
    large: false
    title: Covers
type: 'custom:button-card'

popup_without_swipe_card

Is that Browser_mod bug, or swipe-card? Or user? :slight_smile:

Thanks!

please help me out here, I am trying to prevent browser-mod from creating any light entity using this config based on the documentation :

browser_mod:
  prefix: browser_
  disable:
    - light
  devices:
    04f1uniquedfb:
      name: theboss
    3b6unique967:
      name: hvbmbpro16-chrome
    b77uniqued59:
      name: hvbmbpro16-safari

so it creates media_player and sensor entities, and nothing else. unfortunately, all devices have a light entity. Why is incorrect in the above setup please? Do I need to disable that per entity that does have an alias?

My understanding is that a global disable: key only affects devices that are not then named specifically under the devices: section. I think you need to explicitly disable light for each separate, named device i.e.:

browser_mod:
  prefix: browser_
  devices:
    04f1uniquedfb:
      name: theboss
      disable:
        - light
...

sorry, should have mentioned that I tried that before:

browser_mod:
  prefix: browser_
  disable:
    - all
  devices:
    04funique4dfb:
      name: theboss
      disable:
        - light
    3b6unique967:
      name: hvbmbpro16-chrome
      disable:
        - light
    b77uniqued59:
      name: hvbmbpro16-safari
      disable:
        - light

still gives me the light entities for all named entitiesā€¦

update
restarting my instance once more, and closing the browsers, after having edited (back) to the above seems to have solved my quest: no more light entities. So, thanks :wink:
When I open a browser and check for the attribute type: browser_mod only media_player and sensor entities are created. perfect!
do see more of these now:

2020-08-18 12:03:01 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2873139624] 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 36, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 72, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 30, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'

hmmā€¦

Can anybody confirm that the more-info pop-up replacement (popup_cards) doesnā€™t work with entities displayed onhome-feed card?https://github.com/gadgetchnnel/lovelace-home-feed-card with more_info_on_tap turned on.

Hi, just stumbled across this, and it looks promising. Currently, I am using a picture card to display a streaming camera URL, which I would like to open in a pop-up instead of a new browser tab. Is this achievable? Thanks

Yes, look in the cookbook, I put this exact example in there.

Hi all,

My device_idā€™s keep changing. Based on another comment here, Iā€™m guessing it happens when I clear the cache on fully kioskā€¦ Is there any way to prevent this and force the same device to keep the same device_id forever and ever and ever?

ha, a known nuisance. referenced that here in the WTH topic, hope its not an Apple thing, and maybe HA devs can find a way around that. At least, of the permanent changing of the idā€™s cant be prevented, come up with some automatic way of aliasing themā€¦

Thanks, perhaps Iā€™m a bit of a newbie ā€¦ Iā€™ve read a lot and watched youtube videos ā€¦ still not sure how to convert this ā€¦

The picture card is like this ā€¦ (in edit mode UI)

hold_action:
  action: none
image: 'http://192.168.0.21:8081'
tap_action:
  action: url
  url_path: 'http://192.168.0.21:8081/'
type: picture

But am unsure how to convert this into a browser_mod friendly setup ā€¦

Thanks

hold_action:
  action: none
image: 'http://192.168.0.21:8081'
tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    deviceID: this
    large: true
    card:
      type: picture
      image: 'http://192.168.0.21:8081/'
type: picture

Many thanks, for this.

I have put in and browser_mod isnā€™t responding. I can see in the console that BROWSER_MOD 1.1.6 IS INSTALLED ā€¦ and there are the browser mod entities and services available ā€¦

There isnā€™t something extra I need to do with a docker instance?

Not unless you want to customize anything. All config should be done under browser_mod: in configuration.yaml.

Also you can create a camera entity from that URL with these docs:

Thanks for the pointers ā€¦ I finally got my system working. Was confused about putting stuff under browser_mod in configuration.yaml ā€¦
Anyhow, I ended up editing via Raw Configuration Mode and putting in ā€¦

      - type: picture-entity
        entity: camera.motioneye_front
        tap_action:
          action: call-service
          service: browser_mod.popup
          service_data:
            title: []
            deviceID:
              - this
            large: true
            hide_header: true
            card:
              type: picture-entity
              show_name: false
              show_state: false
              entity: camera.motioneye_front
        hold_action:
          action: none
        show_name: false
        show_state: false
        aspect_ratio: 0%

Can anyone suggest why I get this error at startup?
Could it just be because a sensor somewhere is not fully set up in time?

2020-08-23 07:24:40 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140479118731056] 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 36, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 72, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 30, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'

Maybe. It means that one of DOMAIN, DATA_ADDERS, or platform is 'sensor', and that key isnā€™t in one of those dicts. I think everyone gets it.

1 Like

See https://github.com/thomasloven/hass-browser_mod/issues/106

1 Like