Giter VIP home page Giter VIP logo

unifi's Introduction

unifi GoDoc Build Status Coverage Status Report Card

Package unifi implements a client for the Ubiquiti UniFi Controller v4 and v5 API. MIT Licensed.

unifi's People

Contributors

akramer avatar dougbishop avatar mdlayher avatar nickvanw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unifi's Issues

Device stats API not returning whole bytes?

This really doesn't make sense to me, but then again, it is Ubiquiti.

I was trying to use your unfi_exporter for pulling stats into Prometheus, but was getting a weird type conversion error. When I traced it down, I found that on my controller (v5.5.7), the API endpoint for device stats is returning the stats.bytes field as a float64 rather than an int64. I don't know how partial bytes work, but ok.

At the top level, I see "bytes": 4710984, but then down within stats, I see "bytes": 4710984.8.

I also found it doing it with packets. It is kind of odd. I got around it by changing the raw object returned to use float64 for everything, then had it convert them to int64 when populating the public object.

I did see controller 5.5.9 is out, so may try it. I might also then fall back down to the stable 5.4.11 release. I was trying out the RCs, but don't know if they did some API breakage.

Unifi 5.7.20 Support

Hey @mdlayher! I'm not sure if you heard, but it looks like 5.7.20 has been fully released as stable: https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-5-7-20-Release-Update/ba-p/2278500

I upgraded on a whim today and it looks like there are a few changes in the API responses in places - at least enough that I noticed unifi_exporter wasn't collecting some stats.

If you haven't updated already, I wouldn't advise updating quite yet - if we all run the new version, there's nobody around to save API responses for 5.6.xx so that we can make sure it's as backwards compatible as possible (if that's a goal of yours).

Either way, I'll probably be taking a look at this over the next few days as I get it working on my local network, and look to see if I can find any other obvious places that it's not working. I don't expect you to do any work right now, but I wanted to flag this for you so you knew not to update, and so you'd know to expect a PR sometime this week hopefully.

Let me know if that works for you and if you'd be open to accepting PRs for it!

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.