Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Unifi Steuern ohne Adapter (Script,SSH)

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Unifi Steuern ohne Adapter (Script,SSH)

    This topic has been deleted. Only users with topic management privileges can see it.
    • crunchip
      crunchip Forum Testing Most Active @drapo last edited by

      @drapo sagte in Adapter: ioBroker.unifi:

      smart ist aus meiner Sicht allerdings

      verstehe ich schon, war ja nur ein alternativ Vorschlag
      vllt wäre das ein weiterer Ansatz, siehe https://forum.iobroker.net/post/751198

      1 Reply Last reply Reply Quote 0
      • Neuschwansteini
        Neuschwansteini @drapo last edited by

        @drapo

        welche Switche hast du denn, ich kann bei meinen den Port enable/disablen, ebenso POE an/aus schalten mit dem unifi-adadpter, das klappt einwandfrei.. schau:
        8f4cb777-9dd9-40fb-8d15-72cd14ec0a24-image.png

        D 1 Reply Last reply Reply Quote 0
        • D
          drapo @Neuschwansteini last edited by

          @ilovegym ich hab ne UDM pro. Das sieht bei mir auch so aus wie bei Dir. Hast Du schon mal versucht manuell den Port auszuschalten? Das wird nicht gehen da die States nicht schreibbar sind. Du siehst das ganz vorne am Schloss Symbol vor jedem Eintrag. Kannst ja mal versuchen von true auf false zu stellen da kommst nicht weit.

          Neuschwansteini 1 Reply Last reply Reply Quote 0
          • Neuschwansteini
            Neuschwansteini @drapo last edited by Neuschwansteini

            @drapo

            Mist, hast recht, ich schalte den POE, aber dafuer gibts n Datenpunkt, der geht auch..
            Dann hilft nur das schalten per ssh, das geht auf jeden Fall.
            Das schoene, hier sind die commands ziemlich gleich den von Cisco, man muss sich nicht umgewoehnen.. 🙂

            SSH muss in der UDM Pro aktiviert werden, dann einfach in den Switch einloggen, und wie gewohnt:
            Edit:
            telnet localhost
            enable
            conf
            interface x/x
            shut

            oder no shut und der port ist wieder up..

            mit show interface siehst du die config

            draexler 1 Reply Last reply Reply Quote 0
            • draexler
              draexler @Neuschwansteini last edited by

              @ilovegym Kann man über ssh auch voucher für gästewlan generieren?

              Neuschwansteini liv-in-sky 2 Replies Last reply Reply Quote 0
              • Neuschwansteini
                Neuschwansteini @draexler last edited by

                @draexler

                Keine Ahnung, ich kenne nur die Switch commands…

                Voucher werden ja von der UDM gemacht, und da sollte es über die API gehen..

                draexler 1 Reply Last reply Reply Quote 0
                • W
                  warp735 last edited by

                  @ilovegym
                  Und die internen Temperaturen der AP´s? Es soll ja wohl auch SNMP gehen, aber ohne Doku kommt man da ja auch nicht weiter 😞

                  Hab einen AP in Garten gehängt und würde gern dessen Temp mal im Hochsommer / Winter überwachen.

                  Neuschwansteini 1 Reply Last reply Reply Quote 0
                  • draexler
                    draexler @Neuschwansteini last edited by

                    @ilovegym: API bzw. über den Adapter geht es leider schon seit einen Jahr nicht mehr. Ob Ubiquiti da den Hahn abgedreht hat oder der Adapter ein Problem hat, keine Ahnung. Issue in GitHub ist auf, aber leider keine Reaktion 😞

                    1 Reply Last reply Reply Quote 0
                    • Neuschwansteini
                      Neuschwansteini @warp735 last edited by

                      @warp735

                      wenn ich mal Zeit hab, schalt ich snmp ein und lass mal n MIB drueber laufen.. dann halt mal durchklicken und schauen, welche States dargestellt werden und welche man setzen kann.. vielleicht geht damit ja auch recht easy Port-up/down etc..

                      Der iobroker hat ja n faehigen snmp adapter.

                      1 Reply Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @draexler last edited by

                        @draexler sagte in Adapter: ioBroker.unifi:

                        @ilovegym Kann man über ssh auch voucher für gästewlan generieren?

                        teste mal das - da kannst du angeblich vouchers anlegen - habe die nicht aktiviert, daher kann ich nicht testen

                        du musst die node-unifi in die zusätzlichen npm module in der js.instanz eintragen

                        const Unifi = require('node-unifi');
                        
                        const unifi = new Unifi.Controller({hostname:"192.168.178.xx",port:'8443', sslverify: false});
                        
                        (async () => {
                          try {
                            // LOGIN
                            const loginData = await unifi.login('user', 'password!');
                            console.log('login: ' + loginData);
                           
                        
                        
                           //const switchmac="b4:fb:e4:f3:96:63"
                            // Get data from a specific unifi device based on MAC address
                            //const deviceData = await unifi.getAccessDevices(switchmac);
                            // Console.log('getAccessDevices: ' + JSON.stringify(deviceData));
                        
                            // Get device id
                            //const deviceId = deviceData[0]._id;
                            //console.log('deviceId: ' + deviceId + ' ip: ' + deviceData[0].ip);
                        
                         // GET SITE STATS
                           // const sites = await unifi.getSitesStats();
                           // console.log('getSitesStats: ' + sites[0].name + ':' + sites.length);
                           // console.log(JSON.stringify(sites));
                        
                            // GET SITE SYSINFO
                           // const sysinfo = await unifi.getSiteSysinfo();
                           // console.log('getSiteSysinfo: ' + sysinfo.length);
                            //console.log(JSON.stringify(sysinfo));
                        
                            // GET CLIENT DEVICES
                          //  const clientData = await unifi.getClientDevices();
                           // console.log('getClientDevices: ' + clientData.length);
                           // console.log(JSON.stringify(clientData));
                        
                            // GET ALL USERS EVER CONNECTED
                            //const usersData = await unifi.getAllUsers();
                            //console.log('getAllUsers: ' + usersData.length);
                            //console.log(JSON.stringify(usersData));
                        
                            const clientVoucher = await unifi.createVouchers(123,1,0,"testthis");
                        
                            // LOGOUT
                            const logoutData = await unifi.logout();
                            console.log('logout: ' + JSON.stringify(logoutData));
                          } catch (error) {
                            console.log('ERROR: ' + error);
                          }
                        })();
                        
                        
                        draexler 1 Reply Last reply Reply Quote 0
                        • draexler
                          draexler @liv-in-sky last edited by

                          @liv-in-sky Hört sich schon mal gut an. Also trage ich einfach in der js.instanz bei den npm Komponenten "node-unifi" ein? Wenn ja, wie geht es dann weiter? Arbeite wie die meisten hier nur mit Blockly...

                          liv-in-sky 2 Replies Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky @draexler last edited by liv-in-sky

                            @draexler sagte in Adapter: ioBroker.unifi:

                            Also trage ich einfach in der js.instanz bei den npm Komponenten "node-unifi" ein?

                            ja

                            Image 056.png
                            eintragen und enter drücken - sonst wird es nicht angenommen - die instanz startet dann neu

                            ansschliessend script anlegen und hostname (zeile3) und user und kennwort (zeile8) anpassen

                            dann:
                            aufrufen und im voucher-admin nachsehen, ob was angekommen ist

                            1 Reply Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @draexler last edited by

                              @draexler

                              Image 057.png

                              hier siehst du was in die klammer der funktion createVouchers kommen muss

                              es müßte reichen, wenn du minutes,count,quota und note einträgst createVouchers(180,1,0,"testthisvoucher");

                              1 Reply Last reply Reply Quote 0
                              • kmxak
                                kmxak Most Active last edited by

                                ich frage mal direkt dazwischen ob man den voucher code auch irgendwo abgreifen kann damit ich den irgendwo darstellen kann und nicht im portal schauen muss

                                liv-in-sky 1 Reply Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky @kmxak last edited by

                                  @kmxak

                                  das selbe script nur mit der funktion - teste mal -- ich hoffe es stimmt so

                                  const myVouchers = await unifi.getVouchers();
                                  console.log("vouchers: "+ myVouchers)
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • kmxak
                                    kmxak Most Active last edited by

                                    mh ich bekomme aktuell Error: failed to detect UniFiOS status

                                    liv-in-sky 1 Reply Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @kmxak last edited by

                                      @kmxak

                                      ich nutze die controller auf linux installiert - hast du den auch

                                      1 Reply Last reply Reply Quote 0
                                      • kmxak
                                        kmxak Most Active last edited by

                                        ne ich hab ne udm pro

                                        liv-in-sky 2 Replies Last reply Reply Quote 0
                                        • liv-in-sky
                                          liv-in-sky @kmxak last edited by

                                          @kmxak

                                          das ist die seite, wo ich die infos her habe - https://github.com/jens-maus/node-unifi

                                          laut diesem issue, sollte es theoretisch funktionieren https://github.com/jens-maus/node-unifi/issues/227

                                          BobFrankston created this issue in jens-maus/node-unifi

                                          open UDM Pro seems to need a URL without a port number #227

                                          1 Reply Last reply Reply Quote 0
                                          • liv-in-sky
                                            liv-in-sky last edited by

                                            wer interesse hat, was alles gehen sollte

                                            https://github.com/jens-maus/node-unifi/blob/master/unifi.js

                                            bei mir werden rechts die ganzen funktionen angezeigt:

                                            Image 059.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            836
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            16
                                            152
                                            10919
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo