Xiaomi module rajout de détecteurs


#21

C’est super bizarre ça! Normalement le delete supprime de ls le processus. Peut-être un save à faire après ?


#22

ok c’était ça
après reboot je ne l’ai plus. merci bcp


#23

De rien. J’ai hâte de tes retours :slight_smile:


#24

installé sans pb, super boulot un grand merci
pas d’erreurs dans les logs
la page de conf est claire
j’ai retrouvé mes capteurs comme avant (avec un autre module pour xiaomi)
je n’ai qu’un température rond et un mouvement

pour ce qui est de la gestion de la gateway,
quand on change la luminosite apd l’appli android, ça se met à jour tout de suite dans l’inerface Gladys.
par contre ma gateway était éteinte quand j’ai installé le module alors les boutons de gestion de la gateway via interface Gladys ne marchent pas.
je vais réinstaller gateway allumée pour voir, ce serait un gros +


#25

Merci de ton retour : il suffit juste depuis Gladys de modifier la couleur/luminosité et c’est tout bon après :slight_smile:


#26

j’ai réinstallé le module,
je n’aurais pas dû… :smile:
je n’ai plus de valeurs de température
et pas mieux sur les boutons de la gateway
même après reboot.


#27

Il n’y a pas de raison, vérifie le pass de la gateway.
Tu n’as pas d’erreur dans les logs ?


#28

j’ai remis le mot de passe, sans résultat
j’active les logs du module
tiens, après reboot de gladys, je retrouve les valeurs de températures…
mais pas les boutons

0|gladys | Xiaomi gateway read : {“cmd”: “read”, “sid”: “158d0001f470f9”}
0|gladys | Xiaomi gateway read : {“cmd”: “read”, “sid”: “158d0002b49002”}
0|gladys | Gladys is up to date !
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Gateway’,
0|gladys | identifier: ‘7c49eb1905aa’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘light’,
0|gladys | type: ‘binary’,
0|gladys | unit: ‘’,
0|gladys | min: 0,
0|gladys | max: 1,
0|gladys | sensor: false },
0|gladys | { identifier: ‘intensity’,
0|gladys | type: ‘intensity’,
0|gladys | unit: ‘’,
0|gladys | min: 3,
0|gladys | max: 100,
0|gladys | sensor: false },
0|gladys | { identifier: ‘color’,
0|gladys | type: ‘color’,
0|gladys | unit: ‘’,
0|gladys | min: 0,
0|gladys | max: 16777215,
0|gladys | sensor: false },
0|gladys | { identifier: ‘illumination’,
0|gladys | type: ‘illumination’,
0|gladys | unit: ‘lux’,
0|gladys | min: 300,
0|gladys | max: 1300,
0|gladys | sensor: true } ] }
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 7c49eb1905aa, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = illumination, value = 400, _value = 400
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 7c49eb1905aa, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = light, value = 1, _value = 1
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = intensity, value = 100, _value = 100
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = color, value = 32511, _value = 32511
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = mGSDGY4ngVfLXMsj, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = my46enhu9uyy1df3, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = (msg) => {
0|gladys | this._socket.send(msg, 0, msg.length, SERVER_PORT, ip, (cb) => {
0|gladys | if (cb !== null) sails.log.error(cb)
0|gladys | })
0|gladys | }, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = true, _value = undefined
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Xiaomi Temperature & Humidity’,
0|gladys | identifier: ‘158d0001f470f9’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘battery’,
0|gladys | type: ‘battery’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘temperature’,
0|gladys | type: ‘temperature’,
0|gladys | unit: ‘°C’,
0|gladys | min: -100,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘humidity’,
0|gladys | type: ‘humidity’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true } ] }
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = temp_sensor, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = 158d0001f470f9, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = sensor_ht, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = temperature, value = 18.82, _value = 18.82
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = humidity, value = 60.32, _value = 60.32
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = battery, value = 63, _value = 63
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Xiaomi Motion sensor Aqara’,
0|gladys | identifier: ‘158d0002b49002’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘battery’,
0|gladys | type: ‘battery’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘binary’,
0|gladys | type: ‘binary’,
0|gladys | min: 0,
0|gladys | max: 1,
0|gladys | sensor: true },
0|gladys | { identifier: ‘lastmotion’,
0|gladys | type: ‘minutes’,
0|gladys | unit: ‘min’,
0|gladys | min: 0,
0|gladys | max: 5,
0|gladys | sensor: true },
0|gladys | { identifier: ‘illumination’,
0|gladys | type: ‘illumination’,
0|gladys | unit: ‘lux’,
0|gladys | min: 0,
0|gladys | max: 1200,
0|gladys | sensor: true } ] }
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = motion_sensor_aqara, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 158d0002b49002, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = sensor_motion.aq2, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = binary, value = null, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 0, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = illumination, value = 46, _value = 46
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = battery, value = 53, _value = 53


