homebridge-http-webhooks Error: EACCES: permission denied, mkdir ‘/.node-persist’



  • Hallo, meine Homebridge, stürzt ab, wenn ich das webhooks plugin einfüge, dies ist meine config:

    {
       "bridge": {
           "name": "Homebridge",
           "username": "CC:22:3D:E3:CE:30",
           "manufacturer": "homebridge.io",
           "model": "homebridge",
           "port": 51826,
           "pin": "031-45-154"
       },
       "description": "Home Smart Home",
       "platforms": [
           {
               "platform": "config",
               "name": "Config",
               "port": 8080,
               "auth": "form",
               "theme": "red",
               "restart": "sudo -n systemctl restart homebridge",
               "temp": "/sys/class/thermal/thermal_zone0/temp",
               "sudo": true,
               "log": {
                   "method": "custom",
                   "command": "journalctl -o cat -n 500 -f -u homebridge"
               }
           },
           {
               "name": "Yeelighter",
               "timeout": 0,
               "interval": 60000,
               "ctforcolor": true,
               "blocking": false,
               "split": false,
               "override": [
                   {
                       "useNameAsId": false
                   }
               ],
               "platform": "Yeelighter"
           },
           {
               "name": "TuyaWebPlatform",
               "options": {
                   "username": "mail@mail.com",
                   "password": "*****",
                   "countryCode": "49",
                   "platform": "smart_life"
               },
               "defaults": [
                   {
                       "device_type": "form"
                   }
               ],
               "scenes": false,
               "platform": "TuyaWebPlatform"
           },
     {
       "platform": "HttpWebHooks",
    	"webhook_port": "51828",
    	"sensors": [
     	{
      		"id": "temperatur",
       	"name": "Sensor name 5",
      		"type": "temperature"
     		}
    	]
    }
     ],
       "accessories": [
           {
               "accessory": "MagicHome",
               "name": "ESP-C2CF63",
               "ip": "192.168.178.29",
               "setup": "RGBWW",
               "purewhite": false
           },
           {
               "accessory": "MagicHome",
               "name": "ESP-D7F869",
               "ip": "192.168.178.38",
               "setup": "RGBWW",
               "purewhite": false
           },
           {
               "accessory": "MagicHome",
               "name": "ESP-A0F51E",
               "ip": "192.168.178.41",
               "setup": "RGBWW",
               "purewhite": false
           },
           {
               "accessory": "MagicHome",
               "name": "ESP-BC3796",
               "ip": "192.168.178.58",
               "setup": "RGBWW",
               "purewhite": false
           },
           {
               "accessory": "MagicHome",
               "name": "ESP-B7268A",
               "ip": "192.168.178.39",
               "setup": "RGBWW",
               "purewhite": false
           }
       ]
    }
    

    LG



  • @JonasPies1912 Das nächste mal bitte Code-Tags verwenden 🙉 und deine Zugangsdaten solltest du beim nächsten Mal auch zensieren. 👀

    Der Fehler seitens Homebridge wäre noch interessant. Was kommt für ein Fehler?



  • meine Homebridge startet und fährt danach wieder runter, wenn ich die webhooks stelle rausnehme, funktioniert alles super, oder möchtest du die genaue Fehlermeldung?



  • Ja die genaue Fehlermeldung wäre gut, daraus wird man meistens schlauer 👍



  • Hier ist das Logfile:

    – Logs begin at Thu 2020-09-17 14:17:01 CEST. –
    Sep 19 23:22:39 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a
    Sep 19 23:22:39 raspberrypi systemd[1]: homebridge.service: Failed with result ‘exit-code’.
    Sep 19 23:22:39 raspberrypi systemd[1]: Stopped Node.js HomeKit Server.
    Sep 19 23:22:39 raspberrypi systemd[1]: homebridge.service: Found left-over process 13360 (node) in control group while starting unit. Ignoring.
    Sep 19 23:22:39 raspberrypi systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
    Sep 19 23:22:39 raspberrypi systemd[1]: homebridge.service: Found left-over process 13378 (sh) in control group while starting unit. Ignoring.
    Sep 19 23:22:39 raspberrypi systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
    Sep 19 23:22:39 raspberrypi systemd[1]: homebridge.service: Found left-over process 13379 (node) in control group while starting unit. Ignoring.
    Sep 19 23:22:39 raspberrypi systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
    Sep 19 23:22:39 raspberrypi systemd[1]: Started Node.js HomeKit Server.
    Sep 19 23:22:41 raspberrypi homebridge[13340]: [9/19/2020, 23:22:41] [Config] Homebridge Config UI X v4.27.1 is listening on :: port 8080
    Sep 19 23:22:41 raspberrypi homebridge[13386]: [9/19/2020, 23:22:41] Loaded config.json with 5 accessories and 4 platforms.
    Sep 19 23:22:41 raspberrypi homebridge[13386]: [9/19/2020, 23:22:41] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-MotionSensor@3.0.0
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-MotionSensor.Motion’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-config-ui-x@4.27.1
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering platform ‘homebridge-config-ui-x.config’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-http-temperature-humidity@0.0.18
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Plugin ‘homebridge-http-temperature-humidity’ tried to register with an incorrect plugin identifier: ‘homebridge-httptemperaturehumidity’. Please report this to the developer!
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-temperature-humidity.HttpTemphum’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-http-webhooks@0.1.4
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering platform ‘homebridge-http-webhooks.HttpWebHooks’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookSensor’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookSwitch’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookPushButton’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookLight’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookThermostat’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookOutlet’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookSecurity’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookGarageDoorOpener’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookStatelessSwitch’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookLockMechanism’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-http-webhooks.HttpWebHookWindowCovering’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-magichome@0.3.0
    Sep 19 23:22:43 raspberrypi homebridge[13386]: homebridge API version: 2.6
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering accessory ‘homebridge-magichome.MagicHome’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Loaded plugin: homebridge-yeelighter@1.5.13
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] Registering platform ‘homebridge-yeelighter.Yeelighter’
    Sep 19 23:22:43 raspberrypi homebridge[13386]: [9/19/2020, 23:22:43] —
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] Loaded plugin: @milo526/homebridge-tuya-web@0.4.7
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] Registering platform ‘@milo526/homebridge-tuya-web.TuyaWebPlatform’
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] —
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] Loading 4 platforms…
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] [Config] Initializing config platform…
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] [Config] Spawning homebridge-config-ui-x with PID 13420
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] [Yeelighter] Initializing Yeelighter platform…
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] [TuyaWebPlatform] Initializing TuyaWebPlatform platform…
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] [HttpWebHooks] Initializing HttpWebHooks platform…
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] Error: EACCES: permission denied, mkdir ‘/.node-persist’
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at Object.mkdirSync (fs.js:921:3)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at sync (/usr/local/lib/node_modules/homebridge-http-webhooks/node_modules/mkdirp/index.js:72:13)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at Function.sync (/usr/local/lib/node_modules/homebridge-http-webhooks/node_modules/mkdirp/index.js:78:24)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at LocalStorage.parseStorageDirSync (/usr/local/lib/node_modules/homebridge-http-webhooks/node_modules/node-persist/src/local-storage.js:600:20)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at LocalStorage.initSync (/usr/local/lib/node_modules/homebridge-http-webhooks/node_modules/node-persist/src/local-storage.js:141:14)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at Object.nodePersist.initSync (/usr/local/lib/node_modules/homebridge-http-webhooks/node_modules/node-persist/src/node-persist.js:37:32)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at new HttpWebHooksPlatform (/usr/local/lib/node_modules/homebridge-http-webhooks/src/homekit/HttpWebHooksPlatform.js:25:16)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at /usr/local/lib/node_modules/homebridge/src/server.ts:397:40
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at Array.forEach (<anonymous>)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:374:27)
    Sep 19 23:22:44 raspberrypi homebridge[13386]: [9/19/2020, 23:22:44] Got SIGTERM, shutting down Homebridge…
    Sep 19 23:22:49 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a
    Sep 19 23:22:49 raspberrypi systemd[1]: homebridge.service: Failed with result ‘exit-code’.



  • Der Hund liegt hier begraben:

    [9/19/2020, 23:22:44] [HttpWebHooks] Initializing HttpWebHooks platform…
    [9/19/2020, 23:22:44] Error: EACCES: permission denied, mkdir ‘/.node-persist’
    

    Er will also mit mkdir einen Ordner anlegen und zwar den Ordner .node-persist dazu fehlen aber offensichtlich die Berechtigungen … permission denied.


    Lt. Plugin wird der Ordner für Cache-Dateien verwendet:

    "cache_directory": "./.node-persist/storage", // (optional, default: "./.node-persist/storage")
    

    Nachdem in deiner config nichts anders definiert ist, wird er wohl den Ordner versuchen wollen zu verwenden. Ohne Berechtigung.

    Also versuch mal in deiner config.json 'nen anderen Pfad / Ordner für die Cache-Dateien angeben, zum Beispiel:

    "cache_directory": "/var/homebridge/node-persist/storage",


    Hier noch ein Auszug aus der Dokumentation:

    The cache directory is used to cache the state of the accessories. It must point to a valid and empty directory and the user that runs homebridge must have write access.

    Also eigentlich muss der Ordner nur vorhanden und leer sein, und außerdem benötigst du Schreibrechte auf den Ordner.



  • danke, das funktioniert nun und die Temperatur wird angezeigt, allerdings steht die Temperatur dauerhaft auf 0 grad, woran kann das liegen?