good morning everyone, I ask for help for this script that I have tagged for the control of two variables "setpoint" and "temp", the goal is to activate a booster when the condition occurs ("delta" <= "setpoint" - "temp" ), where the "delta" is chosen by the system manager.
When changing the "setpoint", it is verified that the mathematical condition is active (sometimes for 1 pulse, other times for a few seconds) and then deactivates the two output groups. There is no perfect answer to the mathematical condition that I believe works perfectly by reading the impulse / temporary activation of the outgoing groups from the bus monitor.
I don't fully understand your question. What exactly is not working for you? You can set poll interval for an object to send KNX read request periodically if data is not sent by a KNX device automatically.
if (delta <= (setpoint-temp)) and (value_1 == true) and (value_3 == false) then
grp.write ('2/0/92', true)
grp.write ('6/0/92', value_2)
else
grp.write ('2/0/92', false)
grp.write ('6/0/92', 0) -- byte to 0
end
daniel, in the translation of the texts the second indent is missing, in fact in the script the text is correctly preceded by the double - -
(06.03.2020, 15:28)admin Wrote: I don't fully understand your question. What exactly is not working for you? You can set poll interval for an object to send KNX read request periodically if data is not sent by a KNX device automatically.
the script does not execute the command stable command on the outgoing objects of the condition, sometimes it works other not!
sorry, having put the TAG on each object, just one of these changes to relaunch the script ?? if I put the TAG only to the three objects "delta" "setpoint" and "temp" the script is activated only when these 3 objects change ??
from the bus monitor I keep having the addresses cyclically, to reduce the traffic I also put the "os.sleep (60)" but it doesn't work, every second it sends me on the bu sil value at 0 / off of these two addresses:
20.04.2020, 05:49 (This post was last modified: 20.04.2020, 06:14 by Hosutech.)
(06.03.2020, 15:28)admin Wrote: I don't fully understand your question. What exactly is not working for you? You can set poll interval for an object to send KNX read request periodically if data is not sent by a KNX device automatically.
good morning Edgard,
I ask for help for this script as it happens that the value 0 of the two group addresses 2/0/91 and 6/0/91 are sent to me on the bus
(06.03.2020, 15:28)admin Wrote: I don't fully understand your question. What exactly is not working for you? You can set poll interval for an object to send KNX read request periodically if data is not sent by a KNX device automatically.
good morning Edgard,
I ask for help for this script as it happens that the value 0 of the two group addresses 2/0/91 and 6/0/91 are sent to me on the bus
good morning Edgard,
I discovered the problem that I created!
I need the way to activate a script only if there is a specific condition, I give an example:
in the summer run the script "x"
in winter run the script "y"
please help me?
(17.04.2020, 19:18)Hosutech Wrote:
(17.04.2020, 08:23)Daniel. Wrote: Where is this script?
I discovered the problem that I created!
I need the way to activate a script only if there is a specific condition, I give an example:
in the summer run the script "x"
in winter run the script "y"
thanks Edgard,
the scripts are 2 that answer on the same address, both are started by the comparison and generate two obviously contrary results, one rightly inhibits the other, if it were possible to activate the Winter in Winter script and the Summer in Summer script would be perfect.
if not value_3 then
if value1 then
out = delta <= (setpoint - temp)
else
out = delta <= (temp - setpoint)
end
end
grp.write('3/0/206', out)
Thanks Edgard,
before inserting your new script for which I am grateful, I would like to better understand what the result will be as, with this formula, I seem to understand that the address 3/0/206 is sent only if the two conditions are verified in turn filtered from summer / winter.
I must point out that the 3/0/206 triggers an additional event script:
WINTER
value_1 = event.getvalue ()
value_2 = grp.getvalue ('3/3/1')
value_3 = grp.getvalue ('7/0/0') - summer / winter
Your current script will fail with an error because you have single "-" instead of double dash for a comment.
This line will be evaluated an arithmetic expression "X = A - B / C"
Your current script will fail with an error because you have single "-" instead of double dash for a comment.
This line will be evaluated an arithmetic expression "X = A - B / C"
Thanks Edgard,
I would never have been able to independently write a script of this type, unfortunately I never studied the programming code, I am self-taught and unfortunately I don't even know English.
I notice that there is no need to write for example:
if event_value = true then
but what you wrote is enough:
in event_value then
this means that when 7/0/0 = 1 (= summer)
else
(= winter) ??
if value == true then and if value then work the same when value variable type is Boolean (true/false). If value for 7/0/0 is true then summer mode part is executed otherwise winter mode.