#29

Je ne vois pas d’erreur. Tu n’as rien dans la page de configuration du module, et pas d’autres devices créés ?


#30

rien ds la pg de config, pas de nouveau péiphérique ou de device créé
j’y vois bien ma passerelle, son id, son IP
dsl


#31

Passe le niveau de log à 8, et redémarre, avec la fenêtre des logs affichée. Attention, ça va défiler !!! Une fois que ça ne défile plus (genre peu de temps après que la page de login soit affichée), tu copies et colles les logs …


#32

pas de logs, rien de xiaomi avec log à 8…


#33

Oups, c’est ma mémoire qui flanche … désolé, c’est 9, pas 8


#35

Ok, la, tout est bon. Tu peux supprimer ce message ? Il y a ton mdp dedans :slight_smile:
Passe les logs à 4, et on recommence, si tu veux bien :slight_smile:


#36

et c’est parti :smile:
logs à 4

0|gladys | Event : create : new Event with code : devicetype-new-value
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Gateway’,
0|gladys | identifier: ‘7c49eb1905aa’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘light’,
0|gladys | type: ‘binary’,
0|gladys | unit: ‘’,
0|gladys | min: 0,
0|gladys | max: 1,
0|gladys | sensor: false },
0|gladys | { identifier: ‘intensity’,
0|gladys | type: ‘intensity’,
0|gladys | unit: ‘’,
0|gladys | min: 3,
0|gladys | max: 100,
0|gladys | sensor: false },
0|gladys | { identifier: ‘color’,
0|gladys | type: ‘color’,
0|gladys | unit: ‘’,
0|gladys | min: 0,
0|gladys | max: 16777215,
0|gladys | sensor: false },
0|gladys | { identifier: ‘illumination’,
0|gladys | type: ‘illumination’,
0|gladys | unit: ‘lux’,
0|gladys | min: 300,
0|gladys | max: 1300,
0|gladys | sensor: true } ] }
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Xiaomi Temperature & Humidity’,
0|gladys | identifier: ‘158d0001f470f9’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘battery’,
0|gladys | type: ‘battery’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘temperature’,
0|gladys | type: ‘temperature’,
0|gladys | unit: ‘°C’,
0|gladys | min: -100,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘humidity’,
0|gladys | type: ‘humidity’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true } ] }
0|gladys | Xiaomi createDevice.newDevice : { device:
0|gladys | { name: ‘Xiaomi Motion sensor Aqara’,
0|gladys | identifier: ‘158d0002b49002’,
0|gladys | protocol: ‘zigbee’,
0|gladys | service: ‘xiaomi-home’ },
0|gladys | types:
0|gladys | [ { identifier: ‘battery’,
0|gladys | type: ‘battery’,
0|gladys | unit: ‘%’,
0|gladys | min: 0,
0|gladys | max: 100,
0|gladys | sensor: true },
0|gladys | { identifier: ‘binary’,
0|gladys | type: ‘binary’,
0|gladys | min: 0,
0|gladys | max: 1,
0|gladys | sensor: true },
0|gladys | { identifier: ‘lastmotion’,
0|gladys | type: ‘minutes’,
0|gladys | unit: ‘min’,
0|gladys | min: 0,
0|gladys | max: 5,
0|gladys | sensor: true },
0|gladys | { identifier: ‘illumination’,
0|gladys | type: ‘illumination’,
0|gladys | unit: ‘lux’,
0|gladys | min: 0,
0|gladys | max: 1200,
0|gladys | sensor: true } ] }


