Hey ... I need another tip please.
I want to record the maximum value of the wind speed and then the date and time. That I can display it in visualization. tried FB Editor but couldn't do it.
The wind value comes every 10 seconds and is a 09.2 byte.
Does anyone have a tip on how I can do this?
(13.03.2020, 20:10)Tee_Trinker Wrote: Hey ... I need another tip please.
I want to record the maximum value of the wind speed and then the date and time. That I can display it in visualization. tried FB Editor but couldn't do it.
The wind value comes every 10 seconds and is a 09.2 byte.
Does anyone have a tip on how I can do this?
You only want the maximum value and show this in visu. Is it just to see the maximum that has been before or whats the use?
Why not use trend?
If I add this script to other temperature group - it works. But I add this to my boiler's group - not working. To this group data is written from OneWire senesor connected to OneWire port.
If I manually trying change data in this group - and after this open OneWire setting - i see instead of group number 20/3/2 just number 41730 and invalid group address. Can it be linked somehow??
17.03.2020, 16:25 (This post was last modified: 17.03.2020, 16:31 by AlexLV.)
(17.03.2020, 09:03)admin Wrote: The code inside "if" won't execute because value variable is never defined in your code:
Code:
if value then
value1 = grp.getvalue('20/2/2') -- this is 09.001 type
log(value1)
grp.update('40/1/1', value1)
end
admin, yes now I know now mistake in my example, but I mean that for my group with 09.001 type your example not working. To this group I save data from 1-wire sensor.. Why it could be??
Code:
if event.getvalue() > grp.getvalue('40/1/1') then
grp.update('40/1/1', event.getvalue())
grp.update('40/1/2', os.date('%A %d %B %H:%M'))
end
Finally found problem - group was not created correctly - group number Now all working
thank you, all is working now. I thought that problem connected with temperature data type. But I simply mistaken in group creation. Now all is working, and I am also still learning myself.
thank you, all is working now. I thought that problem connected with temperature data type. But I simply mistaken in group creation. Now all is working, and I am also still learning myself.
Hey Guys,
I've done that for my outside temperature now. Works also great, but only the maximum temperatures.
What do I have to change in the script to get the minimum temperatures?
(24.03.2020, 16:51)admin Wrote: Change comparison sign from > to <
it doesnt work
if event.getvalue('0/2/3') < grp.getvalue('32/1/64') then
grp.update('32/1/64', event.getvalue('0/2/3'))
grp.update('32/1/65', os.date('%d.%m.%Y | %H:%M'))
end
What is the current value of 32/1/64? If you have just created this object then it's probably 0 which is probably lower than the outside temperature. Write some large value like 100 there and check if script starts working.
24.03.2020, 20:23 (This post was last modified: 24.03.2020, 20:24 by Tee_Trinker.)
(24.03.2020, 18:44)admin Wrote: What is the current value of 32/1/64? If you have just created this object then it's probably 0 which is probably lower than the outside temperature. Write some large value like 100 there and check if script starts working.
now it works.
I manually set the outside temperature to 30 and then to -30.
After that I got the 32/1/64 (2byte virtual object) back to 0, and then it changed automatically.