This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Maximum Value
#13
(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 Smile Now all working Smile
Reply


Messages In This Thread
Maximum Value - by Tee_Trinker - 13.03.2020, 20:10
RE: Maximum Value - by Tokatubs - 13.03.2020, 20:16
RE: Maximum Value - by Tee_Trinker - 13.03.2020, 22:47
RE: Maximum Value - by Erwin van der Zwart - 15.03.2020, 06:54
RE: Maximum Value - by Tee_Trinker - 15.03.2020, 11:43
RE: Maximum Value - by Tokatubs - 16.03.2020, 08:01
RE: Maximum Value - by admin - 16.03.2020, 08:13
RE: Maximum Value - by AlexLV - 16.03.2020, 18:34
RE: Maximum Value - by admin - 16.03.2020, 18:39
RE: Maximum Value - by AlexLV - 16.03.2020, 18:57
RE: Maximum Value - by Daniel - 17.03.2020, 08:31
RE: Maximum Value - by admin - 17.03.2020, 09:03
RE: Maximum Value - by AlexLV - 17.03.2020, 16:25
RE: Maximum Value - by Daniel - 17.03.2020, 16:33
RE: Maximum Value - by AlexLV - 17.03.2020, 16:49
RE: Maximum Value - by Tee_Trinker - 24.03.2020, 16:29
RE: Maximum Value - by admin - 24.03.2020, 16:51
RE: Maximum Value - by Tee_Trinker - 24.03.2020, 18:02
RE: Maximum Value - by admin - 24.03.2020, 18:44
RE: Maximum Value - by Tee_Trinker - 24.03.2020, 20:23

Forum Jump: