Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. (gelöst)USV

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    (gelöst)USV

    This topic has been deleted. Only users with topic management privileges can see it.
    • ostseereiter
      ostseereiter @Homoran last edited by

      @homoran sagte in USV:

      heisst deine nicht serverups?

      ja so heißt sie

      1 Reply Last reply Reply Quote 0
      • ostseereiter
        ostseereiter last edited by

        reagieren tut der server schon.

        
        andy@debian:~$ sudo upsd -c stop
        Network UPS Tools upsd 2.7.4
        andy@debian:~$ sudo upsd
        Network UPS Tools upsd 2.7.4
        fopen /var/run/nut/upsd.pid: No such file or directory
        listening on 127.0.0.1 port 3493
        listening on ::1 port 3493
        Connected to UPS [serverups]: usbhid-ups-serverups
        
        
        Homoran 1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @ostseereiter last edited by Homoran

          @ostseereiter sagte in USV:

          reagieren tut der server schon.

          @ostseereiter sagte in USV:

          listening on 127.0.0.1 port 3493 listening on ::1 port 3493

          du hast ja doch schon die Datei editiert!

          und kommt die Liste der Werte, wenn du deine USV aufrufst?

          ostseereiter 1 Reply Last reply Reply Quote 0
          • ostseereiter
            ostseereiter @Homoran last edited by

            @homoran nein da kommt dann das er die nicht kennt

            Homoran 1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @ostseereiter last edited by Homoran

              @ostseereiter sagte in USV:

              das er die nicht kennt

              wiel du wahrscheinlich immer noch nach der UPS mit Namen ups fragst.
              aber deine heisst doch serverups

              Hattest du den Befehl angepasst?

              ostseereiter 1 Reply Last reply Reply Quote 0
              • ostseereiter
                ostseereiter @Homoran last edited by

                @homoran
                ja jetzt ist der Groschen gefallen. lach OOH man ich bin doch ein DAU

                andy@debian:~$ sudo upsc serverups@localhost
                Init SSL without certificate database
                battery.charge: 98
                battery.charge.low: 20
                battery.runtime: 3292
                battery.type: PbAc
                device.mfr: EATON
                device.model: Eaton 3S 850
                device.serial: Blank
                device.type: ups
                driver.name: usbhid-ups
                driver.parameter.pollfreq: 30
                driver.parameter.pollinterval: 2
                driver.parameter.port: auto
                driver.parameter.synchronous: no
                driver.version: 2.7.4
                driver.version.data: MGE HID 1.39
                driver.version.internal: 0.41
                input.transfer.high: 264
                input.transfer.low: 184
                outlet.1.desc: PowerShare Outlet 1
                outlet.1.id: 1
                outlet.1.status: on
                outlet.1.switchable: no
                outlet.desc: Main Outlet
                outlet.id: 0
                outlet.switchable: yes
                output.frequency.nominal: 50
                output.voltage: 230.0
                output.voltage.nominal: 230
                ups.beeper.status: enabled
                ups.delay.shutdown: 20
                ups.delay.start: 30
                ups.firmware: 02.06.0009
                ups.load: 6
                ups.mfr: EATON
                ups.model: Eaton 3S 850
                ups.power.nominal: 850
                ups.productid: ffff
                ups.serial: Blank
                ups.status: OL
                ups.timer.shutdown: 0
                ups.timer.start: 0
                ups.type: offline / line interactive
                ups.vendorid: 0463
                andy@debian:~$
                
                
                
                Homoran 1 Reply Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @ostseereiter last edited by Homoran

                  @ostseereiter sagte in USV:

                  OOH man ich bin doch ein DAU

                  Naja 😉

                  Ich war ja schon ein klein wenig gemein, aber du solltest schon versuchen halbwegs zu verstehen, was du da tust.


                  sieht doch gut aus!

                  Und jetzt weitermachen

                  ostseereiter 1 Reply Last reply Reply Quote 0
                  • ostseereiter
                    ostseereiter @Homoran last edited by ostseereiter

                    @homoran
                    jetzt kommt dieser Befehl sudo nano /etc/nut/upsd.conf
                    und da soll ich dann dies eintragen :

                    LISTEN 127.0.0.1 3493
                    LISTEN 192.168.178.123 3493
                    
                    

                    also so dann weil es ja mein Server ist

                    andy@debian:~$ sudo nano /etc/nut/upsd.conf
                      GNU nano 3.2                  /etc/nut/upsd.conf                   Verändert
                    
                    # CERTREQUEST REQUIRE
                    #
                    # When compiled with SSL support with NSS backend and client certificate
                    # validation (disabled by default, see 'docs/security.txt'),
                    # you can specify if upsd requests or requires client's' certificates.
                    # Possible values are :
                    #  - 0 to not request to clients to provide any certificate
                    #  - 1 to require to all clients a certificate
                    #  - 2 to require to all clients a valid certificate
                    #
                    # See 'docs/security.txt' or the Security chapter of NUT user manual
                    # for more information on the SSL support in NUT.
                    
                    LISTEN 127.0.0.1 3493
                    LISTEN 192.168.178.109 3493
                    
                    

                    einfach in ein freies Feld?

                    Ich denke das war richtig denn nach erneuten stoppen und starten kam diese Ausgabe:

                    
                    andy@debian:~$ sudo nano /etc/nut/upsd.conf
                    andy@debian:~$ sudo upsd -c stop
                    [sudo] Passwort für andy:
                    Network UPS Tools upsd 2.7.4
                    andy@debian:~$ sudo upsd
                    Network UPS Tools upsd 2.7.4
                    fopen /var/run/nut/upsd.pid: No such file or directory
                    listening on 192.168.178.109 port 3493
                    listening on 127.0.0.1 port 3493
                    Connected to UPS [serverups]: usbhid-ups-serverups
                    andy@debian:~$
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • ostseereiter
                      ostseereiter last edited by

                      So Freunde weiter gehts
                      udo nano /etc/nut/upsd.users
                      habe ich folgendes festgelegt.

                      [upsmaster]
                              password = xxxxxxx
                              actions = SET
                              instcmds = ALL
                              upsmon master
                       
                      [raspiuser]
                      	password = xxxxx
                      	upsmon slave
                       
                      [upskino]
                              password  = xxxx
                              upsmon slave
                      

                      dann unter sudo nano /etc/nut/upsmon.conf

                      MONITOR serverups@localhost 1 upsmaster xxxxxxx master
                      
                      MONITOR serverups@192.168.178.109 1 raspiuser xxxx slave
                      MONITOR serverups@192.168.178.109 1 upskino xxxx slave
                      

                      Dann den Dienst neu gestartet mit sudo systemctl restart nut-client
                      Da kam diese Meldung

                      See "systemctl status nut-monitor.service" and "journalctl -xe" for details.
                      

                      gebe ich nun diesen Befehl ein sudo upsc serverups@localhost
                      kommt diese Meldung

                       sudo upsc serverups@localhost
                      Init SSL without certificate database
                      Error: Driver not connected
                      
                      

                      nu weiß ich nicht mehr weiter.

                      crunchip 1 Reply Last reply Reply Quote 0
                      • crunchip
                        crunchip Forum Testing Most Active @ostseereiter last edited by

                        @ostseereiter sagte in USV:

                        kommt diese Meldung

                        hast du irgendwo noch eine # entfernt in der /etc/nut/upsd.conf ? da sollte nur deine zwei Listen....ohne '# sein

                        irgendwie finde ich bei deinen Schritten nicht die Änderung der /etc/nut/nut.conf
                        da muss noch folgendes rein

                        MODE=netserver
                        
                        ostseereiter 1 Reply Last reply Reply Quote 0
                        • ostseereiter
                          ostseereiter @crunchip last edited by

                          @crunchip
                          in der /etc/nut/upsd.conf
                          habe ich jetzt zwei Listen drin ich dachte es müssen alle Rechner rein die man überwachen will.also habe ich den Raspi wieder raus
                          nun steht da nur noch das:

                          LISTEN 127.0.0.1 3493
                          LISTEN 192.168.178.109 3493
                          

                          und in der /etc/nut/nut.conf steht diese beiden Sachen drin.

                          MODE=netserver
                          MODE=client
                          
                          crunchip 1 Reply Last reply Reply Quote 0
                          • crunchip
                            crunchip Forum Testing Most Active @ostseereiter last edited by

                            @ostseereiter sagte in USV:

                            und in der /etc/nut/nut.conf steht diese beiden Sachen drin.

                            beides zusammen in ein und der selben Datei??
                            server gehört da rein wo die USV dran hängt
                            client bei allen anderen Geräten, die entsprechend mit gesteuert werden sollen

                            @ostseereiter sagte in USV:

                            ich dachte es müssen alle Rechner rein

                            nein nur dein Server

                            ostseereiter 1 Reply Last reply Reply Quote 0
                            • ostseereiter
                              ostseereiter @crunchip last edited by

                              @crunchip sagte in USV:

                              beides zusammen in ein und der selben Datei??

                              Ja habe ich dann rausgenommen
                              in welcher Datei kommt dann die Clients?

                              crunchip 1 Reply Last reply Reply Quote 0
                              • crunchip
                                crunchip Forum Testing Most Active @ostseereiter last edited by

                                @ostseereiter sagte in USV:

                                in welcher Datei kommt dann die Clients?

                                du musst doch an jedem Gerät/Rechner den du mit steuern möchtest, ebenfalls dieses ausführen

                                Clients / Slaves einrichten (z.B. Server, andere Computer)
                                
                                Zuerst müssen auf einem Client die notwendigen Pakete installiert werden:
                                
                                sudo apt-get install nut-client
                                
                                Diesmal müssen wir nur zwei Dateien editieren. In der /etc/nut/nut.conf legen wir den Modus fest:
                                
                                MODE=netclient
                                
                                Danach müssen wir wieder upsmon sagen, welche UPS er überwachen soll (in /etc/nut/upsmon.conf):
                                
                                MONITOR gxt4@192.168.1.2 upsremote geheim slave
                                
                                Die IP und das Passwort müssen natürlich noch angepasst werden. Bitte auch das slave am Ende beachten! Zuletzt noch den entsprechenden Service neu starten und überprüfen, ob alles läuft:
                                
                                $ sudo systemctl restart nut-client
                                $ sudo systemctl status nut-client
                                
                                ostseereiter 1 Reply Last reply Reply Quote 0
                                • ostseereiter
                                  ostseereiter @crunchip last edited by

                                  @crunchip sagte in USV:

                                  sudo systemctl status nut-client

                                  Ja nun habe ich auf den Client das installiert und natürlich eingetragen in den beiden Dateien
                                  dann gestartet. und geschaut ob es läuft dabei kam das raus.

                                  pi@SVPi-hole:~ $ sudo systemctl restart nut-client
                                  Job for nut-monitor.service failed because the control process exited with error                                                                                                              code.
                                  See "systemctl status nut-monitor.service" and "journalctl -xe" for details.
                                  pi@SVPi-hole:~ $ sudo systemctl status nut-client
                                  ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown co
                                     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor pres
                                     Active: failed (Result: exit-code) since Fri 2021-05-21 09:30:38 CEST; 17s ag
                                    Process: 9283 ExecStart=/sbin/upsmon (code=exited, status=1/FAILURE)
                                  
                                  May 21 09:30:38 SVPi-hole systemd[1]: Starting Network UPS Tools - power device
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: fopen /var/run/nut/upsmon.pid: No such f
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Using power down flag file /etc/killpowe
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Unable to use old-style MONITOR line wit
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Convert it and add a username to upsd.us
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Fatal error: unusable configuration
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Network UPS Tools upsmon 2.7.4
                                  May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Control process exite
                                  May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Failed with result 'e
                                  May 21 09:30:38 SVPi-hole systemd[1]: Failed to start Network UPS Tools - power
                                  lines 1-15/15 (END)...skipping...
                                  ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
                                     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
                                     Active: failed (Result: exit-code) since Fri 2021-05-21 09:30:38 CEST; 17s ago
                                    Process: 9283 ExecStart=/sbin/upsmon (code=exited, status=1/FAILURE)
                                  
                                  May 21 09:30:38 SVPi-hole systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: fopen /var/run/nut/upsmon.pid: No such file or directory
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Using power down flag file /etc/killpower
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Unable to use old-style MONITOR line without a username
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Convert it and add a username to upsd.users - see the documentation
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Fatal error: unusable configuration
                                  May 21 09:30:38 SVPi-hole upsmon[9283]: Network UPS Tools upsmon 2.7.4
                                  May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Control process exited, code=exited, status=1/FAILURE
                                  May 21 09:30:38 SVPi-hole systemd[1]: nut-monitor.service: Failed with result 'exit-code'.
                                  May 21 09:30:38 SVPi-hole systemd[1]: Failed to start Network UPS Tools - power device monitor and shutdown controller.
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  ~
                                  lines 1-15/15 (END)
                                  
                                  
                                  crunchip Homoran 2 Replies Last reply Reply Quote 0
                                  • crunchip
                                    crunchip Forum Testing Most Active @ostseereiter last edited by crunchip

                                    @ostseereiter irgendwo hast du etwas falsch eingetragen und daher läuft dein service nicht

                                    prüfe doch mal da(Server), wo deine USV dran hängt, das muss erst mal korrekt laufen

                                    sudo systemctl status nut-server
                                    sudo systemctl status nut-client
                                    

                                    danach an deinem Client(SLave) die config überprüfen, ob alles richtig eingetragen ist, danach

                                    sudo systemctl restart nut-client
                                    sudo systemctl status nut-client
                                    

                                    was mir noch aufgefallen ist, deine 3 user,

                                    upsmaster]
                                            password = xxxxxxx
                                            actions = SET
                                            instcmds = ALL
                                            upsmon master
                                    
                                    [raspiuser]
                                    	password = xxxxx
                                    	upsmon slave
                                     
                                    [upskino]
                                            password  = xxxx
                                            upsmon slave
                                    

                                    reichen eigentlich 2, einmal master, einmal slave, diese musst du ja in der jeweiligen .conf hinterlegen

                                    ostseereiter 1 Reply Last reply Reply Quote 0
                                    • ostseereiter
                                      ostseereiter @crunchip last edited by

                                      @crunchip OK ich kontrolliere noch mal alles und dokumentiere das dann hier.

                                      1 Reply Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @ostseereiter last edited by

                                        @ostseereiter sagte in USV:

                                        Ja nun habe ich auf den Client das installiert und natürlich eingetragen in den beiden Dateien

                                        was installiert und was eingetragen?

                                        In den Clients muss natürlich was anderes in den config-Dateien stehen, als im Server

                                        ostseereiter 1 Reply Last reply Reply Quote 0
                                        • ostseereiter
                                          ostseereiter @Homoran last edited by

                                          @homoran ja ich dokumentiere noch mal alles schritt für Schritt melde mich dann wieder.

                                          1 Reply Last reply Reply Quote 0
                                          • ostseereiter
                                            ostseereiter last edited by

                                            So hier nochmal die einzelnen Schritte.

                                            In der sudo nano /etc/nut/ups.conf
                                            habe ich das eingetragen außer den pollinterval nicht.

                                            #
                                            # The general form is:
                                            #
                                             [serverups]
                                                   driver = usbhid-ups
                                                     port = auto
                                                    desc = "Eeaton UPS"
                                            #
                                            # The section header ([upsname]) can be just about anything as long as
                                            # it is a single word inside brackets.  upsd uses this to uniquely
                                            # identify a UPS on this system.
                                            

                                            in der sudo nano /etc/nut/nut.conf das

                                            # IMPORTANT NOTE:
                                            #  This file is intended to be sourced by shell scripts.
                                            #  You MUST NOT use spaces around the equal sign!
                                            
                                            MODE=netserver
                                            

                                            nun kommt sudo nano /etc/nut/upsd.conf da habe ich das drin

                                            # you can specify if upsd requests or requires client's' certificates.
                                            # Possible values are :
                                            #  - 0 to not request to clients to provide any certificate
                                            #  - 1 to require to all clients a certificate
                                            #  - 2 to require to all clients a valid certificate
                                            #
                                            # See 'docs/security.txt' or the Security chapter of NUT user manual
                                            # for more information on the SSL support in NUT.
                                            
                                            LISTEN 127.0.0.1 3493
                                            LISTEN 192.168.178.109 3493
                                            

                                            nun die Benutzerkonten ich nehme gleich den 3 raus.sudo nano /etc/nut/upsd.users

                                            
                                            # MONITOR myups@localhost 1 upsmon pass master  (or slave)
                                            [upsmaster]
                                             password = test
                                             actions = SET
                                             instcmds = ALL
                                             upsmon master
                                            
                                            [raspiuser]
                                             password = secret
                                             upsmon slave
                                            

                                            in der sudo nano /etc/systemd/system/multi-user.target.wants/nut-server.service steht das:

                                            Wants=nut-driver.service
                                            Before=nut-monitor.service
                                            
                                            [Service]
                                            ExecStartPre=/bin/sleep 30
                                            ExecStart=/sbin/upsd
                                            Type=forking
                                            
                                            [Install]
                                            WantedBy=multi-user.target
                                            

                                            Jetzt das Monitoring sudo nano /etc/nut/upsmon.conf
                                            da habe ich diese Zeile hinzugefügt:

                                            
                                            MONITOR serverups@localhost 1 upsmaster test master
                                            

                                            Dann habe ich den dienst neugestartet mit sudo systemctl restart nut-server
                                            mit

                                            andy@debian:~$ sudo systemctl restart nut-server
                                            

                                            Dann kam dieses bei raus

                                            Warning: The unit file, source configuration file or drop-ins of nut-server.service changed on disk. Run 'systemctl daemon-reload' to reload units.
                                            Job for nut-server.service failed because the control process exited with error code.
                                            See "systemctl status nut-server.service" and "journalctl -xe" for details. 
                                            

                                            Nun sollte der Server eingerichtet sein

                                            Jetzt gehen wir zu den Client der Raspi
                                            dort habe ich erst mal installiert mit sudo apt install nut-client
                                            jetzt editiert mit sudo nano /etc/nut/nut.conf
                                            dort steht drin

                                            # - netserver: same as for the standalone configuration, but also need
                                            #   some more network access controls (firewall, tcp-wrappers) and possibly a
                                            #   specific LISTEN directive in upsd.conf.
                                            #   Since this MODE is opened to the network, a special care should be applied
                                            #   to security concerns.
                                            # - netclient: this mode only requires upsmon.
                                            #
                                            # IMPORTANT NOTE:
                                            #  This file is intended to be sourced by shell scripts.
                                            #  You MUST NOT use spaces around the equal sign!
                                            
                                            MODE=netclient
                                            

                                            jetzt diese Datei sudo nano /etc/nut/upsmon.conf

                                            When compiled with SSL, specify that a secured connection must be used
                                            # to communicate with upsd.
                                            # If you don't use 'CERTVERIFY 1', then this will at least make sure
                                            # that nobody can sniff your sessions without a large effort.  Setting
                                            # this will make upsmon drop connections if the remote upsd doesn't
                                            # support SSL, so don't use it unless all of them have it running.
                                            # When compiled with NSS support of SSL, can be overriden for host
                                            # specified with a CERTHOST directive.
                                            MONITOR serverups@192.168.178.109 1 raspiuser testslave
                                            

                                            nun den Clientserver neu starten mit sudo systemctl restart nut-client
                                            jetzt kommt diese Ausgabe.

                                            pi@SVPi-hole:~ $ sudo systemctl restart nut-client
                                            
                                            Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:03:50 2021):
                                            
                                            Communications with UPS serverups@192.168.178.109 lost
                                            
                                            
                                            Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:03:55 2021):
                                            
                                            UPS serverups@192.168.178.109 is unavailable
                                            

                                            und nach einer gewissen Zeit diese Ausgabe

                                            pi@SVPi-hole:~ $ ^C
                                            
                                            Broadcast message from nut@SVPi-hole (somewhere) (Fri May 21 11:09:00 2021):
                                            
                                            UPS serverups@192.168.178.109 is unavailable
                                            
                                            Homoran crunchip 3 Replies 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

                                            887
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            9
                                            135
                                            11183
                                            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