Problema de integración Philips Hue

Sin embargo, no he encontrado cómo formatear correctamente mi copia/pega de extracto de registro… :frowning:

También tengo estos errores…

Hola, usas esta etiqueta para el código </> en el editor de texto.

No veo « Starting philips-hue service » en tus registros, eso no es normal, ¿crees que detuviste el servicio manualmente?

Eso no es normal, supongo que estás conectado a través de http://gladys.local? Es raro que no pueda hacer la resolución DNS local durante la conexión websocket cuando puede hacerlo en tu navegador en HTTP…

¿Puedes probar con la IP y mostrarnos los mismos registros?

Tienes una caja de internet poco común (box 4G), y no me sorprendería que este tipo de caja esté configurada de manera diferente a los enrutadores tradicionales en términos de red.

Buenas noches a todos,

Me he conectado con la dirección IP y he iniciado/detendido el servicio Philips…

> gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js

 Initialising OpenZWave 1.6.1051 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
 2021-02-03T12:55:03+0100 <info> index.js:19 (Object.start) Starting telegram service
 2021-02-03T12:55:03+0100 <info> index.js:13 (Object.start) Starting usb service
 2021-02-03T12:55:05+0100 <info> connect.js:38 (MqttClient.<anonymous>) Connected to MQTT server mqtt://localhost
 2021-02-03T12:55:05+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic gladys/master/#
 2021-02-03T12:55:05+0100 <info> index.js:20 (Object.start) Starting Open Weather service
 2021-02-03T12:55:05+0100 <info> service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
 2021-02-03T12:55:05+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
 2021-02-03T12:55:06+0100 <error> index.js:19 (process.<anonymous>) uncaughtException catched: uncaughtException
 2021-02-03T12:55:06+0100 <error> index.js:20 (process.<anonymous>) Error: ENODEV, No such device
     at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
     at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
     at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
     at processTicksAndRejections (internal/process/task_queues.js:79:11) {
   errno: 19,
   code: 'ENODEV',
   syscall: 'bind'
 }
 2021-02-03T12:55:06+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic stat/+/+
 2021-02-03T12:55:06+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic tele/+/+
 2021-02-03T12:55:06+0100 <info> index.js:16 (Object.start) Starting zwave service
 2021-02-03T12:55:06+0100 <info> service.start.js:40 (Service.start) Service zwave is not configured, so it was not started.
 2021-02-03T12:55:07+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 80
 2021-02-03T14:55:07+0100 <info> gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
 2021-02-03T16:55:07+0100 <info> gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
 2021-02-03T18:55:07+0100 <info> gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
 2021-02-03T20:55:07+0100 <info> gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.

Todavía no hay « starting Philips service » en el registro…
¿No sería mejor que empezara de cero, con una instalación limpia???

Hervé

oops… olvidé las últimas líneas del registro :

     (node:24) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 scanStop listeners added to [Noble]. Use emitter.setMaxListeners() to increase limit
 2021-02-03T22:28:48+0100 <info> light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
 2021-02-03T22:28:58+0100 <info> light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
 2021-02-03T22:29:37+0100 <info> light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges

Bueno, creo que falta una parte de los registros, pero en sí no es grave porque el servicio de Philips no escribe nada al inicio (nivel de registro diferente)

Ejemplo en mi caso

> gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js

Initialising OpenZWave 1.6.1051 binary addon for Node.JS.

	OpenZWave Security API is ENABLED
	ZWave device db    : /usr/local/etc/openzwave
	User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
	Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true


2021-02-03T23:26:11+0100 <info> connect.js:38 (MqttClient.<anonymous>) Connected to MQTT server mqtt://192.168.1.42:1883
2021-02-03T23:26:11+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic gladys/master/#
2021-02-03T23:26:11+0100 <info> index.js:19 (Object.start) Starting telegram service
2021-02-03T23:26:12+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2021-02-03T23:26:13+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
2021-02-03T23:26:13+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic stat/+/+
2021-02-03T23:26:13+0100 <info> subscribe.js:12 (MqttHandler.subscribe) Subscribing to MQTT topic tele/+/+
2021-02-03T23:26:13+0100 <info> index.js:16 (Object.start) Starting zwave service
2021-02-03T23:26:14+0100 <info> index.js:13 (Object.start) Starting usb service
2021-02-03T23:26:14+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 8012
2021-02-03T23:26:14+0100 <info> index.js:743 (Socket.<anonymous>) Gladys Gateway: connected in websockets

