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

How would you do that with a picture?
It should show an url

Also with more info then instead of popup?

For a picture, you could try camera but using platform generic, or platform local_file.

more_info is the normal lovelace popup card, but in the case of a camera, it should be sized fairly large to view the image assuming the image itself is fairly large.

Can you give an example pls?
camera isnt a cardā€¦

So how would the more_info look like then?

I already have a camera:
camera:

  • platform: generic
    name: Eufy Deurbel
    still_image_url: !secret camera_still_image

Its that image i want to show

Goto Developers Tools, find camera.eufy_deurbel and click on the circle with i in the middle

?
its empty now
Its possible to show me example of code?

Anyone? How should the code be like?

  • service: browser_mod.popup
    data:
    deviceID:
    - 41b5a475-fe0bd9fc

Running in to the audio issue aswell.
I am using Brave browser. I want to use my browser for TTS so i can hear it in my headset instead of my google speakers.
The media player shows playing, but no sound is coming through the pc.

New to HA and to browser_mod. I added custom_components/browser_mod to /config/custom_components/browser_mod and when I do a Check Configuration, HA says the configuration is invalid
Component error: browser_mod - Integration ā€˜browser_modā€™ not found

What am I missing?

Hass can only find custom components that were present at the last boot. Restart anyway and it should be fine.

OK, but when you say ā€œrestart anywayā€, I presume you are referring to HA (not the Virtual machine OS). However, HA will not permit a restart because it says the configuration.yaml file is invalid. (all I added to it is the line browser_mod:

Sorry. I now understand. Restart without the change to .configuration.yaml. Then restart again with it.

browser_mod now appears to be installed and I am trying to demonstrate that I can get it to do anything. I understood that I need the browser deviceid (Chrome in my case) in order to test it. The FAQ say that to get a deviceID, you can go to /developer-tools/service and call browser_mod.debug although when I do that and Iā€™m not sure what I should be expecting as a response but I get none.

The FAQ also says you can find your deviceID by adding a browser-player card to Lovelace but I tried adding

type: custom:browser-player

to my Lovelace config file and received the error:

Custom element doesn't exist: browser-player
type: custom:browser-player

And as far as the last option of typing a localStorage[ā€œlovelace-player-device-idā€) into the browsers console. No idea where that is.
Can someone please walk me thru a simple test of browser-mod? Please donā€™t say RTFM as I have read the doc but perhaps it assumes more knowledge of HA than I currently possess.

Clear your browser cache, and then check your browser console. It should mention browser_mod and display your deviceID.

Thanks. That has given me a deviceID for my Chrome browser on my Macmini. Now how do I demonstrate that browser_mod is working as expected? Perhaps a simple script?

I am still unable to add a Lovelace card (custom: browser-player)

Also, how to get deviceID from ios device running the HA app?

Here is one wayā€¦Take a look at the debug command. Execute it anywhere but then go to the browser/device of interest and see what shows up.

I am fairly new to HA so when you say ā€œexecute it anywhereā€, that would probably be obvious to most HA users but I tried to use the Call Service function in Developer Tools like this:

http://imgur.com/a/A671pnU but nothng showed up.

To clarify, I was trying to answer your last question.

Try the debug command without a deviceID

If you mean, do what I did above (see image), without any data, That too does nothing.

I have finally gotten browser_mod to work, at least in so far as seeing the device in the Developer Tools states list and being able to control it. I can see the browser (Chrome) that I am logged in with on the MacMini running HA. However, from IOS devices (iPhone or iPad) I cannot seem to play a sound using the media_player when the browser is logged in to HA, only when I use the ios HA app. Is this the expected behavior?

This is an old query but no one ever answered you and I was working on this so hereā€™s what I worked out. I was trying to use last_seen but because itā€™s an attribute of the sensor created by browser mod it becomes unavailable as soon as my iPad kiosk sleeps and the related template becomes invalid. last_updated, however, is still accessible when the sensor is unavailable.
Sensor:

  - platform: template
    scan_interval: 10
    sensors:
      kiosk_last_updated:
        friendly_name: "seconds ago kiosk was last updated"
        value_template: "{{ (as_timestamp(now()) - as_timestamp(states.sensor.bm_ca_kiosk_ipp.last_updated)) | int() }}"
        unit_of_measurement: 'sec'

Automation:

- id: 'id 30.2'
  alias: "kiosk revert to home"
  trigger:
    - platform: state
      entity_id: binary_sensor.hue_motion_sensor_2_motion
      to: "on"
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: |
          {{ states("sensor.kiosk_last_updated") | int() > 300 }}
      - condition: or
        conditions:
          - condition: time
            after: '17:00:00'
            before: '09:25:00'
            weekday: 
              - mon
              - tue
              - wed
              - thu
              - fri
          - condition: time
            weekday:
              - sat
              - sun
  action:
    - delay: "00:00:02"
    - service: browser_mod.navigate
      data:
        navigation_path: /kiosk-yaml/0
        deviceID:
          - 67796da9-c098a881
          - bm_ca_kiosk_ipp

I have the time conditions in there because during market hours a second automation sends the kiosk to my stocks page. As a PSA, Iā€™m using this brilliant trick to wake the iPad into guided access mode based on a Hue motion sensor (which I donā€™t think browser mod can do).

1 Like