Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Rasppi(gpio) und iobroker ein Smarthome

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Rasppi(gpio) und iobroker ein Smarthome

    This topic has been deleted. Only users with topic management privileges can see it.
    • Dutchman
      Dutchman Developer Most Active Administrators last edited by

      @RappiRN:

      @Dutchman:

      Er hat keine berechtigungen, die RPI adapter documentation auf github sagt das iobroker als root laufen muss sonst kan er die pins nicht steuern. `

      Ich brauch das zwar nicht, aber der Vollständigkeit halber, wie stellt man das ein?

      Enrico `

      Entweder man startet ioBroker aus root (root ist man nach dem Commando "sudo su")

      Oder

      Man lässt ioBroker als Service laufen.

      Bei mir habe ich ioBroker installiert mir sudo, danach per root als Service festgelegt.

      Ich such Mal schnell die befehle

      edit: Found it:

      cp /opt/iobroker/node_modules/iobroker/install/linux/iobroker.sh /etc/init.d/
      chmod 777 /etc/init.d/iobroker.sh
      bash /opt/iobroker/node_modules/iobroker/install/linux/install.sh
      
      

      Dieses iobroker.sh sorgt fuer laufenim root siehe code der datei:

      #!/bin/bash
      ### BEGIN INIT INFO
      # Provides:          iobroker.sh
      # Required-Start:    $network $local_fs $remote_fs
      # Required-Stop::    $network $local_fs $remote_fs
      # Default-Start:     2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: starts ioBroker
      # Description:       starts ioBroker
      ### END INIT INFO
      (( EUID )) && echo .You need to have root privileges.. && exit 1
      PIDF=/opt/iobroker/node_modules/iobroker.js-controller/lib/iobroker.pid
      NODECMD=/usr/bin/node
      IOBROKERCMD=/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js
      RETVAL=0
      IOBROKERUSER=root
      
      start() {
                  export IOBROKER_HOME=/opt/iobroker
                  echo -n "Starting ioBroker"
                  sudo -u ${IOBROKERUSER} $NODECMD $IOBROKERCMD start
                  RETVAL=$?
      }
      
      stop() {
                  echo -n "Stopping ioBroker"
                  sudo -u ${IOBROKERUSER} $NODECMD $IOBROKERCMD stop
                  RETVAL=$?
      }
      case "$1" in
          start)
            start
        ;;
          stop)
            stop
        ;;
          restart)
            stop
            start
        ;;
          *)
            echo "Usage: iobroker {start|stop|restart}"
            exit 1
        ;;
      esac
      exit $RETVAL
      
      

      –-----------------------

      Send from mobile device

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

        Wenn ich deinen Code ausführe kommt:

        root@ioBroker-BPi:~# cp /opt/iobroker/node_modules/iobroker/install/linux/iobrok                 er.sh /etc/init.d/
        root@ioBroker-BPi:~# chmod 777 /etc/init.d/iobroker.sh
        root@ioBroker-BPi:~# bash /opt/iobroker/node_modules/iobroker/install/linux/inst                 all.sh
        Use user root for install.
        Set permissions...
        Start iobroker...
        : No such file or directory
        call http://ip_address:8081/ in browser to get the AdminUI of ioBroker
        root@ioBroker-BPi:~# ^C
        root@ioBroker-BPi:~#
        
        

        Die iobroker.sh ist vorhanden im angegebenen Pfad.

        Enrico

        1 Reply Last reply Reply Quote 0
        • Dutchman
          Dutchman Developer Most Active Administrators last edited by

          ich sehe da lehrzeichen bei dir ?

          root@ioBroker-BPi:~# cp /opt/iobroker/node_modules/iobroker/install/linux/iobrok                 er.sh /etc/init.d/
          root@ioBroker-BPi:~# chmod 777 /etc/init.d/iobroker.sh
          root@ioBroker-BPi:~# bash /opt/iobroker/node_modules/iobroker/install/linux/inst                 all.sh
          
          

          dein iobroker ist wohl in diesem verzeichnis installiert ?

          /opt/iobroker/
          

          ~Dutch

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

            @Dutchman:

            ich sehe da lehrzeichen bei dir ?

            root@ioBroker-BPi:~# cp /opt/iobroker/node_modules/iobroker/install/linux/iobrok                 er.sh /etc/init.d/
            root@ioBroker-BPi:~# chmod 777 /etc/init.d/iobroker.sh
            root@ioBroker-BPi:~# bash /opt/iobroker/node_modules/iobroker/install/linux/inst                 all.sh
            
            ```` `  
            

            Die Leerzeichen kommen vom Zeilenwechsel im kleinen putty-Fenster.

            Ja ist in opt/iobroker.

            Enrico

            1 Reply Last reply Reply Quote 0
            • Dutchman
              Dutchman Developer Most Active Administrators last edited by

              @RappiRN:

              @Dutchman:

              ich sehe da lehrzeichen bei dir ?

              root@ioBroker-BPi:~# cp /opt/iobroker/node_modules/iobroker/install/linux/iobrok                 er.sh /etc/init.d/
              root@ioBroker-BPi:~# chmod 777 /etc/init.d/iobroker.sh
              root@ioBroker-BPi:~# bash /opt/iobroker/node_modules/iobroker/install/linux/inst                 all.sh
              
              ```` `  
              

              Die Leerzeichen kommen vom Zeilenwechsel im kleinen putty-Fenster.

              Ja ist in opt/iobroker.

              Enrico `

              diese 2 dateien sind aber wohl in deinem installations verzeichnis ?

              /opt/iobroker/node_modules/iobroker/install/linux/iobroker.sh /etc/init.d/
              /opt/iobroker/node_modules/iobroker/install/linux/install.sh
              

              und diese datei ist noch nicht da ?

              /etc/init.d/iobroker.sh
              
              

              startet dein iobroker im moment automatisch (z.b. nach einen reboot der hardware ?)

              1 Reply Last reply Reply Quote 0
              • M
                mafe68 last edited by

                Gehe mal in den Ordner mit

                cd /etc/init.d
                

                und schau ob dort die Datei drin ist

                iobroker.sh
                

                das Kannst du mit dem Befehl machen

                ls -l
                
                1 Reply Last reply Reply Quote 0
                • M
                  mafe68 last edited by

                  > Adapter installieren und probieren ;).
                  Werde es dann probieren und berichten ob es auch mit dem Bpi geht 😉

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

                    @Dutchman:

                    @RappiRN:

                    @Dutchman:

                    ich sehe da lehrzeichen bei dir ?

                    root@ioBroker-BPi:~# cp /opt/iobroker/node_modules/iobroker/install/linux/iobrok                 er.sh /etc/init.d/
                    root@ioBroker-BPi:~# chmod 777 /etc/init.d/iobroker.sh
                    root@ioBroker-BPi:~# bash /opt/iobroker/node_modules/iobroker/install/linux/inst                 all.sh
                    
                    ```` `  
                    

                    Die Leerzeichen kommen vom Zeilenwechsel im kleinen putty-Fenster.

                    Ja ist in opt/iobroker.

                    Enrico `

                    diese 2 dateien sind aber wohl in deinem installations verzeichnis ?

                    
                    /opt/iobroker/node_modules/iobroker/install/linux/iobroker.sh /etc/init.d/
                    /opt/iobroker/node_modules/iobroker/install/linux/install.sh
                    

                    und diese datei ist noch nicht da ?

                    /etc/init.d/iobroker.sh
                    
                    

                    startet dein iobroker im moment automatisch (z.b. nach einen reboot der hardware ?) `

                    Ja alle drei Dateien sind vorhanden und ioBroker startet automatisch.

                    Enrico

                    1 Reply Last reply Reply Quote 0
                    • Dutchman
                      Dutchman Developer Most Active Administrators last edited by

                      Wie sieht dein Inhalt von /etc/init.d/ioBroker.sh aus ?

                      –-----------------------

                      Send from mobile device

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

                        Genau so, wie du weiter oben geschrieben hast.

                        Enrico

                        1 Reply Last reply Reply Quote 0
                        • Dutchman
                          Dutchman Developer Most Active Administrators last edited by

                          @RappiRN:

                          Genau so, wie du weiter oben geschrieben hast.

                          Enrico `

                          sorry dan steh ich auf dem schlauch, es hoert sich an das dein iobroker nicht als root laeuft (der service) und dadurch die pinst nicht steuern kan.

                          Da wir dieses scenario jetzt durchgelaufen haben (bis soweit mein wissen reicht) kan ich dir leider nicht weiterhelfen.

                          Eventuell mal probieren om iobroker zu stoppen und als root zu starten und schaun was dan passiert ?

                          ~Dutch

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

                            Ist erstmal nicht weiter tragisch, ich hatte ja geschrieben, dass das momentan noch nicht so wichtig ist. Ich habe noch einen Raspi2 hier und werde den mal bei Gelegenheit scharf machen und damit mal das Gleiche probieren.

                            Danke für deine Bemühungen!

                            Enrico

                            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

                            724
                            Online

                            32.0k
                            Users

                            80.5k
                            Topics

                            1.3m
                            Posts

                            4
                            23
                            5117
                            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