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

I really loved the popup-cards, this mod seems to be even better though it misses a few thing for me. First the ability to have all stuff on a separate file (e.g. currently I have the popup config in a separate file). To my knowledge anchors donā€™t work on multiple files.

Second is, when used in conjuction with deep-press nothing happens. The deep-press triggers but no popup shows. (It does work when turning deep-press off).

For me it makes this virtually useless as I use deep-press everywhere. I also tried it with the script example from your docs. The script gets executed but nothing happens (I even tried setting the device-id to the one I use instead of ā€œthisā€).

I hope someday this works, as I love your mods. They are great and I donā€™t like to rely on deprecated addons :joy::rofl:.

Thanks for your hard work @thomasloven

1 Like

The version number can be anything https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins#2-update-the-version-number-in-the-resources-section
It doesnā€™t even have to be a number.

I canā€™t say much about deep-press, butā€¦

type: entities
entities:
  - entity: sun.sun
    tap_action: !include my-awesome-popup.yaml

 
ā€¦
If Iā€™d have to guess, btw. Iā€™d say the deep press somehow triggers the closing of the popup as well. Does it work with hold_action: more-info?

Ah yes that is a fairly good method. Though I had all popup cards in a single file. But this can serve my needs.

The thing is, if you use deep-press (lovelace mod) with popup cards it will work as you just call up a more info window (replaced by the popup card ofc). It seems for some reason that when you do an actual service-call that it will not trigger. It probably has to do with that deep-press mod and itā€™s ability to fade in/out cards.

I will ask the dev of deep-press if he knows what might be the problem. Thank you for your response @thomasloven

Thank you for your fast response Thomas,
Right now I have these 4 buttons associated to 4 Input Boolean and 4 conditional Cards (Card X) associated to the condition of the 4 input_boolean. If I press Button1 Card 1 is shown and the other three are hidden, if I press Button 2 card 2 is shown ā€¦

Card_Example

The problem is that if I push one of the button I am changing the interface in all the opened devices, and I want that they work in a separate way (i.e. my laptop is showing card 1 and my phone is showing card 2)

I think that being able to know (and store in a variable) the device it was activated from, I can make a conditional card based on this variable. Maybe there exists a way to make this thing easier, but is the only solution Iā€™ve just found right now.

Thank you very much for your time.

I see. Then I have good news for you.

sure, thanks for chiming in.
I am aware of that, and that the computers might not need it. Itā€™s more that us humans need it :wink: would be very nice to be able to distinguish if one has the latest version (check a version number) or has to dl a new version.

That being said, Iā€™ve now set it to the above, 41 release 6, so guess the next version 7 will be unique enough for the computerā€¦

You can use this number:

Itā€™ll be unique, but update more often than the release number.

I have this code to open two custom button cards in the same popup, but it doesnā€™t work.
Where am i wrong or itā€™s not possible at the moment?

                    tap_action: 
                      action: call-service
                      service: browser_mod.popup
                      service_data:
                        title: Swiss Classic
                        card:
                          type: custom:button-card
                          name: Plus
                          tap_action:
                            action: call-service
                            service: media_player.play_media
                            service_data:
                              entity_id: media_player.echo_plus
                              media_content_id: "http://stream.srg-ssr.ch/m/rsc_it/mp3_128"
                              media_content_type: "audio/mp4"
                          type: custom:button-card
                          name: Spot
                          tap_action:
                            action: call-service
                            service: media_player.play_media
                            service_data:
                              entity_id: media_player.echo_spot
                              media_content_id: "http://stream.srg-ssr.ch/m/rsc_it/mp3_128"
                              media_content_type: "audio/mp4"                      
                        deviceID: this

If i do in this way i get only the first name ā€˜Spotā€™ in the Popup, and if i use the two cards as list i get error with no type card configured. More, why the popup shows only the second card name and not the first one?

55

This if i use two cards as list

42

Hello : Using a Fire 7 and a Fire 8, FullyKiosk Pro on both.

The config works and I can switch the screen on/off, send debug message, etcā€¦ to the tablets. Only issue is the camera.

I have camera enabled in config.yaml.

browser_mod:
  devices:
    99216c76_fab8xxxx:
      name: Fire8
      camera: true
      fullykiosk: true
    f9c5876a_7907xxxx:
      name: fire7mas
      camera: true
      fullykiosk: true

I have enabled the following in FullyKiosk settings

  • Advanced Web Settings > javascript interface
  • Web Content Settings > Webcam Access

I have restarted FullyKiosk and rebooted the Fire too. Maybe I am stuck on ā€œclearing the cacheā€. I have done that from FullyKiosk on the tablets, restarted but never got the prompt from Fully to access my camera. Is there some other setting I need to enable ?

Any ideas ?

Thanks

If only there was a card which could keep other cards inside it. Stack them on top of each other, or soā€¦

1 Like

The browser_mod camera connection actually only works if you have Webcam Access turned off, as I recently found out.

Iā€™d recommend using this method anyway.

Yes, i realized that and stacked the two into a vertical stackā€¦ all is working now !

1 Like

Can you show config when it is fixed? thanks

Here it is:

                  - type: custom:button-card
                    name: Radio ABC Jazz
                    styles:
                      card:
                        - padding: 12px 0px
                        - font-size: 14px
                        - font-weight: bold
                    tap_action: 
                      action: call-service
                      service: browser_mod.popup
                      service_data:
                        title: Radio ABC Jazz
                        card:
                          type: vertical-stack
                          cards:
                            - type: "custom:button-card"
                              name: Plus
                              tap_action:
                                action: call-service
                                service: script.turn_on
                                service_data:
                                  entity_id: script.play_jazz_plus
                            - type: "custom:button-card"
                              name: Spot
                              tap_action:
                                action: call-service
                                service: script.turn_on
                                service_data:
                                  entity_id: script.play_jazz
                    hold_action:
                      action: call-service
                      service: browser_mod.popup
                      service_data:
                        title: Radio ABC Jazz
                        card:
                           type: vertical-stack
                           cards:
                             - type: custom:mini-media-player
                               artwork: none
                               name: Sonos Salotto
                               icon: mdi:speaker-wireless
                               entity: media_player.sonos_stereo
                             - type: custom:mini-media-player
                               artwork: none
                               name: Sonos Studio
                               icon: mdi:speaker-wireless
                               entity: media_player.studio
                        deviceID: this
                        style:
                          border-radius: 20px
                          --ha-card-border-radius: 20px
                    styles:
                      card:
                        - padding: 12px 0px
                        - font-weight: bold
                        - font-size: 14px

Hope it helpsā€¦

3 Likes

Hi @thomasloven, is there any way to know my actual device, to send a tts in the media_player created for that device? Do you understand what I try to do?
Thanks for this great component!

The debug command or the browser-player card.

Yeah, I understand thatā€¦ But, is it an ā€œeasy wayā€ to call a service with that specific media_player, depending of the device where I push a button, for example?

Yes. Itā€™s described how to do this in the Services section of the readme, and several of the examples show the method with description.
Thereā€™s also an example in the cookbook (also linked from the readme).

I read three times the readmeā€¦ I donā€™t know if I am so stupid, or I canā€™t find what I need :expressionless:

I just want to do this:

Push a button --> call tts_google service and play some text in that specific device.