ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Unifi AP Export

    IT Discussion
    5
    11
    1575
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • hobbit666
      hobbit666 last edited by

      Does Any one know of a easy way to get a list of all AP's and their IP address from a unifi controller?

      Or care to give me a tutorial on how if not simple 🙂

      travisdh1 Romo 2 Replies Last reply Reply Quote 0
      • travisdh1
        travisdh1 @hobbit666 last edited by

        @hobbit666 said in Unifi AP Export:

        Does Any one know of a easy way to get a list of all AP's and their IP address from a unifi controller?

        Or care to give me a tutorial on how if not simple 🙂

        Login, open Devices on the left. Make sure All is selected up top.

        a6f17338-64bd-4ab8-90af-ed730ba59bf5-image.png

        DustinB3403 1 Reply Last reply Reply Quote 0
        • DustinB3403
          DustinB3403 @travisdh1 last edited by

          @travisdh1 I believed @hobbit666 was looking to get a spreadsheet of AP's from a controller.

          hobbit666 1 Reply Last reply Reply Quote 0
          • hobbit666
            hobbit666 @DustinB3403 last edited by

            @DustinB3403 said in Unifi AP Export:

            @travisdh1 I believed @hobbit666 was looking to get a spreadsheet of AP's from a controller.

            Correct, i need to create a CSV file of all the APs with their IP address to import into Zabbix 🙂

            @travisdh1 That only show the AP's for one site. Sorry should of mentioned "all" from "all" sites

            1 Reply Last reply Reply Quote 1
            • Dashrender
              Dashrender last edited by

              I just tried changing to List view and copy the page and past in Excel - the IP's didn't come with it.. weird and suck.

              1 Reply Last reply Reply Quote 0
              • Romo
                Romo @hobbit666 last edited by Romo

                @hobbit666 said in Unifi AP Export:

                Does Any one know of a easy way to get a list of all AP's and their IP address from a unifi controller?

                Or care to give me a tutorial on how if not simple 🙂

                You are going to need to use an api client most likely to get the info out, https://github.com/Art-of-WiFi/
                Unifi-Api-Browser: https://unificontrol.readthedocs.io/en/latest/index.html
                Unifi-Api-Client: https://github.com/Art-of-WiFi/UniFi-API-client

                f512030e-60c0-41db-a07b-caf0c9f24cf7-image.png
                You can use the Api Browser which is a php site to get your json list of all the devices and then parse it yourself into a csv, or use the client directly to get the values you want.

                I also use https://unificontrol.readthedocs.io/en/latest/index.html which is a python3 version based on the work of hte Unifi-Api-Client above listed, and just get the values I want with it.

                This just getting the list of devices from the default site, but you could go through all your sites and get all devices
                57faabfc-f1fa-456e-bdad-10ec91fe777b-image.png

                import ssl
                 import unificontrol
                client = unificontrol.UnifiClient(host="UNIFI_CONTROLLER",username="UNIFI_CONTROLLER_USERNAME",password="UNIFI_CONTROLLER_PASSWORD",site="default",cert=cert)
                devices = client.list_devices()
                 
                for i in range(len(devices)):
                ...   print ("Name,IP")
                ...   print (devices[i].get('name') + "," + devices[i].get('ip'))
                ... 
                # Results
                Name,IP
                G&G Main Room,10.10.10.101
                >>> 
                
                
                hobbit666 1 Reply Last reply Reply Quote 4
                • Romo
                  Romo last edited by Romo

                  Community effort, but you can also find the several api endpoints directly from https://ubntwiki.com/products/software/unifi-controller/api, if you dont want to use any sort of client and just want the json directly.

                  List all your sites
                  /api/self/sites
                  
                  List all devices from a specific site
                  /api/s/SITE_NAME/stat/device
                  
                  1 Reply Last reply Reply Quote 2
                  • hobbit666
                    hobbit666 last edited by

                    @Romo
                    Thanks will give that a go if i get time this afternoon

                    1 Reply Last reply Reply Quote 0
                    • hobbit666
                      hobbit666 @Romo last edited by hobbit666

                      @Romo said in Unifi AP Export:

                      @hobbit666 said in Unifi AP Export:

                      I also use https://unificontrol.readthedocs.io/en/latest/index.html which is a python3 version based on the work of hte Unifi-Api-Client above listed, and just get the values I want with it.

                      This just getting the list of devices from the default site, but you could go through all your sites and get all devices
                      57faabfc-f1fa-456e-bdad-10ec91fe777b-image.png

                      import ssl
                       import unificontrol
                      client = unificontrol.UnifiClient(host="UNIFI_CONTROLLER",username="UNIFI_CONTROLLER_USERNAME",password="UNIFI_CONTROLLER_PASSWORD",site="default",cert=cert)
                      devices = client.list_devices()
                       
                      for i in range(len(devices)):
                      ...   print ("Name,IP")
                      ...   print (devices[i].get('name') + "," + devices[i].get('ip'))
                      ... 
                      # Results
                      Name,IP
                      G&G Main Room,10.10.10.101
                      >>> 
                      
                      

                      What OS are you using for your controller. Having a few issues with mine Debian GNU/Linux 10 install

                      Romo 1 Reply Last reply Reply Quote 0
                      • Romo
                        Romo @hobbit666 last edited by

                        @hobbit666 You mean issues talking about the whole controller or using the api clients? The api clients where not meant to be used directly in the controller.

                        My personale controller is still on Debian 9, and my desktop is Kubuntu 20.04, this is where I connected from using unificontrol

                        hobbit666 1 Reply Last reply Reply Quote 1
                        • hobbit666
                          hobbit666 @Romo last edited by

                          @Romo said in Unifi AP Export:

                          @hobbit666 You mean issues talking about the whole controller or using the api clients? The api clients where not meant to be used directly in the controller.

                          My personale controller is still on Debian 9, and my desktop is Kubuntu 20.04, this is where I connected from using unificontrol

                          Think this is where i was getting confused i was trying to run it from the controller itself. I'll try again tomorrow.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post