diff --git a/package.json b/package.json index 93496b9..19b6738 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "private": true, + "private": false, "displayName": "Node Red plugin for Homebridge", "name": "@helander/homebridge-node-red", - "version": "2.0.0", + "version": "2.0.1", "description": "Run Node Red inside Homebridge.", "license": "Apache-2.0", "repository": { diff --git a/src/platform.ts b/src/platform.ts index 5171e5a..6cb3d2e 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -69,6 +69,7 @@ export class NodeRedHomebridgePlatform implements DynamicPlatformPlugin { }; // On first startup, create a hb-conf node representing the local homebridge. + if (!fs.existsSync(settings.userDir)) fs.mkdirSync(settings.userDir); const flowFilePath = `${settings.userDir}/${settings.flowFile}`; if (!fs.existsSync(flowFilePath)) { this.log.info('Flows file did not exist => create one with a hb-config included');