issue with V_TEXT sensor type
-
Hi all,
I'm playing with LCD screen. I want to display in my LCD a string from my mqtt broker.
Ex:
OpenHAB --> MQTT Broker --> MQTT Gateway --> LCD (directly connected on gateway)I can send a message Ex: "TEST_LCD_1_MIKA_COOL":
Result:0;0;3;0;9;Message arrived on topic: mygateway1-in/0/3/1/V_TEXT/47 Incoming msg DATA: TEST_LCD_1_MIKA_COOL
but when I send a shorter message Ex: "TEST_LCD_2_SUPER"
0;0;3;0;9;Message arrived on topic: mygateway1-in/0/3/1/V_TEXT/47 Incoming msg DATA: TEST_LCD_2_SUPERCOOL
We can see that message.getString is false. It adds the end of the last string on this new string.
buffer not empty ?
My conf:
void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_TEXT && message.sensor == LCD_CHILD) { lcd.clear(); Serial.print("Incoming msg DATA: "); lcd.print("Incoming msg DATA: "); lcd.setCursor ( 0, 1 ); Serial.println(message.getString()); lcd.print(message.getString()); } }
can you help me please ?
Thanks in advance
-
Hi @mickaelh51
See my post here: http://forum.mysensors.org/topic/2617/receivetime-and-request-in-1-6 I think it might be same.
I have seen some activity on github lately (about this I think), have you downloaded the latest lib? It might be working now... dont know 100% though.
-
Thanks @sundberg84
I'm going to update my library now !I will tell you if it works
-
I think it should work: https://github.com/mysensors/Arduino/issues/322
Lets hope so, good luck.
-
I'm sorry for that
It works perfectly after the library updatethank you very much @sundberg84