I'm trying to get a lcd display to work with Domoticz. It's an 2004a display working via I2c on a ESP8266 board running ESP Easy getting updated every 20 seconds.
Sofarsogood...
The problem i get is this; sometimes the first line is not displaying and gives a blank line instead.
It gets worse if i send more items to the display;
I use the 'openurl' command to send the text, because it cannot send space's to the display i have to use underscores instead of space.
The more elegant way is to send the lines in parts to the correct place in the line;
For the top line i would send "gebruik" from position 2, then send "huis=<value>" from position 5.
So 2 times to send 1 line to the display, repeating for the other lines is a lot of extra times sending to the ESP board at once.
This is the part of the script responsible for getting the text to the display:
Code: Select all
commandArray[35] = {['OpenURL']="http://192.168.178.220/control?cmd=lcd,1,2,Gebruik_huis=".. math.floor(consumption_p).."W" }
commandArray[36] = {['OpenURL']="http://192.168.178.220/control?cmd=lcd,2,3,Zonepanelen=".. math.floor(solar_p) .. "W" }
commandArray[37] = {['OpenURL']="http://192.168.178.220/control?cmd=lcd,3,5,KWH_meter=".. math.floor(consumption_tot).."W" }
commandArray[40] = {['OpenURL']="http://192.168.178.220/control?cmd=lcd,4,2,"..HM.."" }
Code: Select all
2022-12-23 14:33:41.185 Status: EventSystem: Fetching URL http://192.168.178.220/control?cmd=lcd,2,3,Zonepanelen=5W after 0.2 seconds...
2022-12-23 14:33:41.185 Status: EventSystem: Fetching URL http://192.168.178.220/control?cmd=lcd,3,5,KWH_meter=760W after 0.2 seconds...
2022-12-23 14:33:41.185 Status: EventSystem: Fetching URL http://192.168.178.220/control?cmd=lcd,4,2,14:33__Fri_23_Dec after 0.2 seconds...
2022-12-23 14:33:41.185 Status: EventSystem: Fetching URL http://192.168.178.220/control?cmd=lcd,1,2,Gebruik_huis=765W after 0.2 seconds...
Is there a way to get the next send-command to pause for say 50ms to finish the action?
Greets Ron.