Code: Select all
On Clock#Time=All,18:25 do // every day at 18:25 hours do ...
gpio,14,0
endon
Code: Select all
// --- variables for ie. the time 20:15
Let,1,20
Let,2,15
On Clock#Time=All,[VAR#1]:[Var#2] do
gpio,14,0
endon
Moderators: grovkillen, Stuntteam, TD-er
Code: Select all
On Clock#Time=All,18:25 do // every day at 18:25 hours do ...
gpio,14,0
endon
Code: Select all
// --- variables for ie. the time 20:15
Let,1,20
Let,2,15
On Clock#Time=All,[VAR#1]:[Var#2] do
gpio,14,0
endon
Code: Select all
On Clock#Time=All,"[Var#1]:[Var#2]" do
Code: Select all
//--------
On doTest do
TaskValueSet,1,4,%eventvalue%
Let,1,[VAR#4]
Publish testing/%sysname%/variables,{eventvalue: %eventvalue%, isAuto:%v1%, durOnManual_min: %v2%, durRest_min: %v3%, startHr1: %v5%, startMin1: %v6%, doLeg1: %v9%, durLeg1: %v13%}
endon
//--------
Code: Select all
//--------
On doTest do
TaskValueSet,1,4,%eventvalue%
Let,1,[VAR#4]
Publish testing/%sysname%/variables,{eventvalue: %eventvalue%, isAuto:%v1%, durOnManual_min: %v2%, durRest_min: %v3%, startHr1: %v5%, startMin1: %v6%, doLeg1: %v9%, durLeg1: %v13%}
endon
//--------
Tested with Dummy values - pushed from mqtt as well, and it does not add .00 to the values. So, the problem must be as you stated - in P086 ?
I don't really know how the Homie plugin does work (never looked through the code thoroughly)
Thank you TD-er, will do this, at least you have been able to confirm my suspicions.Maybe you could add an issue for it on Github, so the original author of that plugin can look at it?
Code: Select all
On Clock#Time=All,"[varSet2#startHr1]:[varSet2#startMin1]" do
event,doNextLeg
endon
Code: Select all
On startHr1 do
TaskValueSet,2,1,%eventvalue%
endon
On startMin1 do
TaskValueSet,2,2,%eventvalue%
Let,7,%eventvalue%
endon
Code: Select all
On Clock#Time=All,"[varSet2#startHr1]:[varSet2#startMin1]" do
...
endon
On Clock#Time=All,"[varSet2#startHr1]:0[varSet2#startMin1]" do
...
endon
Float values should be passed via %eventvalue% correctly as float by the homie plugin. There will be an updated version soon showing floats and other values correctly with many bugfixes and improvements. I currently work on a Node-RED custom node to have something to communicate with as openHAB is still unreliable for me (rendering devices offline which are working perfectly and other problems). Perhaps the docs can help https://espeasy.readthedocs.io/en/lates ... #p086-page
Cannot wait!! Thank you.There will be an updated version soon showing floats and other values correctly with many bugfixes and improvements
Meaning...Formatting referred values
When referring another value, some basic formatting can be used.
Referring a value using some pre-defined format: [TaskName#ValueName#transformation#justification]
Transformation
Transformations are case sensitive. (M differs from m, capital is more verbose)
Most transformations work on “binary” values (0 or 1)
A “binary” transformation can be “inverted” by adding a leading !.
A “binary” value is considered 0 when its string value is “0”, otherwise it is an 1. (best to round a value to 0 decimals for this)
Binary transformations:
C: 0 => “CLOSE” 1 => ” OPEN”
H: 0 => “COLD” 1 => ” HOT”
I: 0 => “OUT” 1 => ” IN”
M: 0 => “AUTO” 1 => ” MAN”
m: 0 => “A” 1 => “M”
O: 0 => “OFF” 1 => ” ON”
U: 0 => “DOWN” 1 => ” UP”
u: 0 => “D” 1 => “U”
V: value = value without transformations
X: 0 => “O” 1 => “X”
Y: 0 => ” NO” 1 => “YES”
y: 0 => “N” 1 => “Y”
Z: 0 => “0” 1 => “1”
Floating point transformations:
Dx.y: Minimal ‘x’ digits zero filled & ‘y’ decimal fixed digits. E.g. D1.3
Dx: Minimal ‘x’ digits zero filled in front of the decimal point, no decimal digits. Same as Dx.0
D.y: Same as D0.y
F: Floor (round down)
E: cEiling (round up)
Justification
Pn: Prefix Fill with n spaces.
Sn: Suffix Fill with n spaces.
Ln: Left part of the string, n characters.
Rn: Right part of the string, n characters.
Ux.y: Substring Ux.y where x=firstChar and y=number of characters.
Code: Select all
On Clock#Time=All,"[Var#1]:[Var#2]" do
Code: Select all
On Clock#Time=All,"[Var#1]:[Var#2#D2]" do
Have you looked at the PR I am preparing?
Users browsing this forum: No registered users and 15 guests