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.

Script with last updated event
#10
Hi Erwin,

I cant figure out whats wrong...

1) Is your script activated?
2) Are the object names in your script correct?
3) Is the object type from object 'Timer - Settverdi - Alarm' the same for object 'Timer - Alarm' ? (can it handle the value from other object)
4) Is your time / timezone correct?

For question 1, 2 and 3:
The following code works:
Event-Based
Code:
value1 = grp.getvalue('Timer - Settverdi - Alarm')
if event.getvalue() then
grp.write('Timer - Alarm', value1)
script.enable('Alarm - Timer')
end
This code does not:
Event-Based
Code:
value1 = grp.getvalue('Timer - Settverdi - Alarm')
now = os.date('*t')
min = 20
max = 23
if now.hour >= min and now.hour < max then
grp.write('Timer - Alarm', value1)
script.enable('Alarm - Timer')
end
For question 4:
I have set up the spacelynk with a NTP (time.apple.com) and the timezone is Europe/Oslo. 
The update times for objects are correct as far as I can see.
I have also tried setting min = 01 and max = 23 and still nothing happens... 
BR,
Mr.D
Reply


Messages In This Thread
Script with last updated event - by Mr.D - 06.05.2017, 12:03
RE: Script with last updated event - by Mr.D - 06.05.2017, 22:17
RE: Script with last updated event - by Mr.D - 11.05.2017, 19:57
RE: Script with last updated event - by Jørn - 11.05.2017, 20:56
RE: Script with last updated event - by Mr.D - 13.05.2017, 20:56
RE: Script with last updated event - by Mr.D - 16.05.2017, 11:34
RE: Script with last updated event - by Mr.D - 18.05.2017, 07:40

Forum Jump: