You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I know that this is not really an issue with your code and more with my stupidity or lack of knowledge. What I cannot figure out is how do I publish a retained message.
Both stateSpeedTopic and fanSpeedStatus are of type string.
How do I alter this to send a retained message instead?
Thank for so much for any help, I have been scratching my head for hours and not getting anywhere:(
P.S. Thank you so much for the code, it has been working excellent and is easier for me to folllow than the other alternative for esp8266 mqtt client available. I just need to get the state of my fan to be retained in my MQTT server. Otherwise, my fan decides to turn on randomly...lol.
The text was updated successfully, but these errors were encountered:
Sorry, I know that this is not really an issue with your code and more with my stupidity or lack of knowledge. What I cannot figure out is how do I publish a retained message.
I know how to publish a normal message, as:
client.publish(stateSpeedTopic + String(invId), (fanSpeedStatus));
Both stateSpeedTopic and fanSpeedStatus are of type string.
How do I alter this to send a retained message instead?
Thank for so much for any help, I have been scratching my head for hours and not getting anywhere:(
P.S. Thank you so much for the code, it has been working excellent and is easier for me to folllow than the other alternative for esp8266 mqtt client available. I just need to get the state of my fan to be retained in my MQTT server. Otherwise, my fan decides to turn on randomly...lol.
The text was updated successfully, but these errors were encountered: