Tatsächlich liegt das Problem bei den Geräten, die keinem Raum zugeordnet sind!
Ich habe einen PR erstellt, der das Problem behebt:
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 im Build-Kurs mit dem Fix…
Ach, ich wusste nicht, dass es Geräte ohne zugeordneten Raum geben kann.
Danke für dein schnelles Fix, ich hatte keine Zeit, die Nachricht zu sehen. Soweit ich gesehen habe, hast du diese Geräte ohne Raum aus dem MCP-Schema entfernt. Man könnte diese Geräte möglicherweise berücksichtigen, indem man ihnen einen Standardraum wie „cross-room“ oder so etwas zuweist (nur im MCP-Schema), was hältst du davon? Ich stelle mir vor, dass es für diejenigen, die es nutzen, interessant wäre, zum Beispiel den Linky in den Daten zu haben, die an den MCP-Client zurückgesendet werden.
Standardmäßig haben Geräte keine Teile, also ist das relativ üblich
Ich habe einen schnellen Fix gemacht, aber einfach, um ein Standardteil zu erstellen!
Ich füge ein neues Tool zum MCP-Dienst hinzu. Das Ziel ist es, einen Verlauf von Werten zu erhalten und nicht nur den aktuellen Zustand. Sobald die Datenliste erhalten ist, kann man die Macht der LLMs nutzen, um die Entwicklung zu studieren, zu vergleichen…
Wie bei den Diagrammen kann man die letzten Stunde, die letzten 12 Stunden, den letzten Tag, die letzte Woche, den letzten Monat, die letzten 3 Monate oder das letzte Jahr abrufen.
Kleine Demo
Der 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
Wie beim ersten Mal ist ein Image verfügbar bertrandda/gladys:mcp-server
Das sieht ja super aus!!
Sag mir Bescheid, sobald du eine Review für den PR brauchst.
Ein neues Bild ist mit einigen Fixes verfügbar.
@pierre-gilles Ich denke, wir können mit der Überprüfung beginnen.
Super toll, ich werde es mir anschauen
Das ist für mich in Ordnung, es ist gemerged und wird in der nächsten Version von Gladys veröffentlicht
Zur Info…
Gute Neuigkeiten für Gladys Assistant, oder?
Ja, das sind gute Neuigkeiten. Wir können sie nicht direkt in Gladys aufrufen, aber dein Agent kann tatsächlich mit den Google-Diensten interagieren, zusätzlich zu den Gladys-Daten.