LCD show systime with http ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kllei
Normal user
Posts: 11
Joined: 11 Feb 2019, 13:07

LCD show systime with http ?

#1 Post by kllei » 11 Feb 2019, 13:15

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!

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD show systime with http ?

#2 Post by grovkillen » 11 Feb 2019, 13:34

So what do you wanting to accomplish? Send the systime from unit X to be displayed on unit Y?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kllei
Normal user
Posts: 11
Joined: 11 Feb 2019, 13:07

Re: LCD show systime with http ?

#3 Post by kllei » 11 Feb 2019, 14:08

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD show systime with http ?

#4 Post by grovkillen » 11 Feb 2019, 17:13

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kllei
Normal user
Posts: 11
Joined: 11 Feb 2019, 13:07

Re: LCD show systime with http ?

#5 Post by kllei » 11 Feb 2019, 18:18

?? 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?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD show systime with http ?

#6 Post by grovkillen » 11 Feb 2019, 19:17

Try this:

Code: Select all


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

ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kllei
Normal user
Posts: 11
Joined: 11 Feb 2019, 13:07

Re: LCD show systime with http ?

#7 Post by kllei » 12 Feb 2019, 14:03

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!

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD show systime with http ?

#8 Post by grovkillen » 12 Feb 2019, 16:21

Good job. I reckon the problem was how the URL was interpreted % and : are special characters in the URL realm.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 32 guests