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
This code does not:
Event-Based
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
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
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
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