how set local time on tft7789 using http

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
BartSr
Normal user
Posts: 167
Joined: 27 Sep 2019, 17:45

how set local time on tft7789 using http

#1 Post by BartSr » 05 Dec 2024, 16:53

Hi
Finally I got the tft screen ST7789 working.
I am able to control the screen from domoticz which commands like

Code: Select all

 if (dz.devices(818).state == 'Unlocked') then
    dz.openURL({ url = "http://192.168.2.230/control?cmd=tft,txtfull,3,4,3,white,blue,,,Achterdeur" })
   else
    dz.openURL({ url = "http://192.168.2.230/control?cmd=tft,txtfull,3,4,3,white,darkgreen,,,Achterdeur" })    
  end
But I cannot get a localtime clock on the tft
Any suggestion howto (if possible)?

Thanks.
Bart

User avatar
Ath
Normal user
Posts: 4114
Joined: 10 Jun 2018, 12:06
Location: NL

Re: how set local time on tft7789 using http

#2 Post by Ath » 05 Dec 2024, 17:21

Check the Tools/System variables page for all % variables you can use, and select the desired time variable. It's helpful to have the Latitude/Longitude set correctly and the offset to GMT (60 minutes), so the ESP clock has the correct time (assuming time is received from 1 node in your P2P network that's using NTP).
/Ton (PayPal.me)

BartSr
Normal user
Posts: 167
Joined: 27 Sep 2019, 17:45

Re: how set local time on tft7789 using http

#3 Post by BartSr » 08 Dec 2024, 12:29

Hi Ton,
this works ( %lcltime% ) but how can I update the time from rules?
Another Q: I wonder how to put text on the display from rules?

update:
found solution from rules for time : tft,txtfull,3,3,2,white,blue,,,"%lcltime%"
for text : tft,txtfull,3,3,2,white,blue,,,"Jan Jansen"

so problem solved :-)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest