Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Gelöst] Playstation 4 - Wake-on-Lan

    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] Playstation 4 - Wake-on-Lan

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @Thomas Braun last edited by

      @thomas-braun sagte in Externes node-Modul anstoßen:

      Wie bekomm ich das jetzt in z. B. ein Blockly?

      in der Instanz eintragen

      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @Homoran last edited by Thomas Braun

        @homoran
        Welche Instanz? Das ist ja kein Adapter vom ioBroker, das ist eigentlich vollkommen autark, hab das nur in die bereits vorhandene nodeJS-Installation des ioBrokers reingeschoben.

        [Edit:] Du meinst im javascript-Adapter?

        Homoran liv-in-sky 2 Replies Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @Thomas Braun last edited by

          @thomas-braun sagte in Externes node-Modul anstoßen:

          [Edit:] Du meinst im javascript-Adapter?

          Latürnich

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

            @thomas-braun

            evtl fehlt das recht des iobroker users, dass auszuführen ??

            Thomas Braun 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @liv-in-sky last edited by Thomas Braun

              @liv-in-sky
              Grmpf. Ja, da ist was:

              echad@chet:/opt/iobroker $ sudo -u iobroker npx ps4-waker
              No credentials; Use the PS4 Second Screen App and try to connect to "PS4-Waker"
              Root permissions required to start PS4 Dummy
              Attempting to request root permissions now (we will relinquish them as soon as possible):
                sudo /usr/bin/node /opt/iobroker/node_modules/.bin/ps4-waker --user-id 1001 -c /home/iobroker/.ps4-wake.credentials.json
              
              We trust you have received the usual lecture from the local System
              Administrator. It usually boils down to these three things:
              
                  #1) Respect the privacy of others.
                  #2) Think before you type.
                  #3) With great power comes great responsibility.
              
              [sudo] password for iobroker:
              Sorry, try again.
              [sudo] password for iobroker:
              Sorry, try again.
              [sudo] password for iobroker:
              sudo: 3 incorrect password attempts
              

              Der iobroker kann nicht per sudo zum root werden.

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

                @thomas-braun

                kannst du das nicht über sudo -u root aufrufen? oder macht man das nicht ?

                Thomas Braun 1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @liv-in-sky last edited by Thomas Braun

                  @liv-in-sky sagte in Externes node-Modul anstoßen:

                  kannst du das nicht über sudo -u root aufrufen? oder macht man das nicht ?

                  Nein, das macht man nicht. Das ist aber auch nicht das Problem, der iobroker kann und soll nicht in die root-Rolle wechseln.

                  [Edit:]
                  Problem mit den Rechten gelöst. Einfach die credentials vom Standarduser in den iobroker kopiert:

                  echad@chet:/opt/iobroker $ sudo -u iobroker cp /home/echad/.ps4-wake.credentials.json /home/iobroker/
                  echad@chet:/opt/iobroker $ sudo -u iobroker npx ps4-waker
                  WAKEUP sent to device... 192.168.178.50
                  Logging in...
                  

                  Jetzt muss ich nochmal schauen wie und ob das in einem skript funktioniert...

                  Sooooo, geht:

                  dd8307f0-4464-4b89-9770-ea3ef50f1fbc-image.png

                  Von da aus werde ich wohl weiterkommen...
                  Fehlt noch meine WLAN-Kaffeemaschine im ioBroker. Dann hab ich glaube ich bis auf den elektrischen Dosenöffner alles drin.

                  Thomas Braun 1 Reply Last reply Reply Quote -1
                  • Thomas Braun
                    Thomas Braun Most Active @Thomas Braun last edited by Thomas Braun

                    Note to myself:
                    Auf playactor
                    https://github.com/dhleong/playactor
                    umgestellt, geht prinzipiell ähnlich, die credentials liegen allerdings hier:

                    /home/STANDARDUSER/.config/playactor/credentials.json

                    und müssen dem user iobroker in dessen ~ gelegt werden.

                    Das ganze soll dann auch für die Playstation 4 und 5 gleichermaßen funktionieren.

                    Das Blockly dazu schaut so aus:

                    eabf1758-24f8-47bd-88df-b5ad92eea676-image.png

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      DarkDevil @Thomas Braun last edited by

                      @thomas-braun
                      Könntest du das vorgehen nochmal erklären? Also ich auf meinem System

                      npm install -g playactor
                      

                      nutzen um playactor zu installieren? Anschließend finde ich die credentials in dem vor Dir beschriebenen Ordner?
                      Aber wo werden diese eingetragen?

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

                        @darkdevil
                        Ich habe playactor im Javascript-Adapter als Modul hinzugefügt.
                        Dann konnte ich das als User mit

                        npx playactor
                        

                        aufrufen. Die credentials liegen dann im Home des Users und müssen in das Home des iobrokers kopiert werden.

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          DarkDevil @Thomas Braun last edited by DarkDevil

                          @thomas-braun so ich versuche gerade playactor in Betrieb zu nehmen.

                          wenn ich den Befehl:

                          npx playactor browse
                          
                          

                          eingebe, werden mir Infos wie IP Adresse, Status etc. angezeigt, also scheint die Anbindung zu funktionieren.

                          Nur ich komme mit den Credentials nicht weiter.
                          Bei mir gibt es das Verzeichnis "playactor" im Verzeichnis .config nicht:

                          -bash: cd: /home/pi/.config/playactor/: No such file or directory
                          

                          Auch der Versuch die Playstation in Standby zu versetzen scheitert mit folgender Meldung:

                          pi@iobroker-produktiv:~$ npx playactor standby
                          In a moment, we will attempt to open a browser window for you to login to your PSN account.
                          When the page shows "redirect", copy the URL from your browser's address bar and paste it here.
                          Hit ENTER to continue
                          
                          Thomas Braun 1 Reply Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @DarkDevil last edited by Thomas Braun

                            @darkdevil

                            npx playactor login
                            

                            oder

                            npx playactor connect
                            

                            als pi ausgeführt? Das müsste das sudo-Passwort abfragen und sich dann mit der Konsole verbinden, credentials müssten dann als /home/pi/.config/playactor/credentials.json
                            abgelegt werden. Das muss dann entsprechend nur dem user iobroker untergejubelt werden. Besitz muss noch auf iobroker:iobroker gesetzt werden.

                            1 Reply Last reply Reply Quote 0
                            • D
                              DarkDevil last edited by

                              ich habe

                              npx playactor login
                              

                              ausgeführt. Nach meinem sudo Passwort wurde ich nicht gefragt. Auch mit einem sudo vor dem Befehl werde ich zwar nach dem Passwort gefragt aber die Ausgabe bleibt:

                              pi@iobroker-produktiv:~$ sudo npx playactor login
                              In a moment, we will attempt to open a browser window for you to login to your PSN account.
                              When the page shows "redirect", copy the URL from your browser's address bar and paste it here.
                              Hit ENTER to continue
                              

                              und das Verzeichnis gibt es immer noch nicht.

                              Thomas Braun 1 Reply Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @DarkDevil last edited by Thomas Braun

                                @darkdevil sagte in [Gelöst] Playstation 4 - Wake-on-Lan:

                                Auch mit einem sudo vor dem Befehl werde ich zwar nach dem Passwort

                                Wer hat denn gesagt, dass du das direkt als root ausführen sollst?
                                Das steht nirgends.

                                Ich bin aber auch nie nach einem Browser Window gefragt worden, das lief über die ps4-second-screen-App vom Handy. Auf dem pi ist kein Browser drauf. Jedenfalls nicht in einer Server-Installation.

                                D 1 Reply Last reply Reply Quote 0
                                • D
                                  DarkDevil @Thomas Braun last edited by

                                  @thomas-braun

                                  ich habe es als sudo versucht m evtl weiter zu kommen 🙂

                                  Wenn ich den Befehlt

                                  npx playactor login
                                  

                                  absetze bekomme ich halt immer die Antwort:

                                  In a moment, we will attempt to open a browser window for you to login to your PSN account.
                                  
                                  When the page shows "redirect", copy the URL from your browser's address bar and paste it here.
                                  
                                  Hit ENTER to continue
                                  

                                  ist jetzt nicht weiter tragisch, ich verusche es bei Zeiten nochmal

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  750
                                  Online

                                  31.8k
                                  Users

                                  80.0k
                                  Topics

                                  1.3m
                                  Posts

                                  4
                                  16
                                  1217
                                  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