LCD display works but is not accessible from Domoticz
Moderators: grovkillen, Stuntteam, TD-er
LCD display works but is not accessible from Domoticz
I attached a J204A display to a NodeMCU and configured it according to the example in the Wiki: put the uptime in line 1, and some test lines in 2, 3 and 4.
It comes up just fine: first text ESPEasy, then the 4 lines, and backlit mode switches off after a while.
I tried to send these commands from a dummy switch in Domoticz , as on/off actions:
http://10.0.0.206/control?cmd=lcd, 1, 1, on
http://10.0.0.206/control?cmd=lcd, 1, 1, off
But this never comes on the screen.
I'm sure Domoticz can send commands this way, I used it on my Sonoff a few days ago.
What am I doing wrong here?
It comes up just fine: first text ESPEasy, then the 4 lines, and backlit mode switches off after a while.
I tried to send these commands from a dummy switch in Domoticz , as on/off actions:
http://10.0.0.206/control?cmd=lcd, 1, 1, on
http://10.0.0.206/control?cmd=lcd, 1, 1, off
But this never comes on the screen.
I'm sure Domoticz can send commands this way, I used it on my Sonoff a few days ago.
What am I doing wrong here?
Re: LCD display works but is not accessible from Domoticz
Hi, did you try to set the display time-out setting to 0 in the Task settings?
Normally it is set to 60 (1 minute)
Normally it is set to 60 (1 minute)
Unless you know the code, it has no meaning.
Re: LCD display works but is not accessible from Domoticz
Yes, that did it! I can now send commands from the dummy device or from LUA, which opens up the door to what I want: a message box to which I can send status and warning messages. Great.
Is there a list of commands for the LCD? I see on, off and clear in the Wiki. Anything else?
Is there a list of commands for the LCD? I see on, off and clear in the Wiki. Anything else?
Re: LCD display works but is not accessible from Domoticz
glad it worked!
i think there are not so many options, however you could check the ESPEasy Core code and the included lcd plugin for further information on commands.
just load the latest source from github and load into arduino IDE.
i think there are not so many options, however you could check the ESPEasy Core code and the included lcd plugin for further information on commands.
just load the latest source from github and load into arduino IDE.
Unless you know the code, it has no meaning.
Re: LCD display works but is not accessible from Domoticz
I think I will do that as soon as I can find the time, and then perhaps post it on the Wiki.egkman wrote:glad it worked!
i think there are not so many options, however you could check the ESPEasy Core code and the included lcd plugin for further information on commands.
just load the latest source from github and load into arduino IDE.
I can imagine there is not that much more, but I am thinking of things like clearline, and the tree alignments (left, mid,right).
Also, when I send a text thru http, is there a way to include a space? If I do that in the regular text it ends the text.
So when i send "this is a sentence" all that comes up is "this" ...
I can use underscores, but it does not look quite as nice.
Re: LCD display works but is not accessible from Domoticz
I just checked the code, and as far as I can see only three commands were implemented: on, off and clear.
Obviously the author wanted to keep the code lean and mean...
The one command I am really missing is clearline. I want to use the four lines independently, and sometimes characters remain on the line from the previous message when the new one is shorter.
Is there a way around this?
Obviously the author wanted to keep the code lean and mean...
The one command I am really missing is clearline. I want to use the four lines independently, and sometimes characters remain on the line from the previous message when the new one is shorter.
Is there a way around this?
Re: LCD display works but is not accessible from Domoticz
why not send a empty line first ? or fill up what you send with spaces ?
Re: LCD display works but is not accessible from Domoticz
How? I have trouble sending spaces with the remote command.kr0815 wrote:why not send a empty line first ? or fill up what you send with spaces ?
When doing it from Domoticz dummy device, the message cuts off at the first space, the rest is ignored.
From LUA I have been playing with different ways, no success sofar.
Re: LCD display works but is not accessible from Domoticz
I don´t have any experience with Domotics,
but looks like a problem with url-encoding
Try to send %20 instead of the space, or maybe even +20
So, instead of "this is a sentence" try "this%20is%20a%20sentence"
but looks like a problem with url-encoding
Try to send %20 instead of the space, or maybe even +20
So, instead of "this is a sentence" try "this%20is%20a%20sentence"
Re: LCD display works but is not accessible from Domoticz
Hi,
i think display content using following HTTP control command. i didn't try bcz i don't have device with me now
http://<ESP IP address>/control?cmd=lcd,<row>,<col>,<text>
http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text>
if this work try the following lua code in domoticz.
i use similar lua code to update domoticz device status to dweet.io
i think display content using following HTTP control command. i didn't try bcz i don't have device with me now
http://<ESP IP address>/control?cmd=lcd,<row>,<col>,<text>
http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text>
if this work try the following lua code in domoticz.
Code: Select all
local devicename="yourdevice name"
commandArray = {}
if devicechanged[devicename] then
commandArray['OpenURL']='10.20.30.40/control?cmd=oled,7,1,Temp:'..otherdevices_svalues[devicename]..'*C'
end
return commandArray
Code: Select all
--Internal temperature
internal_temp = 'Internal Temperature'
it = tonumber(otherdevices_svalues['Internal Temperature']) --to number
--CPU Usage
cpu_usage = 'CPU_Usage'
cu = tonumber(otherdevices_svalues['CPU_Usage'])
--Water % and Ltr
water_per = 'Water %'
wp = tonumber (otherdevices_svalues['Water %'])
water_ltr = 'Water Ltr..'
wl = tonumber (otherdevices_svalues['Water Ltr..'])
--Water level distance
tank_distance = 'Distance-MysPi'
wd = tonumber (otherdevices_svalues['Distance-MysPi'])
--motion sensor
motion_sensor = 'Security Sensor'
commandArray = {}
if (devicechanged[internal_temp]) then
commandArray['OpenURL']='https://dweet.io/dweet/for/name?IntT='..it..''
end
if (devicechanged[cpu_usage]) then
commandArray['OpenURL']='https://dweet.io/dweet/for/name?Cu='..cu..''
end
if (devicechanged[tank_distance]) then
commandArray[1] = {['OpenURL']='https://dweet.io/dweet/for/name?WD='..wd..''}
commandArray[2] = {['OpenURL']='https://dweet.io/dweet/for/name?Wl='..wl..''}
commandArray[3] = {['OpenURL']='https://dweet.io/dweet/for/name?Wp='..wp..''}
end
if (devicechanged[motion_sensor] == 'On') then
commandArray['OpenURL']='https://dweet.io/dweet/for/name?Mos=1'
elseif (devicechanged[motion_sensor] == 'Off') then
commandArray['OpenURL']='https://dweet.io/dweet/for/name?Mos=0'
end
return commandArray
Re: LCD display works but is not accessible from Domoticz
Alas, sending commands this way displays the %20 literally. Use the Unicode non-breaking space or hard-space character U+00A0 instead. To get this character from your keyboard, hold down Alt and type 0160 on the numeric keypad. This displays find on every LCD/OLED I've tried.kr0815 wrote:Try to send %20 instead of the space, or maybe even +20
So, instead of "this is a sentence" try "this%20is%20a%20sentence"
Jon
Who is online
Users browsing this forum: No registered users and 34 guests