Giter Club home page Giter Club logo

Comments (12)

Kane610 avatar Kane610 commented on September 26, 2024 1

It sounds like you’re saying it should be available already, but I don’t see a device tracker for my UDMP.

Device trackers in Home Assistant is disabled by default, it would be automatically enabled if there were other entities for the same device reported. In your case Im assuming you do not have other entities for your UDMP. You can look in your registry for enabling the UDMP device tracker entity.

If that is not the case you might have disabled device entities more explicitly?

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024 1

Thanks. I found it after enabling that setting.

Since it only includes the IP, that probably won’t be enough for me to detect that I’m on failover internet. I see more info in the diagnostics download for the device. That shows things like which uplink is active able status for the wan ports. I expect this means the data is available to expose via this library or accessible from HASS already. I’ll take a deeper look later.

I’m really looking to automatically turn on certain traffic rules when I’m on failover internet to better manage my bandwidth. The new patch for traffic rules brings me close with my current way of sensing the outage, but it’d be better if I could get it all from the router.

from aiounifi.

Kane610 avatar Kane610 commented on September 26, 2024 1

I’m really looking to automatically turn on certain traffic rules when I’m on failover internet to better manage my bandwidth. The new patch for traffic rules brings me close with my current way of sensing the outage, but it’d be better if I could get it all from the router.

It would be nice once you've achieved this to write up a post about it :)

from aiounifi.

Kane610 avatar Kane610 commented on September 26, 2024

Could I ask if the IP attribute of my UDM device_tracker entity (the WAN address) is obtained via the same way you're getting the temperature of the device?

Yes, its all from the same source, its sent over web socket so what information is available in the controller ui should be reflected in home assistant. Fail over to LTE is that on a different wan port or how does your setup look?

If you want to look at what data you get when falling back to LTE you can enable debug logging for the integration or run the library cli from the terminal.

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024

I’ve been looking to do something similar here. I’m using a remote rest api for getting my IP as well, but this sounds better.

It sounds like you’re saying it should be available already, but I don’t see a device tracker for my UDMP.

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024

OP, if the UniFi LTE is special in some way, you should be able to do something like I am today using a rest sensor:

- resource: https://ipinfo.io/json
  scan_interval: 90
  sensor:
    - name: Public IP
      icon: mdi:ip
      json_attributes:
        - city
        - region
        - country
        - org
      value_template: "{{ value_json.ip }}"

Is faster than your router updating your ddns and then pulling that back down via another polling interval. This is updated every 90s. Can’t go faster or you hit the free tier daily limit.

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024

Is there already someone working on adding Traffic Rules to Home Assistant? If not, I can start a PR.

from aiounifi.

Kane610 avatar Kane610 commented on September 26, 2024

Is there already someone working on adding Traffic Rules to Home Assistant? If not, I can start a PR.

If anyone it would most probably be @herriejr but I don't know if he's gotten to start that yet.

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024

Cool. I started one. Wrapping up tests now.

from aiounifi.

ViViDboarder avatar ViViDboarder commented on September 26, 2024

FYI: home-assistant/core#104671

from aiounifi.

herriejr avatar herriejr commented on September 26, 2024

I've got a working version locally running, but I hadn't gotten around to writing tests. I'll try commit my changes to my repo today, so we can compare notes. ;-)

from aiounifi.

herriejr avatar herriejr commented on September 26, 2024

You can find my code on https://github.com/herriejr/home-assistent-core/tree/dev/homeassistant/components/unifi/

from aiounifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.