Para ver el estado de los servicios es a través de la interfaz

Para dar formato a tus publicaciones puedes ayudarte de este tema => [TUTORIEL] Formater son code dans un message: Aidez nous à vous aider ;)

Sí, exactamente, uso esta interfaz para verificar, iniciar o detener los servicios.
De hecho, el servicio Bluetooth parece estar fallando también, tanto en la interfaz como en los registros… pero quizás sea normal porque no he configurado nada en el lado de la Raspberry.

Lol no es cierto ^^ aquí parto de una instalación fresca, así que 0 escenas ^^

¿Has intentado, como hice yo antes, esperar 30 minutos / 1 hora haciendo refrescos regulares? Aunque no sea normal, puede ser un indicador si los dos reproducimos lo mismo.

¿Has vuelto a hacer un « inspeccionar » en la página web? ¿Y sigues teniendo los mismos errores? ¿Puedes ir también a la pestaña « network » de esa ventana « inspeccionar » y hacernos una captura de pantalla de las diferentes respuestas (para ello abre la pestaña network y luego haz un refresco de la página de configuración Philips-hue, deberían aparecer cosas abajo)?

@Herve he entrado en más detalle en la integración, y acabo de recordar que para encontrar los puentes en la red se hace un N-UPnP Search que se basa en la API de Philips Hue:

Por lo tanto, ¿tu puente está registrado en Philips Hue?

Quizás deberíamos añadirlo a la documentación en este caso

@pierre-gilles, sí, mi puente está registrado en Philips Hue y funciona.

Por cierto, ¿cómo debo usar el comando N-UPnP Search?

No tienes que hacer nada, hablaba del código en Gladys. Es Gladys quien hace la búsqueda N-UPnP :slight_smile:

Buenas noches a todos,

Acabo de reinstalar desde cero usando la imagen v4.0.4 rev4… y nada, el puente no es detectado a pesar de los refrescos durante 2 días…
Aquí está el log completo y captura de pantalla:

 > gladys-server@ start:prod /src/server

