Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difficulty with Gauge widget
#6
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.
Code:
void publishMessage(const char* topic, String payload , boolean retained){
  if (client.publish(topic, payload.c_str(), true))
      Serial.println("Message publised ["+String(topic)+"]: "+payload);
}
Reply


Messages In This Thread
Difficulty with Gauge widget - by Julio Talhate - 04-28-2022, 12:02 PM
RE: Difficulty with Gauge widget - by iliaslamprou - 05-05-2022, 08:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)