Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Akku Zustand Proxmox Laptop abfragen

    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

    Akku Zustand Proxmox Laptop abfragen

    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      biker1602 @wendy2702 last edited by

      @wendy2702 said in Akkustand vom Laptop auslesen:

      Lege dir doch bitte einen eigenen User an und fummel nicht als "root" rum

      Das habe ich nicht selber gemacht. Ich habe Proxmox installiert, dann als LXC Container Ubuntu und den iobroker installiert.
      Sag mal, die IP-Adresse ist doch vom LXC Container oder vom Proxmox Server?
      Unter Objekte sagt er nämlich. is_online als false.

      693aff93-5d02-4284-88ad-ecc14dc2e658-grafik.png

      wendy2702 1 Reply Last reply Reply Quote 0
      • wendy2702
        wendy2702 @biker1602 last edited by

        @biker1602 Egal wie installiert legt man sich einen User an und arbeitet nicht als "root"

        Adresse muss die vom Proxmox Server sein.

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

          @biker1602

          auf dem iob server den simple api adapter installieren

          dann in crontab -e jede minute einen befehl ausführen
          der befehl ist ein bash script, welches die "80 %" ausliest und über curl an den simple api sendet - das script muss "ausführbar" gemacht werden

          beispiel script (ungetestet) und in crontab aufrufen

          #!/bin/bash
          batt=`acpi --ac-adapter --battery| grep Battery -m 1 | awk '{print $4}' | sed 's/%//g'`
            curl "http://192.168.178.59:8087/set/0_userdata.0.CONTROL-OWN.mount.Batt?value=$batt"
          
          B 1 Reply Last reply Reply Quote 0
          • B
            biker1602 @liv-in-sky last edited by

            @liv-in-sky das bekomne ich nicht so hin. Da bin ich nicht fit genug in Sachen Linux. Unter dem Proxmox Adapter funktioniert die Verbindung aber unter dem Linux Adapter bekomme ich keine Verbindung.

            DJMarc75 wendy2702 2 Replies Last reply Reply Quote 0
            • DJMarc75
              DJMarc75 @biker1602 last edited by

              @biker1602 wie wäre es einfach mal wenn Du nochmal folgendes machst:

              @wendy2702 sagte in Akkustand vom Laptop auslesen:

              @biker1602 Vielleicht mit Linux Control Adapter und dann diesen Zeilen:

              0bd6915a-6fd8-48fa-9e56-e1eb89fe1aeb-grafik.png

              acpitool -b | grep "Battery" |   awk ' {print $5}' | sed 's/%,//g'
              acpitool -a
              

              Ergibt bei mir so was:

              3757b8f0-5a81-473c-95ad-91c7986524cb-grafik.png

              Wo liegt denn da das Problem ??????

              1 Reply Last reply Reply Quote 0
              • wendy2702
                wendy2702 @biker1602 last edited by

                @biker1602 sagte in Akkustand vom Laptop auslesen:

                aber unter dem Linux Adapter bekomme ich keine Verbindung.

                Wenn du ein Terminal auf IOB auf hast, kannst du dich mit dem User/Passwort per SSH auf dem Proxmox Host einloggen?

                Kannst du von iob den Proxmox Host per PING erreichen?

                1 Reply Last reply Reply Quote 0
                • B
                  biker1602 last edited by

                  @wendy2702
                  Ich habe jetzt im iobroker einen Terminal Adapter installiert und folgenden Befehl eingegeben und er hat mir Akkustand und Netzteil angeschlossen angezeit.

                  /opt/iobroker$ acpi --ac-adapter --battery
                  
                  Battery 0: Full, 100%
                  Adapter 0: on-line
                  /opt/iobroker$  
                  

                  Das komische ist, wenn ich unter Objekte bei Ping die Geräte sehe, stehen alle bei "false" und ich komme im Terminal mit Ping und der IP-Adresse nicht einmal auf die Fritzbox. Liegt es an Proxmox, weil iobroker in einem LXC Container läuft? Ich habe den mit Proxmox ja erst nur nebenbei auf einem ausrangierten Laptop installiert, da ich noch nie davor etwas mit Proxmox zu tun hatte und der Raspi noch als Hauptserver läuft. Ich wollte es halt erst testen, bevor ich komplett umziehe. Mit meinem Raspi 4 mit 4GB bin ich an die Grenzen nach der Installation auf Debian 11 Bullseye gekommen. Da musste ich wieder zurück auf Version 10.

                  wendy2702 1 Reply Last reply Reply Quote 0
                  • wendy2702
                    wendy2702 @biker1602 last edited by

                    @biker1602 OK. Das mit dem Terminal war zwar anders gemeint aber auch gut.

                    Wenn du einen Container verwendet hast kommt es drauf an wie der eingerichtet wurde und ob die Firewall auch aktiviert wurde. Das wären Möglichkeiten warum andere Sachen nicht erreichbar sind.

                    Wenn du jetzt den LinuxControl Adapter so wie in meinem Screenshots mit der IP von ioBroker Container und den Login daten konfigurierst, was kommt dann im Logfile wenn die Abfrage gemacht wird.

                    Das Loggen für den Adapter bitte auf Debug stellen.

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      biker1602 @wendy2702 last edited by biker1602

                      @wendy2702
                      So ich habe in Proxmox die Firewall deaktiviert im LXC Container mit iobroker war die Firewall aus, Proxmox und iobroker neu gestartet den Adapter auf debug gestellt mit folgendem Ergebnis.

                      2023-01-13 07:25:28.749 - info: linux-control.0 (1108) Got terminate signal TERMINATE_YOURSELF
                      2023-01-13 07:25:28.750 - info: linux-control.0 (1108) cleaned everything up...
                      2023-01-13 07:25:28.751 - info: linux-control.0 (1108) terminating
                      2023-01-13 07:25:28.751 - debug: linux-control.0 (1108) Plugin sentry destroyed
                      2023-01-13 07:25:28.751 - info: linux-control.0 (1108) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
                      2023-01-13 07:25:32.873 - debug: linux-control.0 (1225) Redis Objects: Use Redis connection: 127.0.0.1:9001
                      2023-01-13 07:25:32.962 - debug: linux-control.0 (1225) Objects client ready ... initialize now
                      2023-01-13 07:25:32.964 - debug: linux-control.0 (1225) Objects create System PubSub Client
                      2023-01-13 07:25:32.965 - debug: linux-control.0 (1225) Objects create User PubSub Client
                      2023-01-13 07:25:33.173 - debug: linux-control.0 (1225) Objects client initialize lua scripts
                      2023-01-13 07:25:33.178 - debug: linux-control.0 (1225) Objects connected to redis: 127.0.0.1:9001
                      2023-01-13 07:25:33.258 - debug: linux-control.0 (1225) Redis States: Use Redis connection: 127.0.0.1:9000
                      2023-01-13 07:25:33.337 - debug: linux-control.0 (1225) States create System PubSub Client
                      2023-01-13 07:25:33.338 - debug: linux-control.0 (1225) States create User PubSub Client
                      2023-01-13 07:25:33.542 - debug: linux-control.0 (1225) States connected to redis: 127.0.0.1:9000
                      2023-01-13 07:25:33.956 - debug: linux-control.0 (1225) Plugin sentry Initialize Plugin (enabled=true)
                      2023-01-13 07:25:34.133 - warn: linux-control.0 (1225) Object linux-control.0.command.host is invalid: obj.common.states has an invalid type! Expected "object", received "string"
                      2023-01-13 07:25:34.134 - warn: linux-control.0 (1225) This object will not be created in future versions. Please report this to the developer.
                      2023-01-13 07:25:34.140 - info: linux-control.0 (1225) starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.linux-control, node: v16.19.0, js-controller: 4.0.24
                      2023-01-13 07:25:34.177 - warn: linux-control.0 (1225) Object linux-control.0.command.host is invalid: obj.common.states has an invalid type! Expected "object", received "string"
                      2023-01-13 07:25:34.177 - warn: linux-control.0 (1225) This object will not be created in future versions. Please report this to the developer.
                      2023-01-13 07:25:34.186 - info: linux-control.0 (1225) getting data from Linux (192.168.57.210:22, Adapter start)
                      2023-01-13 07:25:34.203 - info: linux-control.0 (1225) [getConnection] Host 'Linux' (192.168.57.210:22) seems not to be online
                      2023-01-13 07:25:34.203 - debug: linux-control.0 (1225) [getConnection] Host 'Linux' (192.168.57.210:22) ping result: {"inputHost":"192.168.57.210","host":"unknown","alive":false,"output":"","time":"unknown","times":[],"min":"unknown","max":"unknown","avg":"unknown","stddev":"unknown","packetLoss":"unknown"}
                      2023-01-13 07:25:34.390 - debug: linux-control.0 (1225) [refreshHost] Linux (192.168.57.210:22): button 'linux-control.0.Linux.refresh' subscribed
                      
                      
                      

                      Beim Ping Adapter das gleiche alle false
                      Per Putty komme ich auf den ioBroker

                      wendy2702 1 Reply Last reply Reply Quote 0
                      • wendy2702
                        wendy2702 @biker1602 last edited by

                        @biker1602 sagte in Akkustand vom Laptop auslesen:

                        192.168.57.210

                        Welche IP ist das?

                        Wurden Objekte angelegt und befüllt?

                        Wie sieht der Container aus:

                        7b92e283-bbbd-4e0a-b8ff-8524c147858b-grafik.png

                        Nochmal, wenn du mit Putty auf ioBroker bist kannst du den acpi Befehl ausführen ? Wenn ja was ist davon die Ausgabe?

                        Wenn du mit Putty auf iobroker bist kannst du dich von da per SSH auf Proxmox anmelden:

                        ssh <dein user>@<deine Proxmox IP>
                        

                        Und noch was anderes, vielleicht einfacher: Warum nimmst du den Akku nicht einfach aus dem Rechner wenn das geht. Wäre mir sicherer als Strom aus/an. Wenn das mal nicht sauber funktioniert liegt der Server flach.

                        B 2 Replies Last reply Reply Quote 0
                        • B
                          biker1602 @wendy2702 last edited by

                          @wendy2702
                          die 192.168.78.210 ist die IP vom Iobroker.
                          Wurden Objekte angelegt und befüllt? Da weiß ich leider nicht, was du meinst.

                          So sieht der Container aus.

                          484bfd02-4028-4831-9c6d-35fa7882890f-grafik.png

                          Wenn ich mich mit Putty auf den iobroker einlogge und dann auf den Proxmox möchte kommt folgende Meldung

                          The authenticity of host '192.168.57.3 (192.168.57.3)' can't be established.
                          ED25519 key fingerprint is SHA256:si4tobOJn0oRIAMljoYi/KTHtv0sMMYRwLLGvkhdUsA.
                          This key is not known by any other names
                          Are you sure you want to continue connecting (yes/no/[fingerprint])?
                          
                          
                          

                          wenn ich bei Putty in der Konsole den Befehl eingebe, bekomme ich folgende Rückmeldung

                          acpi --ac-adapter --battery
                          Battery 0: Discharging, 75%, 03:16:38 remaining
                          Adapter 0: off-line
                          root@iobroker:~#

                          wendy2702 1 Reply Last reply Reply Quote 0
                          • B
                            biker1602 @wendy2702 last edited by

                            @wendy2702 said in Akkustand vom Laptop auslesen:

                            Wurden Objekte angelegt und befüllt?

                            Du meinst im Iobroker richtig?
                            Unter Objekte bei Proxmox wurde alles befüllt.
                            01baa5ec-404c-4348-9348-e1d3ca667cb2-grafik.png

                            Unter Linux Objekte allerdings nicht
                            5490af76-dd9e-4ab7-a23e-3812339c8b24-grafik.png

                            1 Reply Last reply Reply Quote 0
                            • wendy2702
                              wendy2702 @biker1602 last edited by

                              @biker1602 sagte in Akkustand vom Laptop auslesen:

                              wenn ich bei Putty in der Konsole den Befehl eingebe, bekomme ich folgende Rückmeldung
                              acpi --ac-adapter --battery
                              Battery 0: Discharging, 75%, 03:16:38 remaining
                              Adapter 0: off-line
                              root@iobroker:~#

                              OK.

                              BITTE RICHTE DIR EINEN USER EIN

                              adduser <dein Username>
                              usermod -aG sudo <dein Username>
                              

                              Falls Sudo nicht installiert ist:

                              apt install sudo
                              

                              dann als root ausloggen und als dein User anmelden.

                              Da du als root gearbeitet hast kann es sein das Rechte nicht passen. Bitte mal

                              iob fix
                              

                              ausführen und die vollständige ausgabe posten.

                              Welche IP Hat denn jetzt iobroker?

                              @biker1602 sagte in Akkustand vom Laptop auslesen:

                              die 192.168.78.210 ist die IP vom Iobroker.

                              oder doch

                              192.168.57.210 ?

                              Bei der Abfrage per ssh auf den Host einfach mit "yes" bestätigen.

                              Dann mal dort dein "acpi" Befehl eingeben und schauen was kommt.

                              B 1 Reply Last reply Reply Quote 0
                              • B
                                biker1602 @wendy2702 last edited by

                                @wendy2702 said in Akkustand vom Laptop auslesen:

                                192.168.57.210 ?
                                Bei der Abfrage per ssh auf den Host einfach mit "yes" bestätigen.
                                Dann mal dort dein "acpi" Befehl eingeben und schauen was kommt.

                                die ist richtig das andere war ein Schreibfehler von mir.

                                nach der Bestätigung mit yes musste ich das Passwort für Proxmox eingeben und war dann auf Proxmox drauf den Befehl "acpi --ac-adapter --battery"
                                eingebe, bekomme ich als Rückmeldung command not found

                                wendy2702 1 Reply Last reply Reply Quote 0
                                • wendy2702
                                  wendy2702 @biker1602 last edited by

                                  @biker1602 Dann ist das tool dort nicht installiert.

                                  Was ist mit den anderen sachen die ich geschrieben hatte?

                                  B 2 Replies Last reply Reply Quote 0
                                  • B
                                    biker1602 @wendy2702 last edited by

                                    @wendy2702
                                    So den User geändert neu eingeloggt und dann iobroker fix gestartet
                                    danach

                                    login as: biker1602
                                    biker1602@192.168.57.210's password:
                                    Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.83-1-pve x86_64)
                                    
                                     * Documentation:  https://help.ubuntu.com
                                     * Management:     https://landscape.canonical.com
                                     * Support:        https://ubuntu.com/advantage
                                    Last login: Fri Jan 13 10:14:09 2023
                                    biker1602@iobroker:~$ acpi --ac-adapter --battery
                                    Battery 0: Discharging, 44%, 02:30:33 remaining
                                    Adapter 0: off-line
                                    biker1602@iobroker:~$
                                    
                                    

                                    im Linux Adapter den Benutzer gewechselt, aber es hat sich nichts geändert.

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      biker1602 @wendy2702 last edited by

                                      @wendy2702

                                      2023-01-13 10:21:32.976 - info: linux-control.0 (1628) Got terminate signal TERMINATE_YOURSELF
                                      2023-01-13 10:21:32.977 - info: linux-control.0 (1628) cleaned everything up...
                                      2023-01-13 10:21:32.978 - info: linux-control.0 (1628) terminating
                                      2023-01-13 10:21:32.978 - debug: linux-control.0 (1628) Plugin sentry destroyed
                                      2023-01-13 10:21:32.979 - info: linux-control.0 (1628) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
                                      2023-01-13 10:21:37.129 - debug: linux-control.0 (2109) Redis Objects: Use Redis connection: 127.0.0.1:9001
                                      2023-01-13 10:21:37.222 - debug: linux-control.0 (2109) Objects client ready ... initialize now
                                      2023-01-13 10:21:37.224 - debug: linux-control.0 (2109) Objects create System PubSub Client
                                      2023-01-13 10:21:37.225 - debug: linux-control.0 (2109) Objects create User PubSub Client
                                      2023-01-13 10:21:37.450 - debug: linux-control.0 (2109) Objects client initialize lua scripts
                                      2023-01-13 10:21:37.456 - debug: linux-control.0 (2109) Objects connected to redis: 127.0.0.1:9001
                                      2023-01-13 10:21:37.534 - debug: linux-control.0 (2109) Redis States: Use Redis connection: 127.0.0.1:9000
                                      2023-01-13 10:21:37.612 - debug: linux-control.0 (2109) States create System PubSub Client
                                      2023-01-13 10:21:37.613 - debug: linux-control.0 (2109) States create User PubSub Client
                                      2023-01-13 10:21:37.806 - debug: linux-control.0 (2109) States connected to redis: 127.0.0.1:9000
                                      2023-01-13 10:21:38.246 - debug: linux-control.0 (2109) Plugin sentry Initialize Plugin (enabled=true)
                                      2023-01-13 10:21:38.418 - warn: linux-control.0 (2109) Object linux-control.0.command.host is invalid: obj.common.states has an invalid type! Expected "object", received "string"
                                      2023-01-13 10:21:38.419 - warn: linux-control.0 (2109) This object will not be created in future versions. Please report this to the developer.
                                      2023-01-13 10:21:38.424 - info: linux-control.0 (2109) starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.linux-control, node: v16.19.0, js-controller: 4.0.24
                                      2023-01-13 10:21:38.466 - warn: linux-control.0 (2109) Object linux-control.0.command.host is invalid: obj.common.states has an invalid type! Expected "object", received "string"
                                      2023-01-13 10:21:38.467 - warn: linux-control.0 (2109) This object will not be created in future versions. Please report this to the developer.
                                      2023-01-13 10:21:38.476 - info: linux-control.0 (2109) getting data from Linux (192.168.57.210:22, Adapter start)
                                      2023-01-13 10:21:38.493 - info: linux-control.0 (2109) [getConnection] Host 'Linux' (192.168.57.210:22) seems not to be online
                                      2023-01-13 10:21:38.494 - debug: linux-control.0 (2109) [getConnection] Host 'Linux' (192.168.57.210:22) ping result: {"inputHost":"192.168.57.210","host":"unknown","alive":false,"output":"","time":"unknown","times":[],"min":"unknown","max":"unknown","avg":"unknown","stddev":"unknown","packetLoss":"unknown"}
                                      2023-01-13 10:21:38.674 - debug: linux-control.0 (2109) [refreshHost] Linux (192.168.57.210:22): button 'linux-control.0.Linux.refresh' subscribed
                                      2023-01-13 10:26:38.674 - info: linux-control.0 (2109) getting data from Linux (192.168.57.210:22)
                                      2023-01-13 10:26:38.686 - info: linux-control.0 (2109) [getConnection] Host 'Linux' (192.168.57.210:22) seems not to be online
                                      2023-01-13 10:26:38.687 - debug: linux-control.0 (2109) [getConnection] Host 'Linux' (192.168.57.210:22) ping result: {"inputHost":"192.168.57.210","host":"unknown","alive":false,"output":"","time":"unknown","times":[],"min":"unknown","max":"unknown","avg":"unknown","stddev":"unknown","packetLoss":"unknown"}
                                      
                                      wendy2702 1 Reply Last reply Reply Quote 0
                                      • wendy2702
                                        wendy2702 @biker1602 last edited by

                                        @biker1602

                                        SSH auf iobroker dann mal die eigene IP pingen

                                        Was kommt dann?

                                        B 1 Reply Last reply Reply Quote 0
                                        • B
                                          biker1602 @wendy2702 last edited by

                                          @wendy2702 said in Akkustand vom Laptop auslesen:

                                          SSH auf iobroker dann mal die eigene IP pingen

                                          login as: biker1602
                                          biker1602@192.168.57.210's password:
                                          Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.83-1-pve x86_64)
                                          
                                           * Documentation:  https://help.ubuntu.com
                                           * Management:     https://landscape.canonical.com
                                           * Support:        https://ubuntu.com/advantage
                                          Last login: Fri Jan 13 10:24:22 2023 from 192.168.57.120
                                          biker1602@iobroker:~$ ping 192.168.57.210
                                          biker1602@iobroker:~$
                                          
                                          
                                          
                                          wendy2702 1 Reply Last reply Reply Quote 0
                                          • wendy2702
                                            wendy2702 @biker1602 last edited by

                                            @biker1602 Kommt was bei

                                            sudo ping 192.168.57.210
                                            

                                            oder bei

                                            ping 8.8.8.8
                                            

                                            Wenn beides nicht geht bitte das:

                                            sudo apt install iputils-ping
                                            

                                            und erneut testen

                                            B 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

                                            693
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            59
                                            2489
                                            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