cross-env NODE_ENV=production node index.js
2021-02-22T17:58:06+0100 20210129155044-multi-user.js:23 (Object.up) Migración multi-usuario: 0 usuarios encontrados
Inicializando complemento binario OpenZWave 1.6.0 para Node.JS.
La API de seguridad de OpenZWave está HABILITADA
Base de datos de dispositivos ZWave: /usr/local/etc/openzwave
Ruta de configuración del usuario: /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
Sobrescribir opciones: --Logging false --ConsoleOutput false --SaveConfiguration true
2021-02-22T17:58:14+0100 index.js:19 (Object.start) Iniciando servicio de ejemplo
2021-02-22T17:58:14+0100 index.js:18 (Object.start) Iniciando servicio Philips Hue
2021-02-22T17:58:14+0100 index.js:16 (Object.start) Iniciando servicio RTSP
2021-02-22T17:58:14+0100 index.js:51 (Object.start) Iniciando servicio CalDAV
2021-02-22T17:58:14+0100 index.js:16 (Object.start) Iniciando servicio MQTT
2021-02-22T17:58:15+0100 updateContainer.js:13 (MqttHandler.updateContainer) MQTT: verificando cambios necesarios…
2021-02-22T17:58:15+0100 service.start.js:40 (Service.start) El servicio mqtt no está configurado, por lo que no se inició.
2021-02-22T17:58:15+0100 index.js:20 (Object.start) Iniciando servicio Open Weather
2021-02-22T17:58:15+0100 service.start.js:40 (Service.start) El servicio openweather no está configurado, por lo que no se inició.
2021-02-22T17:58:15+0100 index.js:18 (Object.start) Iniciando servicio TP-Link
2021-02-22T17:58:15+0100 index.js:17 (Object.start) Iniciando servicio eWeLink
2021-02-22T17:58:15+0100 service.start.js:40 (Service.start) El servicio ewelink no está configurado, por lo que no se inició.
2021-02-22T17:58:15+0100 index.js:15 (Object.start) Iniciando servicio Bluetooth
2021-02-22T17:58:16+0100 index.js:19 (process.) Se capturó una excepción no controlada: uncaughtException
2021-02-22T17:58:16+0100 index.js:20 (process.) Error: ENODEV, No such device
at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
errno: 19,
code: ‹ ENODEV ›,
syscall: ‹ bind ›
}
2021-02-22T17:58:16+0100 index.js:15 (Object.start) Iniciando servicio Tasmota
2021-02-22T17:58:16+0100 index.js:16 (Object.start) Iniciando servicio zwave
2021-02-22T17:58:16+0100 bluetooth.initPresenceScanner.js:18 (BluetoothManager.initPresenceScanner) Configuración de Bluetooth: iniciando escáner de presencia
2021-02-22T17:58:16+0100 service.start.js:40 (Service.start) El servicio zwave no está configurado, por lo que no se inició.
2021-02-22T17:58:16+0100 index.js:14 (Object.start) Iniciando servicio Xiaomi
2021-02-22T17:58:16+0100 index.js:13 (Object.start) Iniciando servicio usb
2021-02-22T17:58:16+0100 index.js:19 (Object.start) Iniciando servicio Telegram
2021-02-22T17:58:16+0100 service.start.js:40 (Service.start) El servicio telegram no está configurado, por lo que no se inició.
2021-02-22T17:58:17+0100 index.js:63 (Server.) Servidor escuchando en el puerto 80
2021-02-22T19:58:16+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-22T21:58:16+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-22T23:58:16+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T01:58:16+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T02:52:11+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:16+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:21+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:30+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:34+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:38+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:43+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T02:52:48+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gladys-server@ start:prod: cross-env NODE_ENV=production node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gladys-server@ start:prod 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! /root/.npm/_logs/2021-02-23T01_59_50_051Z-debug.log
gladys-server@ start:prod /src/server
cross-env NODE_ENV=production node index.js
Initialising OpenZWave 1.6.0 binary addon for Node.JS.
OpenZWave Security API is ENABLED
ZWave device db : /usr/local/etc/openzwave
User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2021-02-23T03:05:05+0100 index.js:19 (Object.start) Iniciando servicio de ejemplo
2021-02-23T03:05:05+0100 index.js:18 (Object.start) Iniciando servicio Philips Hue
2021-02-23T03:05:05+0100 index.js:16 (Object.start) Iniciando servicio MQTT
2021-02-23T03:05:05+0100 updateContainer.js:13 (MqttHandler.updateContainer) MQTT: verificando cambios necesarios…
2021-02-23T03:05:05+0100 service.start.js:40 (Service.start) El servicio mqtt no está configurado, por lo que no se inició.
2021-02-23T03:05:06+0100 index.js:51 (Object.start) Iniciando servicio CalDAV
2021-02-23T03:05:06+0100 index.js:20 (Object.start) Iniciando servicio Open Weather
2021-02-23T03:05:06+0100 service.start.js:40 (Service.start) El servicio openweather no está configurado, por lo que no se inició.
2021-02-23T03:05:06+0100 index.js:18 (Object.start) Iniciando servicio TP-Link
2021-02-23T03:05:06+0100 index.js:17 (Object.start) Iniciando servicio eWeLink
2021-02-23T03:05:06+0100 service.start.js:40 (Service.start) El servicio ewelink no está configurado, por lo que no se inició.
2021-02-23T03:05:06+0100 index.js:15 (Object.start) Iniciando servicio Bluetooth
2021-02-23T03:05:07+0100 index.js:19 (process.) Se capturó una excepción no controlada: uncaughtException
2021-02-23T03:05:07+0100 index.js:20 (process.) Error: ENODEV, No such device
at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
errno: 19,
code: ‹ ENODEV ›,
syscall: ‹ bind ›
}
2021-02-23T03:05:07+0100 bluetooth.initPresenceScanner.js:18 (BluetoothManager.initPresenceScanner) Configuración de Bluetooth: iniciando escáner de presencia
2021-02-23T03:05:07+0100 index.js:15 (Object.start) Iniciando servicio Tasmota
2021-02-23T03:05:07+0100 index.js:16 (Object.start) Iniciando servicio zwave
2021-02-23T03:05:07+0100 service.start.js:40 (Service.start) El servicio zwave no está configurado, por lo que no se inició.
2021-02-23T03:05:07+0100 index.js:14 (Object.start) Iniciando servicio Xiaomi
2021-02-23T03:05:07+0100 index.js:13 (Object.start) Iniciando servicio usb
2021-02-23T03:05:07+0100 index.js:19 (Object.start) Iniciando servicio Telegram
2021-02-23T03:05:07+0100 service.start.js:40 (Service.start) El servicio telegram no está configurado, por lo que no se inició.
2021-02-23T03:05:07+0100 index.js:16 (Object.start) Iniciando servicio RTSP
2021-02-23T03:05:08+0100 index.js:63 (Server.) Servidor escuchando en el puerto 80
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gladys-server@ start:prod: cross-env NODE_ENV=production node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Error al ejecutar el script start:prod de gladys-server.
npm ERR! Esto probablemente no es un problema con npm. Es probable que haya más salida de registro adicional arriba.
npm ERR! Se puede encontrar un registro completo de esta ejecución en:
npm ERR! /root/.npm/_logs/2021-02-23T02_09_20_839Z-debug.log
gladys-server@ start:prod /src/server
cross-env NODE_ENV=production node index.js
Inicializando complemento binario OpenZWave 1.6.0 para Node.JS.
API de seguridad OpenZWave está HABILITADA
Base de datos de dispositivos ZWave: /usr/local/etc/openzwave
Ruta de configuración del usuario: /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
Sobrescribir opciones: --Logging false --ConsoleOutput false --SaveConfiguration true
2021-02-23T03:10:47+0100 index.js:16 (Object.start) Iniciando servicio RTSP
2021-02-23T03:10:48+0100 index.js:51 (Object.start) Iniciando servicio CalDAV
2021-02-23T03:10:48+0100 index.js:19 (Object.start) Iniciando servicio de ejemplo
2021-02-23T03:10:48+0100 index.js:18 (Object.start) Iniciando servicio Philips Hue
2021-02-23T03:10:48+0100 index.js:16 (Object.start) Iniciando servicio MQTT
2021-02-23T03:10:48+0100 updateContainer.js:13 (MqttHandler.updateContainer) MQTT: verificando cambios necesarios…
2021-02-23T03:10:48+0100 service.start.js:40 (Service.start) El servicio mqtt no está configurado, por lo que no se inició.
2021-02-23T03:10:48+0100 index.js:20 (Object.start) Iniciando servicio Open Weather
2021-02-23T03:10:48+0100 service.start.js:40 (Service.start) El servicio openweather no está configurado, por lo que no se inició.
2021-02-23T03:10:48+0100 index.js:18 (Object.start) Iniciando servicio TP-Link
2021-02-23T03:10:48+0100 index.js:17 (Object.start) Iniciando servicio eWeLink
2021-02-23T03:10:48+0100 service.start.js:40 (Service.start) El servicio ewelink no está configurado, por lo que no se inició.
2021-02-23T03:10:48+0100 index.js:15 (Object.start) Iniciando servicio Bluetooth
2021-02-23T03:10:49+0100 index.js:19 (process.) Se capturó una excepción no controlada: uncaughtException
2021-02-23T03:10:49+0100 index.js:20 (process.) Error: ENODEV, No such device
at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
errno: 19,
code: ‹ ENODEV ›,
syscall: ‹ bind ›
}
2021-02-23T03:10:50+0100 bluetooth.initPresenceScanner.js:18 (BluetoothManager.initPresenceScanner) Configuración de Bluetooth: iniciando escáner de presencia
2021-02-23T03:10:50+0100 index.js:15 (Object.start) Iniciando servicio Tasmota
2021-02-23T03:10:50+0100 index.js:16 (Object.start) Iniciando servicio zwave
2021-02-23T03:10:50+0100 service.start.js:40 (Service.start) El servicio zwave no está configurado, por lo que no se inició.
2021-02-23T03:10:50+0100 index.js:14 (Object.start) Iniciando servicio Xiaomi
2021-02-23T03:10:50+0100 index.js:13 (Object.start) Iniciando servicio usb
2021-02-23T03:10:50+0100 index.js:19 (Object.start) Iniciando servicio Telegram
2021-02-23T03:10:50+0100 service.start.js:40 (Service.start) El servicio telegram no está configurado, por lo que no se inició.
2021-02-23T03:10:50+0100 index.js:63 (Server.) Servidor escuchando en el puerto 80
2021-02-23T03:11:13+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T03:11:32+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T03:11:39+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T03:11:44+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T03:11:49+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T03:26:07+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:36:05+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:36:10+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:36:14+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:36:19+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:38:58+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T04:39:02+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Se encontraron 0 puentes
2021-02-23T05:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T07:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T09:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T11:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T13:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T15:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T17:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T19:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T21:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T23:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) La instancia no está conectada a Gladys Gateway, no se realiza copia de seguridad.
2021-02-23T23:14:21+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:14:26+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:14:35+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:15:21+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:15:27+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:20:24+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:20:28+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:29:21+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:29:26+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:29:45+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:30:00+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:54:26+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:54:29+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-23T23:54:39+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T00:56:46+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T00:57:03+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T00:57:24+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:03:28+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:03:31+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:03:40+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:03:45+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:09:56+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:00+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:04+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:07+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:11+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:15+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T01:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T02:04:02+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:04:20+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:04:42+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:04:48+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:20+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:28+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:35+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:39+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:43+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:05:47+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T02:45:13+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:08:22+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:08:34+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:08:39+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:09:32+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:09:37+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:09:44+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:09:48+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:10:40+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T03:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T05:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T07:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T09:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T11:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T13:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T15:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T17:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T19:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T21:04:28+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T21:06:12+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T21:10:50+0100 gateway.checkIfBackupNeeded.js:9 (Gateway.checkIfBackupNeeded) Instance not connected to Gladys Gateway, not backing up.
2021-02-24T21:15:42+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges
2021-02-24T21:16:26+0100 light.getBridges.js:10 (PhilipsHueLightHandler.getBridges) PhilipsHueService: Found 0 bridges

