zigbee2mqtt-mcp 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -154,8 +154,17 @@ npm run watch
154
154
  # Manual smoke test against a real instance
155
155
  Z2M_MQTT_URL=mqtt://192.168.1.10:1883 node scripts/smoke.mjs
156
156
  Z2M_MQTT_URL=mqtt://192.168.1.10:1883 node scripts/smoke.mjs z2m_list_devices '{"only_problems":true}'
157
+
158
+ # Sequential read-after-write test. Renames a device and creates a group, then
159
+ # restores both, including on failure. Set Z2M_TEST_DEVICE to pick the device,
160
+ # or ROUNDTRIP_GROUPS_ONLY=1 to skip the rename.
161
+ Z2M_MQTT_URL=mqtt://192.168.1.10:1883 node scripts/roundtrip.mjs
157
162
  ```
158
163
 
164
+ Note that an MCP server may receive requests concurrently. When testing ordering,
165
+ await each response before sending the next, as `roundtrip.mjs` does — piping
166
+ several requests at once will produce misleading results.
167
+
159
168
  ## Safety
160
169
 
161
170
  This server can remove devices from your network and flash firmware. Both are irreversible and OTA failures can brick hardware. Those tools live in the `full` tier, which is **not** enabled by default — you must opt in with `Z2M_WRITE_MODE=full`. Broker credentials are read from the environment and never logged.
package/dist/client.js CHANGED
@@ -244,9 +244,10 @@ export class Z2MClient {
244
244
  }
245
245
  });
246
246
  });
247
- // Zigbee2MQTT acknowledges before republishing its retained bridge topics.
248
- // Returning immediately would leave the cache stale, so a follow-up call
249
- // would not see a device that was just renamed, added or removed.
247
+ // Zigbee2MQTT acknowledges a request before republishing its retained bridge
248
+ // topics, so a caller could in principle read a stale cache immediately
249
+ // afterwards. Not reproducible against a local broker, where the republish
250
+ // always wins the race, but the ordering is not guaranteed. Bounded guard.
250
251
  if (!NON_MUTATING.has(subTopic)) {
251
252
  await this.awaitBridgeRefresh(revisionBefore);
252
253
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "zigbee2mqtt-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
+ "mcpName": "io.github.alexpfau/zigbee2mqtt-mcp",
4
5
  "description": "Model Context Protocol server for administering a Zigbee2MQTT estate: health reporting, network diagnostics, OTA updates, pairing and device management over the MQTT bridge API.",
5
6
  "keywords": [
6
7
  "mcp",