Traduit de English par IA ·
Il s’abonne à v1/rpc/req/+ et récupère la method et les params ; pour une commande bidirectionnelle, il répond avec le même id :
PUBLISH v1/rpc/req/42
{"method": "sys.ping", "params": {"host": "8.8.8.8", "count": 3}}
PUBLISH v1/rpc/res/42
{"ok": true, "result": {"sent": 3, "received": 3, "avg_ms": 18.2}}
Les commandes ne sont livrées qu’une fois que l’appareil s’est abonné sur cette connexion.
It subscribes to v1/rpc/req/+ and gets the method and params; for a two-way command it answers on the same id:
PUBLISH v1/rpc/req/42
{"method": "sys.ping", "params": {"host": "8.8.8.8", "count": 3}}
PUBLISH v1/rpc/res/42
{"ok": true, "result": {"sent": 3, "received": 3, "avg_ms": 18.2}}
Commands are only delivered after the device has subscribed on that connection.

