It would be very useful to be able to tell easily if you are connected via the Nabu Casa externa link or locally when using the mobile app.
Why?
It’s a bit thin as a use-case
I agree wonder what the use case is
I use a different theme for internal/external connections to identify server connection. Primarily for troubleshooting, but knowing home zone boundaries is useful.
if you want to know if the app is on the internal URL just use the WiFi connection sensor and look for the WiFi SSID you added as home WiFi. That will give you the exact data the app uses to make the URL switching decision. A simillar sensor is offered for BSSID if you used that for home detection.
Thanks! I’ll give this method a try.
Apologies I should have said - it would be useful to ME :). A clear indication if a connection is happening via WAN or LAN.
But that’s an indirect method. If there’s a bug in the app ever that e.g. fails to switch over to LAN once it detects your SSID this indirect method will give you the wrong answer.
That doesn’t make any sense. Use the same data that the app uses. It works fine.
Not sure how much time you’ve spent developing software in a professional context - let’s just say I wouldn’t be so cavalier or dismissive that what I said doesn’t make sense.
At any rate, if no one on here thinks this request adds any value as a native feature, that’s fine. Not sure what the process is, if this thread just dies or it needs to be deleted.
dont you have the:
which shows whether your NC connection is live?
Dump it in the Dashboard and you have what you need?
when both parents are home, there is only a local connection. (I toggle that for closer security)
my mobile device always connects locally if possible, even when remote is available. Not in you case?
no need for another sensor checking that for that matter I think
Oh that’s a fantastic idea, thanks! Pretty close to a native solution. I’ll look into it.
thanks - that’s close but i’m more interested in what this device is doing.
you are right that if remote ui is off then for sure i cannot be connected remotely.
but if one family member is out of the house remote UI is triggered on but it doesn’t tell me what my specific device (which is home) is actually doing it - is it connected via remote UI or LAN.
To be sure : aren’t you mixing terminology here? How could your mobile device ever use LAN?
I can see the desire to see NC vs Local but that has nothing to do with Lan vs Wifi
Sorry if I misunderstand what you are trying to do
no you are totally right i wasn’t precise in how i said it
i just meant locally (whether wireless or wired) vs the WAN ie connected externally
p.s. btw technically you can wire your phone via usb to an ethernet port, i did that once many years ago but i didn’t mean wired above
I think what he meant was that the app uses exactly the same information that populates the (B)SSID sensors and that the app uses it to decide whether it can connect locally to your server. So, unless there’s a bug that will give the sensor a wrong value or a remote connection gets made when a local one can be used, the information of those sensors would give you exactly what you need. Your remaining issue is then how to visualise it.
Thanks @parautenbach . Yes I understood what the gentleman meant and I appreciate the solution but I would prefer not to do it that way for reasons that obviously did not resonate :). It’s a reasonable solution if nothing native in the app exists or will be added.
I have used this for some time:
template:
- sensor:
- unique_id: map_connection_marijn
<<: &map_connection
state: >
{% if states('sensor.' ~ this.attributes.get('id') ~ '_ssid')
!= 'Not Connected' %}
{% set bssid = states('sensor.' ~ this.attributes.get('id') ~ '_bssid') %}
{% set ssid = states('sensor.' ~ this.attributes.get('id') ~ '_ssid') %}
{{ssid}} - {{bssid}}
{% else %}
{{states('sensor.' ~ this.attributes.get('id') ~ '_connection_type')}}
{% endif %}
icon: >
{% if states('sensor.' ~ this.attributes.get('id') ~ '_ssid')
!= 'Not Connected' %} mdi:router-wireless
{% else %} mdi:wifi-off
{% endif %}
attributes:
id: marijn
which simply have in an anchor for all of mobile devices…
- unique_id: map_connection_ipad_pro
<<: *map_connection
attributes:
id: ipad_pro
(even use my custom-ui to have the icons colored with
homeassistant:
customize_glob:
sensor.map_connection_*:
hide_attributes: templates
templates:
icon_color: >
if (state === 'Cellular') return 'skyblue';
if (state === 'Not Connected') return 'grey';
return 'green';
but thats not core HA…)
you could even map the available wifi said’s in that template, but I took it out, because of practical usefulness, I dont want all of those networks tracked in the first place
tbh, I said, “I have used” in the first sentence above… but I should be more specific: I still have these live in the dashboard, but I never check any of these.
so, I guess, my ask would be: what is your endgoal with it?