#37

Idem, tout est bon. Il reste à controller la création des devicetypes, qui se fait avec un log à 5.
Sinon, vérifie quand même que c’est pas revenu, car ça peut selon la réponse des appareils Xiaomi.


#38

non pas revenu…

la suite en log 5

0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 7c49eb1905aa, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = illumination, value = 358, _value = 358
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = 7c49eb1905aa, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = gateway, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = light, value = 1, _value = 1
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = intensity, value = 100, _value = 100
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = color, value = 32511, _value = 32511
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = AWOv7AAd5H70J0bC, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = my46enhu9uyy1df3, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = (msg) => {
0|gladys | this._socket.send(msg, 0, msg.length, SERVER_PORT, ip, (cb) => {
0|gladys | if (cb !== null) sails.log.error(cb)
0|gladys | })
0|gladys | }, _value = undefined
0|gladys | Xiaomi createDeviceState :gateway 7c49eb1905aa, _devicetype = undefined, value = true, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = temp_sensor, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = 158d0001f470f9, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = sensor_ht, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = temperature, value = 19.33, _value = 19.33
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = humidity, value = 58.24, _value = 58.24
0|gladys | Xiaomi createDeviceState :temp_sensor 158d0001f470f9, _devicetype = battery, value = 63, _value = 63
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = motion_sensor_aqara, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 158d0002b49002, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = sensor_motion.aq2, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 192.168.1.35, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = binary, value = null, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = undefined, value = 0, _value = undefined
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = illumination, value = 0, _value = 0
0|gladys | Xiaomi createDeviceState :motion_sensor_aqara 158d0002b49002, _devicetype = battery, value = 53, _value = 53


#39

Tout est bon là aussi … je vais faire un test ce soir, et te tiens au courant demain au plus tard.
Désolé…


#40

Salut @clopance,
J’ai fais des tests, en essayant de me mettre dans la même configuration que toi, et je n’ai pas eu de problème.
Peux-tu refaire une mise à jour du module ?


#41

Bonjour,
la mise à jour a manifestement buggée :slight_smile:

0|gladys | Module installation failed! Cleaning folder
0|gladys | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|gladys | Error: Command failed: git clone --depth=1 https://github.com/piznel/gladys-xiaomi.git ./api/hooks/xiaomi-home
0|gladys | fatal: destination path ‘./api/hooks/xiaomi-home’ already exists and is not an empty directory.
0|gladys | at ChildProcess.exithandler (child_process.js:275:12)
0|gladys | at emitTwo (events.js:126:13)
0|gladys | at ChildProcess.emit (events.js:214:7)
0|gladys | at maybeClose (internal/child_process.js:925:16)
0|gladys | at Socket.stream.socket.on (internal/child_process.js:346:11)
0|gladys | at emitOne (events.js:116:13)
0|gladys | at Socket.emit (events.js:211:7)
0|gladys | at Pipe._handle.close [as _onclose] (net.js:554:12)
0|gladys | Module install : Fail to install NPM dependencies. Stderr :
0|gladys | Cloning into ‘./api/hooks/xiaomi-home’…
0|gladys | /home/pi/gladys/api/hooks/xiaomi-home/.git/: No such file or directory
0|gladys | Module installation failed! Cleaning folder
0|gladys | Unhandled rejection Error: Command failed: git clone --depth=1 https://github.com/piznel/gladys-xiaomi.git ./api/hooks/xiaomi-home
0|gladys | Cloning into ‘./api/hooks/xiaomi-home’…
0|gladys | /home/pi/gladys/api/hooks/xiaomi-home/.git/: No such file or directory
0|gladys | at ChildProcess.exithandler (child_process.js:275:12)
0|gladys | at emitTwo (events.js:126:13)
0|gladys | at ChildProcess.emit (events.js:214:7)
0|gladys | at maybeClose (internal/child_process.js:925:16)
0|gladys | at Socket.stream.socket.on (internal/child_process.js:346:11)
0|gladys | at emitOne (events.js:116:13)
0|gladys | at Socket.emit (events.js:211:7)
0|gladys | at Pipe._handle.close [as _onclose] (net.js:554:12)