¿Qué opinan?
Hervé

@pierre-gilles

La API recomienda usar upnpSearch como alternativa si el primer método no funciona, ¿hay alguna razón para no hacerlo o se puede intentar?

@VonOx no funciona !

Veo dos posibilidades de arreglo:

  • Primero, actualizar la lib a la última versión (4.0.9), donde nosotros usamos la 3.4.0. Quizás hay cambios en la API de Philips Hue que hacen que algunos bridges ya no se devuelvan
  • Luego, agregar un caso, si el resultado del nUpnp search es un array vacío, lanzar un Upnp search

@VonOx ¿podrías hacer una PR? o ¿me encargo yo? :slight_smile:

Edición: hecho, PR aquí: Upgrade philips-hue dependency to 4.0.9 & improve bridge search by Pierre-Gilles · Pull Request #1080 · GladysAssistant/Gladys · GitHub

@Herve no veo nada malo de tu lado. Como se dijo más arriba con Vincent, quizás hay cambios en el código que podrían ayudar en la detección en tu caso. Tenemos que codificarlo, y volveremos a ti con un posible arreglo (que no está garantizado de funcionar, pero bueno, hay que intentarlo :stuck_out_tongue: )

Veo que ya lo has hecho :wink:

No habría tenido tiempo antes de este fin de semana

