Browser_mod problems

Hello,

I have 2 problems with the integration of browser_mod…

First of al the browser-player card : I put it on an existant dashboard and works fine (I can see the entity-id)…on my tablet and laptop, but not on my smart-phone ? On my smart-phone I get the error “Custom element doesn’t exist: browser-player”.

Second problem : I put this in my configuration.yaml file

browser_mod:
  prefix: "browser_mod_"
  devices:
    b4ea8a92-443fa8e5:
      name: laptop_christian
    a5de7b8c_eb62e08d:
      name: tablet_christian
    53fa2164-21f071cf:
      name: laptop_alex

In my automatisation I put this :

          - service: browser_mod.navigate
            data:
              navigation_path: /lovelace-mushroom/0
              deviceid:
                - tablet_christian

This works fine, except that the navigation is done on my tablet but also on my laptop ?

What am I doing wrong ?

I’m guessing, as you do not supply any valid device id, it does all. You put a friendly name in the automation, not the id.

And what’s the point of those aliases/friendly names ?

So, it should be :

          - service: browser_mod.navigate
            data:
              navigation_path: /lovelace-mushroom/0
              deviceid:
                - a5de7b8c_eb62e08d

And I have also a third problem… Why cann’t I see laptop and what is this unavailable device ?

What further stands out, is you supply a prefix, but you don’t include it in the automations, and you mix _ and - in the original id’s. I removed browser_mod on account of too many errors, so I cannot see what I used to do anymore.

As Edwin says, you need to check your device ids: they should have hyphens, not underscores.

Once you get that sorted, the device id appears as an attribute of the sensor, so you can access it via a template rather than hard coding it in your automation. This is helpful should you ever need to change it for some reason, as you will only have to do it in one place in configuration.yaml

{{ state_attr('sensor.browser_mod_laptop_alex', 'deviceID' }}

I imagine the unavailable device is from a browser, maybe on another device, or if you used a different browser on your tablet or laptop. You should set the disable option to stop this happening on all devices except the ones you specify - see the documentation for details.

It seems I’m missing something…

I started over again (just my laptop and tablet) :slight_smile:

browser_mod:
  prefix: 'browser_mod_'
  devices:
    b4ea8a92-443fa8e5:
      name: laptop_christian
    a5de7b8c-eb62e08d:
      name: tablet_christian

In the integration I have these 2 devices :

I changed the name & ID of the controls and sensor manually :

This seems fine :


My automatisation :

          - service: browser_mod.navigate
            data:
              navigation_path: /lovelace-mushroom/security-garagedoor
              deviceid:
                - '{{ state_attr(''sensor.tablet_christian'', ''deviceID'') }}'

But still the navigation is done on my tablet and my laptop :thinking:

Hmm - not 100% sure about the arrangement of single quotation marks in your template, but that seems to be a byproduct of using the Automation editor, so I doubt that’s the issue.

What does the automation trace say about the value that was actually passed to the service? (Settings → Automations & Scenes, then find your script or automation and check what happened on its last run).

If the trace shows the correct value for device id is being passed, then I’m out of ideas, sorry. All I can say is that it works for me, but that makes it even more baffling!

Seems fine, no ?

It does seem fine, unfortunately. Sorry I haven’t been able to help much

You did help me, even if there is a last problem somewhere…

Something else : why don’t I see my smartphone in the browser mod integration (no device) ? Also my first problem in my original post…

Found it !

It must be deviceID and not deviceid :grimacing:

Is browser_mod not usable on a smartphone ?

Glad to hear you got it sorted - I should have spotted that myself!

Concerning smartphone usage, it depends what you mean.
If you mean can you get your smartphone to appear as a recognised device, controllable through browser_mod? Yes, absolutely - I have all the family’s android phones set up this way, with a device id associated with the HA app. But if you’ve set the disable key, they won’t show up unless you specifically define them in configuration.yaml.

As to the issue of the card not appearing on your phone - I don’t use the card myself, but issues with custom cards are usually to do with refreshing the browser/device cache. From experience this can sometimes be slower to occur in the smartphone app, and on occasion I’ve even had to go into phone settings and delete the app cache (not the app data obviously, as that will mean you need to set up the app all over again)

What do you mean by this, could you give me an example ? I only mention this in my configuration.yaml :

browser_mod:
  prefix: 'browser_mod_'
  devices:
    b4ea8a92-443fa8e5:
      name: laptop_christian
    a5de7b8c-eb62e08d:
      name: tablet_christian

In my integration only 2 devices (tablet and laptop) are showing up.

For anyone looking at this who hasn’t figured this out yet. I figured out that the syntax should be

path: /main-dashboard/areas
browser_id: *browser mod instance name*

not deviceId or deviceID

1 Like