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

Great work!

I have a couple of questions to help me get my head around this if I may;

  1. Will it work for ffmpeg mic2web audio from a usb microphone attached to RPI or from a IP camera?
  2. Will it work with HASS.IO?

Thanks in advance

  1. Browser_mod can make the browser receive and playback audio from Home Assistant. This requires a speaker. How the audio gets to Home Assistant is a different question.
  2. https://www.home-assistant.io/faq/ha-vs-hassio/

@thomasloven This is great and I am looking forward to it replacing lovelace-fullykiosk.

Regarding the docs.

For lovelace-reload,
Instead of:

service: browser_mod.command
service_data:
  command: lovelace-reload

Shouldnā€™t it be:

service: browser_mod.command
data:
    command: lovelace-reload

service_data doesnā€™t pass the config check (for me at least).

And furthermore, this script doesnā€™t work for me. What do I have wrong?

script:
  reload_lovelace:
    sequence:
      - service: browser_mod.command
        data:
          command: lovelace-reload
          deviceID:
            - this

And finally, I am not getting the extra Fully Kiosk attributes in my Fully Kiosk media player. Any idea why that might be?


Thanks.

The syntax depends on where youā€™re sending the command from. If from backend, itā€™s data:, but if you have a button in lovelace which sends the command itā€™s service_data:.

Did you update to the version released on github (not on HACS yet!) yesterday? If you just upgraded you probably need to clear the cache in Fully Kiosk (can be done from the http interface - http://your-devices-ip:2323/)

Oooppssā€¦ my mistake. No I do not have the latest version from GitHub!
Iā€™ll wait for it to come on HACS.

@thomasloven
I just love this custom component.
When will the new version be released to match the docs? :wink:

A question though. I am using it with a tablet and Fully Kiosk and everything is good except for one thing.

After a period of time the media_player becomes unavailable. I have been playing with the settings in Fully Kiosk but I do not seem to be able to stop this happening.

What is strange (to me at least) is that I can always ping the tablet and get a response so it is still active on the network.

Any thoughts?
Thanks.

EDIT: Ok, so I have a Sonoff attached to the tablet to turn charging on and off. When the Sonoff turns on the power it instantly turns on the screen and makes itself known again to HA. So I have a workaround but Iā€™m still interested to know why HA loses sight of it? (And if there is a better way to keep it ā€˜aliveā€™.)

I seem to having a problem with playing camera image on browser_mod enabled Chrome browser. If I test the player using TTS, sound is being played without any issues. But if I try to stream camera content, nothing actually happens. How can I troubleshoot the reson? Playing media on Google Nest Hub works fine.

The media_player device created by browser_mod only supports audio playback.

  • Make the camera feed from your front door pop up on the tablett in your kitchen when someone rings the doorbell.

Refers to having browser_mod open the more-info dialog for your camera feed on the screen of your choice.

2 Likes

Hi @thomasloven! Huge thanks for this component! Works great to display my camera feed when the doorbell rings.

Question: I am trying to mimic the behaviour of the popup card by doing a service call when an entity button is pressed, but I am missing a way to set the deviceID to ā€œcurrentā€ or ā€œthisā€ since I only want this to happen on the device that initiated it. Is there a way to do this?

Thanks!

Thereā€™s an example in the docs.

Wow, how did I manage to miss that one. Thanks for setting me straight!

Ok, Iā€™m now on 10.1 so up to dateā€¦ :slight_smile:

But I only have two of the entities:

  • sensor.<device>
  • media_player.<device>
  • light.<device>
  • If youā€™re using Fully Kiosk Browser binary_sensor.<device>

I donā€™t have the light or the binary_sensor.

Iā€™m also getting some strange errors in my log:

I have this one 10 times:

http://192.168.1.25:8123/local/fully_kiosk/lovelace-fullykiosk.js?1.1:53:51 Uncaught TypeError: Cannot read property 'attributes' of undefined Connection lost. Reconnectingā€¦

and this one once:

http://192.168.1.25:8123/local/fully_kiosk/lovelace-fullykiosk.js?1.1:37:51 Uncaught TypeError: Cannot read property 'attributes' of undefined

EDIT: I did have lovelace-fullykiosk installed but has been removed:

  • both .js files deleted
  • both resources removed
  • both the light and the binary-sensor taken out of my config

is there something else?

And also, in the new browser-mod docs there is no mention of the following which was required in lovelace-fullykiosk. Are they needed with browser-mod?

  • In Fully Kiosk Browser, Enable Settings->Advanced Web Settings->Javascript Interface (PLUS) and Settings->Motion Detection (PLUS)->Enable Visual Motion Detection

You probably need to clear your cache too.

If you want motion detection to work, the setting still needs to be turned on. And the javascript interface setting.

Thanks, I guess this is for the errors.

And, I guessed those fully kiosk settings were still needed but wanted to check.

But what about the missing light and binary_sensor? any idea about that?

FYI I do get a light created for my PC.

I donā€™t really understand whatā€™s happening hereā€¦ Are you sure thereā€™s nothing else in the log, now that the clutter from lovelace-fullykiosk is gone?

Well, Iā€™m not sure the clutter has gone as I am still getting the errorsā€¦


Although they seem to have taken a long time to start appearing again.

I have cleared the cache and restarted HA (several times). I have no folder named fully_kiosk in my local (www) folder and if I search for either ā€˜fully-kioskā€™ or ā€˜lovelace-fullykioskā€™ I get no results (apart from in the log of course).

Do you have nay suggestions as to what to try?
Thanks.

@thomasloven
Ok, so this morning I decided to reset and rebuild my tablet.
It must have been some kind of caching issue as you said because it looks like everything is ok now.

I have to say thank you again for browser_mod.

Hi, I get a check error:

Invalid config for [automation]: [service_data] is an invalid option for [automation]. Check: automation->action->4->service_data. (See /config/configuration.yaml, line 58). Please check the docs at https://home-assistant.io/components/automation/

When I insert this automation. Any ideas, running latest 0.99.2 version.

- alias: "Doorbell"
  trigger:
    platform: state
    entity_id: binary_sensor.ring_front_door_ding
    to: 'on'
  action:
    - service: browser_mod.command
      service_data:
        command: popup
        title: Doorbell
        card:
          type: entities
          entities:
            - camera.front_door
         deviceID:
          - bd14ff64-eb8b3f41

Any ideas?

@a94marbo
Change service_data: to data: