mirror of
https://github.com/ipnet-mesh/meshcore-mqtt.git
synced 2026-08-12 03:42:50 +02:00
fix: remove non-existent ping command from supported MQTT commands
This commit is contained in:
@@ -126,7 +126,6 @@ The bridge supports bidirectional communication via MQTT commands. Send commands
|
||||
| `device_query` | Query device information | None | `meshcore.commands.send_device_query()` |
|
||||
| `get_battery` | Get battery status | None | `meshcore.commands.get_bat()` |
|
||||
| `set_name` | Set device name | `name` | `meshcore.commands.set_name()` |
|
||||
| `ping` | Ping a node | `destination` | `meshcore.commands.ping()` |
|
||||
| `send_advert` | Send device advertisement | None (optional: `flood`) | `meshcore.commands.send_advert()` |
|
||||
| `send_trace` | Send trace packet for routing diagnostics | None (optional: `auth_code`, `tag`, `flags`, `path`) | `meshcore.commands.send_trace()` |
|
||||
| `send_telemetry_req` | Request telemetry data from a node | `destination` | `meshcore.commands.send_telemetry_req()` |
|
||||
@@ -148,9 +147,6 @@ The bridge supports bidirectional communication via MQTT commands. Send commands
|
||||
// Set device name
|
||||
{"name": "MyDevice"}
|
||||
|
||||
// Ping node
|
||||
{"destination": "node_id"}
|
||||
|
||||
// Send advertisement
|
||||
{}
|
||||
|
||||
@@ -174,10 +170,6 @@ mosquitto_pub -h localhost -t "meshcore/command/send_msg" \
|
||||
mosquitto_pub -h localhost -t "meshcore/command/send_chan_msg" \
|
||||
-m '{"channel": 0, "message": "Hello everyone on channel 0!"}'
|
||||
|
||||
# Ping a node
|
||||
mosquitto_pub -h localhost -t "meshcore/command/ping" \
|
||||
-m '{"destination": "node123"}'
|
||||
|
||||
# Get device info
|
||||
mosquitto_pub -h localhost -t "meshcore/command/device_query" -m '{}'
|
||||
|
||||
|
||||
@@ -363,10 +363,6 @@ mosquitto_pub -h localhost -t "meshcore/command/send_msg" \
|
||||
mosquitto_pub -h localhost -t "meshcore/command/send_chan_msg" \
|
||||
-m '{"channel": 0, "message": "Hello everyone on channel 0!"}'
|
||||
|
||||
# Ping a node
|
||||
mosquitto_pub -h localhost -t "meshcore/command/ping" \
|
||||
-m '{"destination": "node123"}'
|
||||
|
||||
# Get device information
|
||||
mosquitto_pub -h localhost -t "meshcore/command/device_query" -m '{}'
|
||||
|
||||
@@ -414,7 +410,6 @@ The bridge supports these MeshCore commands via MQTT:
|
||||
| `device_query` | Query device information | None | `{}` |
|
||||
| `get_battery` | Get battery status | None | `{}` |
|
||||
| `set_name` | Set device name | `name` | `{"name": "MyDevice"}` |
|
||||
| `ping` | Ping a node | `destination` | `{"destination": "node123"}` |
|
||||
| `send_advert` | Send device advertisement | None (optional: `flood`) | `{}` or `{"flood": true}` |
|
||||
| `send_trace` | Send trace packet for routing diagnostics | None (optional: `auth_code`, `tag`, `flags`, `path`) | `{}` or `{"auth_code": 12345, "path": "23,5f,3a"}` |
|
||||
| `send_telemetry_req` | Request telemetry data from a node | `destination` | `{"destination": "node123"}` |
|
||||
|
||||
@@ -323,13 +323,6 @@ class MeshCoreWorker:
|
||||
return
|
||||
result = await self.meshcore.commands.send_chan_msg(channel, msg_text)
|
||||
|
||||
elif command_type == "ping":
|
||||
destination = command_data.get("destination")
|
||||
if not destination:
|
||||
self.logger.error("ping requires 'destination' field")
|
||||
return
|
||||
result = await self.meshcore.commands.ping(destination)
|
||||
|
||||
elif command_type == "send_advert":
|
||||
flood = command_data.get("flood", False)
|
||||
result = await self.meshcore.commands.send_advert(flood=flood)
|
||||
|
||||
Reference in New Issue
Block a user