Autostart Not running

  • Hallo,

    Erstmal möchte ich sagen, dass ich kein passendes Thema gefunden habe und alles nach Anleitung gemacht haben und auch wiederholt habe.


    Mein Problem seit zwei Tagen das meine Homebridge nicht automatisch startet.

    Wenn ich per SSH verbunden bin und über den Begriff „homebridge“ das Programm starte läuft alles normal ab. Ich habe über das Schnellmenü am IPhone Zugriff auf alles. Muss die Bridge dann aber mit CTRL und C beenden.

    Über die Init habe ich den autostart damals angelegt und dieser lief auch bis vor 2 Tagen. Nun schreibt mir das Programm Homebridge is Running

    Is Not Running.

    Ich habe die init. schon einmal gelöscht und neu eingefügt aber es passiert nichts.

    Zudem habe ich momentan öfters Abstürze des ganzen Pi‘s sodass ich keinen Zugriff über SSH mehr habe und nur der „Hard reset“ hilft.

    Über Update habe ich einiges aktualisiert vor kurzem aber wie gesagt Manuel startet Sie problemlos.

    Vielen Dank schon mal

  • Hast du mal mit diesem Befehl homebridge gestartet:


    sudo /etc/init.d/homebridge start

  • Ist das hier richtig?

    Habe mich gerade nochmal belesen wie ich an die Log komme..

    Code
    Nov 18 14:44:16 raspberrypi systemd[571]: Started Virtual filesystem service - GNOME Online Accounts monitor.
    Nov 18 14:44:17 raspberrypi kernel: [   17.177793] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
    Nov 18 14:44:17 raspberrypi udisksd[965]: Mounted /dev/mmcblk0p5 at /media/pi/SETTINGS on behalf of uid 1000
    Nov 18 14:44:24 raspberrypi systemd[1]: Started Session c3 of user pi.
    Nov 18 14:44:57 raspberrypi systemd[1]: Time has been changed
    Nov 18 14:44:57 raspberrypi systemd-timesyncd[289]: Synchronized to time server [2a02:2028:ff00:a00::5]:123 (2.debian.pool.ntp.org).
    Nov 18 14:44:57 raspberrypi systemd[1]: apt-daily.timer: Adding 4h 46min 12.111158s random time.
    Nov 18 14:44:57 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 12min 23.286210s random time.
    Nov 18 14:44:57 raspberrypi systemd[571]: Time has been changed
    Nov 18 14:45:33 raspberrypi kernel: [   71.525783] random: crng init done
  • Im 1. Fenster habe ich Homebridge gestartet und es funktioniert.

    im 2. steht das!

  • Beim 1. SSH:

    sudo /etc/init.d/homebridge start

    Homebridge starting

    Homebridge is not running


    Beim 2.


    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.

    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** Please fix your application to use the native API of Avahi!

    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>

    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** Please fix your application to use the native API of Avahi!

    Nov 18 20:21:52 raspberrypi node[7476]: *** WARNING *** For more information see <http://0pointer.de/avahi-compa…node&f=DNSServiceRegister>


    Es steht das gleiche wie beim normalen da, nur das Homebridge nicht läuft..


    hier mal meine init.d


    #!/bin/sh

    ### BEGIN INIT INFO

    # Provides: homebridge

    # Required-Start: $network $remote_fs $syslog

    # Required-Stop: $remote_fs $syslog

    # Default-Start: 2 3 4 5

    # Default-Stop: 0 1 6

    # Short-Description: Start daemon at boot time for homebridge

    # Description: Enable service provided by daemon.

    ### END INIT INFO

    export PATH=$PATH:/usr/local/bin

    export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules

    PID=`pidof homebridge`

    case "$1" in

    start)

    if ps -p $PID > /dev/null 2>&1; then

    echo "Homebridge is already running"

    else

    su - pi -c "homebridge > /dev/null 2>&1 &"

    echo "Homebridge starting"

    $0 status

    fi

    ;;

    stop)

    if ! ps -p $PID > /dev/null 2>&1; then

    echo "Homebridge is not running"

    else

    kill $PID

    echo "Homebridge closed"

    fi

    ;;

    restart)

    if ! ps -p $PID > /dev/null 2>&1; then

    $0 start

    else

    $0 stop

    $0 start

    fi

    ;;

    status)

    if ps -p $PID > /dev/null 2>&1; then

    echo "Homebridge is running PID $PID"

    else

    echo "Homebridge is not running"

    fi

    ;;

    *)

    echo "Usage: $0 {start|stop|status|restart}"

    exit 1


    ;;

    esac

    exit 00






  • su - pi -c "homebridge > /dev/null 2>&1 &"

    mal erstzen durch

    Code
    su - pi -c "homebridge >> /var/log/homebridge.log 2>> /var/log/homebridge.err &"

    dadurch hast du 2 LOG-Dateien in /var/log

    homebridge.log

    und

    homebridge.err


    wo man suchen kann.


    im LOG oben ist immer noch kein error zu sehn,

    der Auszug ist auch zu kurz.


    Deine config.json muss unter /home/pi/.homebridge liegen.

  • um die Logs zu öffnen habe ich nicht die nötigen rechte ? Was muss ich davor setzten ? Sudo oder Root oder chmod 777? Bin mit Linux nicht so ganz bewandert.


    Und wie verschiebe ich die config.js am einfachsten?


    Danke dir schon mal für deine Hilfe bisher !

  • sudo cp config.json /home/pi/.homebridge

    cp: der Aufruf von stat für 'config.json' ist nicht möglich: Datei oder Verzeichnis nicht gefunden


    Ok ist scheinbar nicht da.


    Und die Logs kann ich trotzdem nicht öffnen..

  • wenn du

    homebridge &

    eingibst, das Fenster zu machst, ist da alles da?

    Ja wenn ich einfach Homebridge eingebe dann kommt der QR Code zum Scannen und mein Harmony Plugin wird geladen aber dann muss ich die Konsole ja beenden und er beendet dann ja auch Homebridge

  • Jetzt habe ich was Aussage kräftiges... liegt es am nicht funktionierenden Xiaomi Plugin?


    sudo tail -f /var/log/homebridge.err

    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

    at Function.Module._load (module.js:438:3)

    at Module.runMain (module.js:604:10)

    at run (bootstrap_node.js:394:7)

    at startup (bootstrap_node.js:149:9)

    at bootstrap_node.js:509:3

    *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.

    *** WARNING *** Please fix your application to use the native API of Avahi!

    *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>

    *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

    *** WARNING *** Please fix your application to use the native API of Avahi!

    *** WARNING *** For more information see <http://0pointer.de/avahi-compa…node&f=DNSServiceRegister>

    [2017-11-18 21:16:29] Plugin /usr/local/lib/node_modules/homebridge-hue requires Node version of ^8.9.1 which does not satisfy the current Node version of v6.10.0. You may need to upgrade your installation of Node.

    [2017-11-18 21:16:30] [Hue] config.json: warning: philipsLights: deprecated

    [2017-11-18 21:16:30] [Hue] warning: not using recommended node version v8.9.1 LTS

    [2017-11-18 21:16:30] [Hue] warning: not using recommended homebridge version v0.4.31

    /usr/local/lib/node_modules/homebridge/lib/api.js:64

    throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");

    ^


    Error: The requested accessory 'MiRobotVacuum' was not registered by any plugin.

    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)

    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:264:42)

    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:86:38)

    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)

    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

    at Function.Module._load (module.js:438:3)

    at Module.runMain (module.js:604:10)

    at run (bootstrap_node.js:394:7)

    at startup (bootstrap_node.js:149:9)

    at bootstrap_node.js:509:3