Rules, clear line display not working

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marktn
Normal user
Posts: 65
Joined: 06 Nov 2015, 19:43

Rules, clear line display not working

#1 Post by marktn » 26 Nov 2024, 17:19

Hello!

I have an espeasy with a Display - ST7789 TFT and RFID - PN532 .
Tft works fine with http rules from domoticz.
Only sometimes it has a delay when it reads a tag, sends it to domoticz, and domoticz send a http rule that the tag is read.

So i thaugt lets do that in the espeasy rules. Never used it. It works, but it is not clearing the line after 2 seconds. What is wrong i my rule?

Code: Select all

on RFID#Tag do
  st7789,txl,10,   ****Tag-detected****:
  timerSet,1,2
endon

on Rules#Timer=1 do
  st7789,txl,10,                    
endon

User avatar
chromo23
Normal user
Posts: 1007
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Rules, clear line display not working

#2 Post by chromo23 » 26 Nov 2024, 18:15

marktn wrote: 26 Nov 2024, 17:19 It works, but it is not clearing the line after 2 seconds. What is wrong i my rule?
I never used the plugin but try:

Code: Select all

st7789,txl,10,""  
Edit: Probably it's a good idea to wrap your text always in quotation marks.

marktn
Normal user
Posts: 65
Joined: 06 Nov 2015, 19:43

Re: Rules, clear line display not working

#3 Post by marktn » 26 Nov 2024, 18:24

chromo23 wrote: 26 Nov 2024, 18:15
marktn wrote: 26 Nov 2024, 17:19 It works, but it is not clearing the line after 2 seconds. What is wrong i my rule?
I never used the plugin but try:

Code: Select all

st7789,txl,10,""  
Edit: Probably it's a good idea to wrap your text always in quotation marks.
I did that, but then I also have the " " on ,my tft screen.
The timer should be okay?

User avatar
chromo23
Normal user
Posts: 1007
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Rules, clear line display not working

#4 Post by chromo23 » 26 Nov 2024, 18:32

marktn wrote: 26 Nov 2024, 18:24 The timer should be okay?
The timer looks fine.
marktn wrote: 26 Nov 2024, 18:24 I did that, but then I also have the " " on ,my tft screen.
I guess Ath knows more about this...

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

Re: Rules, clear line display not working

#5 Post by Ath » 26 Nov 2024, 21:45

marktn wrote: 26 Nov 2024, 18:24 I did that, but then I also have the " " on ,my tft screen.
Not sure what kind of quotes you used, but text containing commas or spaces should be wrapped in a pair of (the same) quotes, either double quotes, single quotes or backticks.

To erase your initial message, just put the same amount of spaces (wrapped in quotes) as the original text message at the same line:

Code: Select all

on Rules#Timer=1 do
  st7789,txl,10,"                        " // Erase message
endon
NB: Rules script is trimmed of spaces and comments removed before being processed, that's why your line containing only spaces doesn't work.
/Ton (PayPal.me)

marktn
Normal user
Posts: 65
Joined: 06 Nov 2015, 19:43

Re: Rules, clear line display not working

#6 Post by marktn » 26 Nov 2024, 22:10

Thanks! It works.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 19 guests