letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.25k stars 2.2k forks source link

OLED Display - HTTP Command error #1690

Closed mchacher closed 1 year ago

mchacher commented 6 years ago

I am using the latest ESP_Easy_mega-20180826_normal_ESP8266_4096.bin build.

I would like to display floating point numbers on an OLED screen but the "." character is causing an issue.

To give you a simple example : http://192.168.0.200/control?cmd=OLED,4,1,Temperature 20 is working perfectly ... but, http://192.168.0.200/control?cmd=OLED,4,1,Temperature 20.3 is not showing any data on the screen and I got Unknown or restricted command!

TD-er commented 6 years ago

Have you tried using quotes? http://192.168.0.200/control?cmd=OLED,4,1,"Temperature 20 .1"

Or maybe use %22 instead of the double quote. Not sure if that will work, but maybe worth a try.

mchacher commented 6 years ago

yes I did it, and I just did with %22 as per your suggestion and it doesn't work. Worth a try I agree ... but not successful.

Grovkillen commented 6 years ago

Could you try:

http://192.168.0.200/control?cmd=OLED,4,1,Temperature+20.3

mchacher commented 6 years ago

Yes - same issue.

mchacher commented 6 years ago

One more clue, I have tested several releases of mega. mega-20180522 is the last one working. Starting mega-20180524 the bug is effective. This should help to identify the root cause. I was not able to do it.

v-a-d-e-r commented 6 years ago

No issue here..... :-) /control?cmd=OLED,1,1,Temperature 20.1 /control?cmd=OLED,2,1,Temperature 20.1 /control?cmd=OLED,3,1,Temperature 20.1 /control?cmd=OLED,4,1,Temperature 20.1

oled

mchacher commented 6 years ago

Strange - only difference is that I use a 128x64 screen

v-a-d-e-r commented 6 years ago

I have also that one on stock.... ;-)

oled2

mchacher commented 6 years ago

I don't understand. Are you using the latest ESP_Easy_mega-20180826_normal_ESP8266_4096.bin build? I'm lost.

v-a-d-e-r commented 6 years ago

I have meanwhile my own ESPeasy version running. But for this test I used the orig. source (P023) from GIT.

mchacher commented 6 years ago

I think the issue is not on the source P023 but on some parsers located in other files. Not in the plugin

v-a-d-e-r commented 6 years ago

That's right. I had a look in the plugin code and didn't find something that has to do with your issue.... Was it already working in the past?

mchacher commented 6 years ago

As said above, I have tested several releases of mega. mega-20180522 is the last one working. Since mega-20180524 the bug is effective. This should help to identify the root cause. I was not able to do it.

v-a-d-e-r commented 6 years ago

Ooops, I was looking at an older source code. My fault... :-/. The current code of the P023 HAS a change in the parser! And that change was published at 23. May: .... String arguments = String(string); int dotPos = arguments.indexOf('.'); <-- Here it looks for a dot and that is the problem if(dotPos > -1) ...

tonhuisman commented 1 year ago

This seems to be solved, so can be closed.