Page 1 of 1

LCD show systime with http ?

Posted: 11 Feb 2019, 13:15
by kllei
Hello all,

I am new to ESPeasy and tried to display %systime% on a lcd per http request.

http://my.IP/control?cmd=lcd,1,1,%systime%
did not work.

Is this a syntax error or does it only work with the "internal" routines?
Sending a Text to LCD works fine also does when I enter %systime% in the devices WLAN page.

Many thanks for your help!

Re: LCD show systime with http ?

Posted: 11 Feb 2019, 13:34
by grovkillen
So what do you wanting to accomplish? Send the systime from unit X to be displayed on unit Y?

Re: LCD show systime with http ?

Posted: 11 Feb 2019, 14:08
by kllei
Hi,
I want to show when unit x sends a message to lcd (unit x has no clock).

So the full string of unit x should be http://my.ip./control?cmd=lcd,1,1,Message %systime%

Thanks for your help

Re: LCD show systime with http ?

Posted: 11 Feb 2019, 17:13
by grovkillen
Can't you get the unit use it's own systime?

The thing is that you cannot use : in URL and the systime got two of them. You need to use syshour sysmin and syssec instead.

Re: LCD show systime with http ?

Posted: 11 Feb 2019, 18:18
by kllei
?? I did not understand what you suggest?
using syshour instead of systime?

The unit sending the string via http to the lcd has no own systime (no ESPeasy device so far)
I try to display the systime of the ESPeasy LCD device triggered by sending a command via http.

I see there is no way doing this with the http lcd command.

Any other ideas using Tasks?

Re: LCD show systime with http ?

Posted: 11 Feb 2019, 19:17
by grovkillen
Try this:

Code: Select all


http://my.IP/control?cmd=lcd,1,1,%syshour%%sysmin%%syssec%


Re: LCD show systime with http ?

Posted: 12 Feb 2019, 14:03
by kllei
Hi,
same result. LCD shows a strange Digit on Pos. 1 and nothing else.
So it looks like it is interpreting the first % as an exeption but could not get a result.

edit:
I tried to work with an event instead of the LCD command and had a success!
I created a rule:

on remotetime do
lcd,1,1,Message at %systime%
endon

if I send the http:/my.ip/control?cmd=event,remotetime
it shows the time!

So I can help me with a rule to print the right message! great!

Re: LCD show systime with http ?

Posted: 12 Feb 2019, 16:21
by grovkillen
Good job. I reckon the problem was how the URL was interpreted % and : are special characters in the URL realm.