-
GPIO5 have D0 Signal. I will the Counter put in a Variable. My Script: ">D" " Script End UI Ausgabe: An idea? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Not using scripting, but based on examples, I'd expect this to capture a counter value at TelePeriod, not at boot time:
|
Beta Was this translation helpful? Give feedback.
-
a=pc[1] From scripting page: pc[x] = pulse counter value (x = 1..4) |
Beta Was this translation helpful? Give feedback.
-
thank you very much, that works! |
Beta Was this translation helpful? Give feedback.
-
Hi @Korthy2 would you be kind and post the correc script code? As I didn`t get it what @pkkrusty said about it to modify |
Beta Was this translation helpful? Give feedback.
-
Here my script, after >B (currentd1=pc[1]
)
D
h1=0
g:currentd1=0
B
currentd1=pc[1]
; hours
if (hours>h1 or hours==0) and mins==0
then
h1=hours
currenth1=total/1000
endif
currenth=total/1000-currenth1
Best Regards
Andreas Korth
Konrad-Hofmann-Str. 5
76872 Hergersweiler
Von: cristid ***@***.***>
Gesendet: Sonntag, 12. Mai 2024 10:35
An: arendst/Tasmota ***@***.***>
Cc: Korthy2 ***@***.***>; Mention ***@***.***>
Betreff: Re: [arendst/Tasmota] Tasmota script: how put a counter value to variable ? (Discussion #15979)
Hi @Korthy2 <https://github.com/Korthy2> would you be kind and post the correc script code? As I didn`t get it what @pkkrusty <https://github.com/pkkrusty> said about it to modify
—
Reply to this email directly, view it on GitHub <#15979 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AZ725VUOYQ6QV2Y4TNXEMZLZB4SUTAVCNFSM53S7IRWKU5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TSNBQGM3DOMY> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AZ725VU6XUNNHOFY4CHT7MLZB4SUTA5CNFSM53S7IRWKYY3PNVWWK3TUL52HS4DFWFCGS43DOVZXG2LPNZBW63LNMVXHJKTDN5WW2ZLOORPWSZGOACHX2GI.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
You mean, this is the whole code? : h1=0 g:currentd1=0
; hours if (hours>h1 or hours==0) and mins==0 then h1=hours currenth1=total/1000 endif currenth=total/1000-currenth1` |
Beta Was this translation helpful? Give feedback.
-
This is the Code for tasmota Skript.First define a variable :g:currentd1=0Now you can put the counter PC[1] Content put in the variable:currentd1=pc[1]BRAndreas
-------- Ursprüngliche Nachricht --------Von: cristid ***@***.***> Datum: 14.05.24 19:18 (GMT+01:00) An: arendst/Tasmota ***@***.***> Cc: Korthy2 ***@***.***>, Mention ***@***.***> Betreff: Re: [arendst/Tasmota] Tasmota script: how put a counter value to variable ? (Discussion #15979)
You mean, this is the whole code? :
D
h1=0
g:currentd1=0
B
(currentd1=pc[1])
; hours
if (hours>h1 or hours==0) and mins==0
then
h1=hours
currenth1=total/1000
endif
currenth=total/1000-currenth1
....cause it seem it doesn`t show anything
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
a=pc[1]
From scripting page: pc[x] = pulse counter value (x = 1..4)