De hecho, el problema viene de los dispositivos que no tienen una habitación asignada.
He hecho una PR que corrige el problema:
master ← fix-mcp-server-for-devices-with-no-room
ouvert 04:01PM - 03 Nov 25 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [x] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Fix error:
```
2025-11-03T15:04:03+0100 <warn> service.start.js:44 (Service.start) Unable to start service mcp TypeError: Cannot read properties of null (reading 'selector')
at /src/server/services/mcp/lib/buildSchemas.js:41:28
at Array.forEach (<anonymous>)
at MCPHandler.getAllResources (/src/server/services/mcp/lib/buildSchemas.js:28:17)
at MCPHandler.createServer (/src/server/services/mcp/lib/createServer.js:26:4)
at Object.start (/src/server/services/mcp/index.js:29:5)
at Service.start (/src/server/lib/service/service.start.js:33:7)
```
Gladys v4.65.1 en curso de compilación con el parche…
¡La corrección ya está en vivo!
Ah, no sabía que podíamos tener dispositivos sin una pieza asociada.
Gracias por tu corrección rápida, no tuve tiempo de ver el mensaje. De lo que vi, has eliminado estos dispositivos sin pieza del esquema MCP. Podríamos tener en cuenta estos dispositivos asignándoles una pieza por defecto “cross-room” o algo similar (solo en el esquema MCP), ¿qué opinas? Imagino que para quienes lo usan, sería interesante tener, por ejemplo, el linky en los datos enviados al cliente MCP.
Por defecto los dispositivos no tienen piezas, por lo que es bastante común
¡Hice un parche rápido pero bastante para hacer una pieza por defecto!
Estoy añadiendo una nueva herramienta al servicio MCP. El objetivo es recuperar un historial de valores y no solo el estado actual. Una vez obtenida la lista de datos, se puede utilizar el poder de los LLM para estudiar la evolución, comparar…
Como con los gráficos, se puede recuperar la última hora, las últimas 12 horas, el último día, la última semana, el último mes, los últimos 3 meses o el último año.
Pequeña demostración
La PR
master ← bertrandda:feat/mcp-history
ouvert 09:05PM - 17 Nov 25 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([forum](https://community.gladysassistant.com/)) for testing before merging.
- [x] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
I added new tool to retrieve feature value history
I also try [toon](https://github.com/toon-format/toon) as response encoding to reduce token used by llm
Como la primera vez, una imagen está disponible bertrandda/gladys:mcp-server
¡El estilo avanza muy bien!
Dime cuando necesites una revisión de la PR
Una nueva imagen está disponible con algunos arreglos.
@pierre-gilles creo que estamos listos para comenzar la revisión.
Para mí está bien, está fusionado y saldrá en la próxima versión de Gladys
Para información…
¿Buena noticia para Gladys assistant, no?
Sí, es una buena noticia. No podremos llamarlos directamente en Gladys, pero tu agente podrá interactuar con los servicios de Google además de los datos de Gladys.