Installation environnement de dev sur Mac

Bonjour,

J’essaye d’installer l’environnement de dev sur Mac (Gladys v4) et impossible d’aller au bout de l’install’ :frowning: si quelqu’un qui est sur mac pouvait m’aider ? :slight_smile:

Ce que j’ai installé :

  • Node v13.6.0
  • sqlit3 v3.24.0
  • openssl v1.1 1.1.1d installée avec homebrew
  • openzwave v1.6.962 installée avec homebrew
  • libopenzwave1.5-dev → impossible de la trouver

J’ai ensuite tenté le npm install du server mais ça échoue avec l’erreur Failed at the openzwave-shared@1.5.8 install script., j’imagine à cause de la libraire non installée.

Où puis-je trouver cette librairie ?

Merci d’avance

ça ne devrait pas poser problème, normalement tu peux faire tourner le server sans le service Z-Wave, tu es sur que ce n’est pas un warning?

Si tu veux vraiment faire fonctionner le Z-Wave, je te conseille de lire les recommandations de la lib node openzwave-shared que nous utilisons, j’ai trouvé notamment cette issue qui semble intéressant =>

Ou tout simplement le README qui propose d’installer open-zwave manuellement from source, via un git clone du repo open-zwave.

Then, you could either pull down the OZW repo from Github and do a make && sudo make install

Merci pour ta réponse Pierre-Gilles.

J’avais bien tenté d’installer openzwave de cette manière sans plus de succès.

En fait c’est la deuxième fois que je tente l’installation de l’environment de dev, à chaque fois je n’arrive pas à aller jusqu’au bout. Les deux serveurs démarrent, mais j’ai un Cannot GET / quand je vais sur localhost:1443.

Les seuls erreurs ou warnings que j’ai sont côté serveur, à propos de zwave, donc je me suis dit que c’était pour cette raison que ça ne fonctionnait pas, mais c’est aussi bien si le service n’est pas nécessaire.

Voici les logs du npm install :


> gladys-server@ postinstall /Users/alexandraduval/Documents/dev/gladys4/server
> node ./cli/install_service_dependencies.js

2020-03-11T09:40:44+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/darksky
npm WARN gladys-darksky@ No description
npm WARN gladys-darksky@ No repository field.
npm WARN gladys-darksky@ No license field.

2020-03-11T09:40:45+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/example
npm WARN gladys-example@ No repository field.
npm WARN gladys-example@ No license field.

2020-03-11T09:40:46+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/mqtt
npm WARN gladys-mqtt@ No description
npm WARN gladys-mqtt@ No repository field.
npm WARN gladys-mqtt@ No license field.

2020-03-11T09:40:47+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/philips-hue
npm WARN gladys-hue@1.0.0 No description
npm WARN gladys-hue@1.0.0 No repository field.
npm WARN gladys-hue@1.0.0 No license field.

2020-03-11T09:40:48+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/rtsp-camera
npm WARN gladys-rtsp-camera@1.0.0 No description
npm WARN gladys-rtsp-camera@1.0.0 No repository field.
npm WARN gladys-rtsp-camera@1.0.0 No license field.

2020-03-11T09:40:49+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/sonoff
npm WARN gladys-sonoff@1.0.0 No description
npm WARN gladys-sonoff@1.0.0 No repository field.
npm WARN gladys-sonoff@1.0.0 No license field.

2020-03-11T09:40:51+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/telegram
npm WARN gladys-telegram@ No description
npm WARN gladys-telegram@ No repository field.
npm WARN gladys-telegram@ No license field.

2020-03-11T09:40:52+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/usb
npm WARN gladys-usb@ No description
npm WARN gladys-usb@ No repository field.
npm WARN gladys-usb@ No license field.

2020-03-11T09:40:54+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/xiaomi
npm WARN gladys-xiaomi@ No description
npm WARN gladys-xiaomi@ No repository field.
npm WARN gladys-xiaomi@ No license field.

