Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difficulty with Gauge widget
(05-05-2022, 08:45 PM)iliaslamprou Wrote: Hi,
I have checked.
The problem is not on the app. It is on the arduino code.
The published value is not correct. It is not numerical value.
It has some invalid characters at the end, because it published as String with a fixed length.
If you use my code example to publish the values you have to fix a bug in the arduino code.
Replace the void "publishMessage" at the end of the code with this.
The problem is to the length of the payload.
void publishMessage(const char* topic, String payload , boolean retained){
  if (client.publish(topic, payload.c_str(), true))
      Serial.println("Message publised ["+String(topic)+"]: "+payload);

Hi Ilias.
Working perfectly!...
I believe that in the project I sent you will be able to see the results.
thank you very much.
I'm using it on an esp 32 and also on esp01.
Question: Would you have this same code to be used in Arduino (Uno, Mega, Nano...)?
I think other libraries are needed.
Thank you and a big hug.

Messages In This Thread
Difficulty with Gauge widget - by Julio Talhate - 04-28-2022, 12:02 PM
RE: Difficulty with Gauge widget - by Julio Talhate - 05-06-2022, 09:37 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)