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

Buying this dude a coffeeā€¦ probably a few!

2 Likes

Well, before asking my question I want to say thank you to @thomasloven for this great custom component.
Now, back to work :grinning:
All my browser_mod setup seems to be ok.
I found my 4 device ID and given them an easy name.
I see them in my ā€œunused devicesā€ and the given name has been correctly assigned.
To be on the safe side I used the developer tools to send out a debug command and all 4 received it and showed their right deviceID.
At this point I built an automation to navigate to a given page when an event occurs.
Fineā€¦ it works perfectly
Here is the screen printout of the lower part of the working automation:


All devices switch to the right page when the automation is triggered

Next stepā€¦ I tried to send the navigate to a single deviceā€¦ and here is how I modified the automation:


When this automation is triggered nothing happens ā€¦ no errors no navigation to the desired page.

Of course I tried in several different ways, (deviceID, easy name. with dash, without dash) always within the limits allowed by the user interface, No way

If it may help, here are the automations as I find them in automation.yaml:

What am I doing wrong?
Thanks for listening

Giacomo

deviceID is supposed to be a list. Yours is a string.
http://thomasloven.com/blog/2018/08/YAML-For-Nonprogrammers/

Thanks a lot Thomas.
I thought I had already tried all the combinations but reading your guide pushed me to try in a way that I probably skipped before:
{
ā€œcommandā€: ā€œnavigateā€,
ā€œdeviceIDā€: [
ā€œ1e223384-177ed699ā€
],
ā€œnavigation_pathā€: ā€œ/lovelace/camerasā€
}

Now I wil have to understand why when I change the self generated deviceID with the easy name the automation wonā€™t work:
{
ā€œcommandā€: ā€œnavigateā€,
ā€œdeviceIDā€: [
ā€œmedia_player.pad_giacomoā€
],
ā€œnavigation_pathā€: ā€œ/lovelace/camerasā€
}

Iā€™ll try to read again and with more care your guide, but should you have a hint, please let me know
Thanks again
Giacomo

Example of alias used in service call: https://github.com/thomasloven/hass-browser_mod#more-info

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.