Hi,
I am applying EibPC to automatically control my rollos.
They go down 30min after sunset and should go up randomly between 8.30 and 9am per following statement:
"if htime(8,convert(random(29u32),0)+30,00) and RolloAutomation then write("Alle rolluiken lange druk-3/1/20",RAUF) endif"
However, this results in Rollos going up always at the same time:
12/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
13/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
15/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
After a restart the calculated random time seems to differ, but is again fixed till next restart.
What is wrong with the random() function or with my implementation?
Thanks for your help.
Sammy
I am applying EibPC to automatically control my rollos.
They go down 30min after sunset and should go up randomly between 8.30 and 9am per following statement:
"if htime(8,convert(random(29u32),0)+30,00) and RolloAutomation then write("Alle rolluiken lange druk-3/1/20",RAUF) endif"
However, this results in Rollos going up always at the same time:
12/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
13/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
15/10/2010 8:56 EibPC "Alle rolluiken lange druk-3/1/20" Binärwert OFF Writing bc 00 00 19 14 e1 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
After a restart the calculated random time seems to differ, but is again fixed till next restart.
What is wrong with the random() function or with my implementation?
Thanks for your help.
Sammy
Kommentar