diff --git a/examples/tinymqtt-test/tinymqtt-test.ino b/examples/tinymqtt-test/tinymqtt-test.ino index 2f6f9d0..5b825c2 100644 --- a/examples/tinymqtt-test/tinymqtt-test.ino +++ b/examples/tinymqtt-test/tinymqtt-test.ino @@ -129,7 +129,7 @@ std::set commands = { "auto", "broker", "blink", "client", "connect", "create", "delete", "help", "interval", "ls", "ip", "off", "on", "set", - "publish", "reset", "subscribe", "view" + "publish", "reset", "subscribe", "unsubscribe", "view" }; void getCommand(std::string& search) @@ -481,6 +481,10 @@ void loop() { client->subscribe(getword(cmd, topic.c_str())); } + else if (compare(s, "unsubscribe")) + { + client->unsubscribe(getword(cmd, topic.c_str())); + } else if (compare(s, "view")) { client->dump(); @@ -611,7 +615,7 @@ void loop() Serial << " MqttClient:" << endl; Serial << " client {name} {parent broker} : create a client then" << endl; Serial << " name.connect [ip] [port] [alive]" << endl; - Serial << " name.subscribe [topic]" << endl; + Serial << " name.[un]subscribe [topic]" << endl; Serial << " name.publish [topic][payload]" << endl; Serial << " name.view" << endl; Serial << " name.delete" << endl;