Bonjour,
J’ai cherché pendant des jours, mais je n’ai rien trouver à ce sujet.
Après avoir installé et configurer Gladys V4 sur mon PC Windows afin de pouvoir faire du Dev.
La première étape est de mettre à jour la distribution:
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
Installation des outils/librairies:
sudo apt install sqlite3 make g++ git coreutils tzdata nmap openssl gzip udev -y
L’installation de node.js
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt install nodejs -y
La compilation de openzwave
git clone https://github.com/OpenZWave/open-zwave.git cd open-zwave git checkout 5d18bbfb21d8cdc61ee6baae6f478c963297dfc5 make sudo make install sudo sh -c "echo '/usr/local/lib64' > /etc/ld.so.conf.d/openzwave.conf" sudo ldconfig cd && rm -rf open-zwave
Ensuite j’ai cloné la repo Gladys
git clone https://github.com/GladysAssistant/Gladys gladys && cd gladys
J’ai installé les dépendances NPM, puis lancer la migration de DB
J’arrive enfin à lancer le serveur après quelques soucis lors de l’installation des dépendances NPM sur serveur.
udo@LAPTOP-4JPT1TSR:~/gladys/server$ npm start
> gladys-server@ start /home/udo/gladys/server
> cross-env NODE_ENV=development nodemon index.js
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
2021-05-04T10:58:49+0200 <debug> brain.train.js:59 (Brain.train) Training brain...
2021-05-04T10:58:49+0200 <debug> brain.train.js:61 (Brain.train) Brain trained!
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'node-hue-api'
Require stack:
- /home/udo/gladys/server/services/philips-hue/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.PhilipsHueService [as philips-hue] (/home/udo/gladys/server/services/philips-hue/index.js:8:21)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 4)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/philips-hue/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'ical'
Require stack:
- /home/udo/gladys/server/services/caldav/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.CalDAVService [as caldav] (/home/udo/gladys/server/services/caldav/index.js:7:16)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 1)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/caldav/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'node-telegram-bot-api'
Require stack:
- /home/udo/gladys/server/services/telegram/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.TelegramService [as telegram] (/home/udo/gladys/server/services/telegram/index.js:10:23)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 6)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/telegram/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'serialport'
Require stack:
- /home/udo/gladys/server/services/usb/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.ZwaveService [as usb] (/home/udo/gladys/server/services/usb/index.js:5:22)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 7)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/usb/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'openzwave-shared'
Require stack:
- /home/udo/gladys/server/services/zwave/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.ZwaveService [as zwave] (/home/udo/gladys/server/services/zwave/index.js:7:17)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 9)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/zwave/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'mqtt'
Require stack:
- /home/udo/gladys/server/services/mqtt/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.MqttService [as mqtt] (/home/udo/gladys/server/services/mqtt/index.js:6:16)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 3)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/mqtt/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'tplink-smarthome-api'
Require stack:
- /home/udo/gladys/server/services/tp-link/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.TpLinkService [as tp-link] (/home/udo/gladys/server/services/tp-link/index.js:7:22)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 13)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/tp-link/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'ewelink-api'
Require stack:
- /home/udo/gladys/server/services/ewelink/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.EwelinkService [as ewelink] (/home/udo/gladys/server/services/ewelink/index.js:7:22)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 12)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/ewelink/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'fluent-ffmpeg'
Require stack:
- /home/udo/gladys/server/services/rtsp-camera/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.RtspCameraService [as rtsp-camera] (/home/udo/gladys/server/services/rtsp-camera/index.js:7:18)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 5)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/rtsp-camera/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <debug> service.load.js:46 () Error: Cannot find module 'mqtt'
Require stack:
- /home/udo/gladys/server/services/zigbee2mqtt/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.Zigbee2mqttService [as zigbee2mqtt] (/home/udo/gladys/server/services/zigbee2mqtt/index.js:6:16)
at /home/udo/gladys/server/lib/service/service.load.js:38:65
at async Promise.all (index 14)
at async Service.load (/home/udo/gladys/server/lib/service/service.load.js:15:3)
at async Object.start (/home/udo/gladys/server/lib/index.js:106:9)
at async /home/udo/gladys/server/index.js:50:3 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/zigbee2mqtt/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <info> index.js:19 (Object.start) Starting example service
2021-05-04T10:58:49+0200 <info> index.js:15 (Object.start) Starting Bluetooth service
2021-05-04T10:58:49+0200 <debug> bluetooth.start.js:14 (BluetoothManager.start) Bluetooth: Listening Bluetooth events
2021-05-04T10:58:49+0200 <error> index.js:15 (process.<anonymous>) unhandledRejection catched: Promise {
<rejected> Error: Cannot find module '@abandonware/noble'
Require stack:
- /home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js
- /home/udo/gladys/server/services/bluetooth/lib/index.js
- /home/udo/gladys/server/services/bluetooth/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at BluetoothManager.start (/home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js:16:20)
at Object.start (/home/udo/gladys/server/services/bluetooth/index.js:16:22)
at Service.start (/home/udo/gladys/server/lib/service/service.start.js:33:21) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js',
'/home/udo/gladys/server/services/bluetooth/lib/index.js',
'/home/udo/gladys/server/services/bluetooth/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
}
2021-05-04T10:58:49+0200 <error> index.js:16 (process.<anonymous>) Error: Cannot find module '@abandonware/noble'
Require stack:
- /home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js
- /home/udo/gladys/server/services/bluetooth/lib/index.js
- /home/udo/gladys/server/services/bluetooth/index.js
- /home/udo/gladys/server/services/index.js
- /home/udo/gladys/server/lib/index.js
- /home/udo/gladys/server/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at BluetoothManager.start (/home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js:16:20)
at Object.start (/home/udo/gladys/server/services/bluetooth/index.js:16:22)
at Service.start (/home/udo/gladys/server/lib/service/service.start.js:33:21) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/udo/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js',
'/home/udo/gladys/server/services/bluetooth/lib/index.js',
'/home/udo/gladys/server/services/bluetooth/index.js',
'/home/udo/gladys/server/services/index.js',
'/home/udo/gladys/server/lib/index.js',
'/home/udo/gladys/server/index.js'
]
}
2021-05-04T10:58:49+0200 <info> index.js:14 (Object.start) Starting Xiaomi service
2021-05-04T10:58:49+0200 <info> index.js:15 (Object.start) Starting Tasmota service
2021-05-04T10:58:49+0200 <warn> service.start.js:44 (Service.start) Unable to start service tasmota TypeError: Cannot read property 'device' of null
at TasmotaMQTTHandler.connect (/home/udo/gladys/server/services/tasmota/lib/mqtt/tasmota.mqtt.connect.js:11:20)
at /home/udo/gladys/server/services/tasmota/lib/tasmota.connect.js:8:62
at Array.forEach (<anonymous>)
at TasmotaHandler.connect (/home/udo/gladys/server/services/tasmota/lib/tasmota.connect.js:8:33)
at Object.start (/home/udo/gladys/server/services/tasmota/index.js:16:20)
at Service.start (/home/udo/gladys/server/lib/service/service.start.js:33:21)
2021-05-04T10:58:49+0200 <info> index.js:20 (Object.start) Starting Open Weather service
2021-05-04T10:58:49+0200 <info> service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2021-05-04T10:58:49+0200 <debug> scene.init.js:12 (SceneManager.init) Scene.init
2021-05-04T10:58:49+0200 <debug> device.init.js:31 (DeviceManager.init) Device : init : Found 0 devices
2021-05-04T10:58:49+0200 <debug> scheduler.init.js:9 (Scheduler.init) Scheduler.init
2021-05-04T10:58:49+0200 <info> index.js:63 (Server.<anonymous>) Server listening on port 1443
Il y a plein de modules qui ne sont pas trouvé a priori … bon, je sais pas si c’est problématique car j’ai accès à l’interface de Gladys donc …
En revanche … “Gladys n’est connectée à aucune clé USB Z-Wave.” et aucune clé USB n’est trouvée Sachant que j’ai suivi l’installation de la doc … je vois pas à quel moment on utilise docker … car dans les prérequis il y Docker Desktop pour Windows … et j’ai vu dans le forum plein de solutions pour la clé USB Z-Wave mais Version Docker …
Donc j’ai besoin de votre aide à ce sujet …
Il semblerait également que mon instance Gladys n’est pas connecté à internet … en tout cas pas tout le temps …
PS : Si vous pouvez également m’aider à savoir comment faire pour pouvoir exécuter “Code .” depuis Ubuntu WSL, car ça fonctionne depuis mon powershell mais pas depuis mon Ubuntu