2020-03-11T09:40:56+0100 <info> install_service_dependencies.js:17 () Installing dependencies in folder /Users/alexandraduval/Documents/dev/gladys4/server/services/zwave
In file included from ../src/callbacks.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-config.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-driver.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-groups.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
../src/openzwave-groups.cc:95:10: error: no matching member function for call to 'Set'
                        info->Set(
                        ~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/openzwave-groups.cc:99:10: error: no matching member function for call to 'Set'
                        info->Set(
                        ~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/openzwave-groups.cc:104:14: error: no matching member function for call to 'Set'
                        o_assocs->Set(Nan::New<Integer>(i), info);
                        ~~~~~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 warning and 3 errors generated.
make: *** [Release/obj.target/openzwave_shared/src/openzwave-groups.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/13.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alexandraduval/Documents/dev/gladys4/server/services/zwave/node_modules/openzwave-shared
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN gladys-zwave@ No description
npm WARN gladys-zwave@ No repository field.
npm WARN gladys-zwave@ No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openzwave-shared@1.5.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openzwave-shared@1.5.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alexandraduval/.npm/_logs/2020-03-11T08_41_05_491Z-debug.log
2020-03-11T09:41:05+0100 <warn> install_service_dependencies.js:23 () Error: Command failed: cd /Users/alexandraduval/Documents/dev/gladys4/server/services/zwave && npm install --unsafe-perm
In file included from ../src/callbacks.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-config.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-driver.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
1 warning generated.
In file included from ../src/openzwave-groups.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^~~~~~~~
         "node.h"
../src/openzwave-groups.cc:95:10: error: no matching member function for call to 'Set'
                        info->Set(
                        ~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/openzwave-groups.cc:99:10: error: no matching member function for call to 'Set'
                        info->Set(
                        ~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/openzwave-groups.cc:104:14: error: no matching member function for call to 'Set'
                        o_assocs->Set(Nan::New<Integer>(i), info);
                        ~~~~~~~~~~^~~
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/alexandraduval/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 warning and 3 errors generated.
make: *** [Release/obj.target/openzwave_shared/src/openzwave-groups.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/13.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alexandraduval/Documents/dev/gladys4/server/services/zwave/node_modules/openzwave-shared
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN gladys-zwave@ No description
npm WARN gladys-zwave@ No repository field.
npm WARN gladys-zwave@ No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openzwave-shared@1.5.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openzwave-shared@1.5.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alexandraduval/.npm/_logs/2020-03-11T08_41_05_491Z-debug.log

    at checkExecSyncError (child_process.js:611:11)
    at execSync (child_process.js:647:15)
    at /Users/alexandraduval/Documents/dev/gladys4/server/cli/install_service_dependencies.js:19:5
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/alexandraduval/Documents/dev/gladys4/server/cli/install_service_dependencies.js:16:13)
    at Module._compile (internal/modules/cjs/loader.js:1144:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
    at Module.load (internal/modules/cjs/loader.js:993:32)
    at Function.Module._load (internal/modules/cjs/loader.js:892:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 0a 3e 20 6f 70 65 6e 7a 77 61 76 65 2d 73 68 61 72 65 64 40 31 2e 35 2e 38 20 70 72 65 69 6e 73 74 61 6c 6c 20 2f 55 73 65 72 73 2f 61 6c 65 78 61 6e ... 611 more bytes>,
    <Buffer 49 6e 20 66 69 6c 65 20 69 6e 63 6c 75 64 65 64 20 66 72 6f 6d 20 2e 2e 2f 73 72 63 2f 63 61 6c 6c 62 61 63 6b 73 2e 63 63 3a 31 38 3a 0a 2e 2e 2f 73 ... 4827 more bytes>
  ],
  pid: 9706,
  stdout: <Buffer 0a 3e 20 6f 70 65 6e 7a 77 61 76 65 2d 73 68 61 72 65 64 40 31 2e 35 2e 38 20 70 72 65 69 6e 73 74 61 6c 6c 20 2f 55 73 65 72 73 2f 61 6c 65 78 61 6e ... 611 more bytes>,
  stderr: <Buffer 49 6e 20 66 69 6c 65 20 69 6e 63 6c 75 64 65 64 20 66 72 6f 6d 20 2e 2e 2f 73 72 63 2f 63 61 6c 6c 62 61 63 6b 73 2e 63 63 3a 31 38 3a 0a 2e 2e 2f 73 ... 4827 more bytes>
}
npm WARN eslint-config-airbnb@17.1.1 requires a peer of eslint-plugin-jsx-a11y@^6.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb@17.1.1 requires a peer of eslint-plugin-react@^7.14.2 but none is installed. You must install peer dependencies yourself.
npm WARN ts-enum-util@4.0.1 requires a peer of typescript@>= 2.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ts-type@1.2.9 requires a peer of @types/bluebird@* but none is installed. You must install peer dependencies yourself.
npm WARN gladys-server@ No description
npm WARN gladys-server@ No repository field.

audited 5406 packages in 27.033s

1 package is looking for funding
  run `npm fund` for details

found 112 vulnerabilities (97 low, 3 moderate, 11 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

La migration de la BDD ne me sort aucune erreur, et j’ai cette trace pour le npm start du serveur :

[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
2020-03-11T09:36:31+0100 <debug> brain.train.js:54 (Brain.train) Training brain...
2020-03-11T09:36:31+0100 <debug> brain.train.js:56 (Brain.train) Brain trained!
Initialising OpenZWave 1.6.962 binary addon for Node.JS.
  OpenZWave Security API is ENABLED
  ZWave device db    : /usr/local/Cellar/open-zwave/1.6.962/etc/openzwave
  User settings path : 
/Users/alexandraduval/Documents/dev/gladys4/server/node_modules/openzwave-shared/build/Release/../../
Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2020-03-11T09:36:31+0100 <log> index.js:16 (Object.start) starting MQTT service
2020-03-11T09:36:31+0100 <info> index.js:20 (Object.start) Starting Dark Sky service
2020-03-11T09:36:31+0100 <info> index.js:13 (Object.start) Starting usb service
2020-03-11T09:36:31+0100 <log> index.js:15 (Object.start) starting RTSP service
2020-03-11T09:36:31+0100 <info> index.js:16 (Object.start) Starting zwave service
2020-03-11T09:36:31+0100 <log> index.js:15 (Object.start) starting Sonoff service
2020-03-11T09:36:31+0100 <info> index.js:19 (Object.start) Starting telegram service
2020-03-11T09:36:31+0100 <log> index.js:18 (Object.start) starting Philips Hue service
2020-03-11T09:36:31+0100 <log> index.js:14 (Object.start) Starting Xiaomi service
2020-03-11T09:36:31+0100 <log> index.js:19 (Object.start) starting example service
2020-03-11T09:36:31+0100 <info> service.start.js:16 (Service.start) Service zwave is not configured, so it was not started.
2020-03-11T09:36:31+0100 <info> service.start.js:16 (Service.start) Service telegram is not configured, so it was not started.
2020-03-11T09:36:31+0100 <info> service.start.js:16 (Service.start) Service darksky is not configured, so it was not started.
2020-03-11T09:36:31+0100 <info> service.start.js:16 (Service.start) Service mqtt is not configured, so it was not started.
2020-03-11T09:36:31+0100 <debug> device.init.js:31 (DeviceManager.init) Device : init : Found 0 devices
2020-03-11T09:36:31+0100 <debug> scheduler.init.js:9 (Scheduler.init) Scheduler.init
2020-03-11T09:36:31+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 1443

Une idée de ce qui peut coincer ?

Le front est sur le port 1444, 1443 c’est le server.

https://documentation.gladysassistant.com/fr/development#setup-env

Comme dit @VonOx, tu essaie d’accéder au server, qui n’a pas de route /, l’erreur est normale !

Le port est localhost:1444

Alors la, je sais même pas comment j’ai fait pour inverser les deux !

Merci à tous les 2