prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
523 stars 140 forks source link

example iotweb06 Topic must not have / at the beginning #246

Closed toedtnissen closed 2 years ago

toedtnissen commented 2 years ago

mqttClient.publish("test/status", pinState == LOW ? "ON" : "OFF");

mqttClient.subscribe("test/action");

prampec commented 2 years ago

You are right, on that leading slash is not required in topic names. But it does not harm either.

I personally use it that way, e.g.:

//// Where "reserved" is currently empty. I will still correct it according to your suggestion not to mislead others.