@VonOx En realidad creo que vamos a abandonar el nupnp-search… la API ha cambiado y ya no devuelve la información que necesitamos. Siempre hay que pasar por el search local en todos los casos.

No está mal, al menos no hay llamadas a la nube que podrían hacer explotar Gladys :slight_smile:

@VonOx ¿Podrías probar « en vivo » mi PR? No tengo un dispositivo Philips Hue a mano

Este fin de semana, sí, sin problemas

Hoy probé y tengo un problema con las lámparas Hue Ambiance:

2021-02-27T12:14:10+0100 <debug> device.notify.js:35 (DeviceManager.notify) Function device.postCreate in service undefined does not exist.
2021-02-27T12:14:13+0100 <trace> errorMiddleware.js:49 (errorMiddleware) TypeError: Cannot read property 'capabilities' of undefined
    at getPhilipsHueWhiteTemperatureLight (/Users/cyril.be.home/workspace/Gladys/server/services/philips-hue/lib/models/whiteWithTemperature.js:48:37)
    at /Users/cyril.be.home/workspace/Gladys/server/services/philips-hue/lib/light/light.getLights.js:43:31
    at Array.forEach (<anonymous>)
    at /Users/cyril.be.home/workspace/Gladys/server/services/philips-hue/lib/light/light.getLights.js:31:12
From previous event:
    at processImmediate (internal/timers.js:461:21)
From previous event:
    at PhilipsHueLightHandler.getLights (/Users/cyril.be.home/workspace/Gladys/server/services/philips-hue/lib/light/light.getLights.js:23:17)
    at getLights (/Users/cyril.be.home/workspace/Gladys/server/services/philips-hue/api/hue.controller.js:31:49)

Cuando registro el objeto philipsHueLight, los datos ya no están en _rawData sino en _data.

A corregir en:

  • server/services/philips-hue/lib/models/colorWithTemperature.js (líneas 59/60)
  • server/services/philips-hue/lib/models/whiteWithTemperature.js (líneas 48/49)

Lo mismo para las escenas (aunque no las usemos):

  • server/services/philips-hue/lib/light/light.getScenes.js (línea 27)

Lo confirmo, acabo de probar (la búsqueda del puente está bien)