Forum KNX francophone / English KNX forum
eibd : Send Time to the bus - Version imprimable

+- Forum KNX francophone / English KNX forum (https://www.knx-fr.com)
+-- Forum : Français (https://www.knx-fr.com/forumdisplay.php?fid=3)
+--- Forum : Archives eib-domotique (https://www.knx-fr.com/forumdisplay.php?fid=8)
+--- Sujet : eibd : Send Time to the bus (/showthread.php?tid=1184)



eibd : Send Time to the bus - chitloft - 02/06/2010

bonsoir,
j'ai trouvé ca par hasard, ici : http://wiki.linuxmce.org/index.php/EIB.
Ca peut peut etre en interesser ici.

I found the solution! The question was the correct format - because
LMCE Implementation uses integer values. Here is a short script which
you can add to the crontab. Just change the groupadress.

#!/usr/bin/perl
$ENV{'PATH'}="/usr/bin";

($second, $minute, $hour, $dayOfMonth, $month, $yearOffset,
$dayOfWeek) = localtime(time);
$dayOfWeek = 7 if ($dayOfWeek==0);
$time2 = sprintf '%s\n', ($second << 16) | ( $minute << 8) | ($hour) |
($dayOfWeek << 5);
@args = ("/usr/pluto/bin/MessageSend localhost -r 0 40 1 273 108
\"3/0/50\" 109 \"$time2\" 110 \"3\"");
system(@args);


bien a vous.
Arnaud


eibd : Send Time to the bus - Charles Delorme - 03/06/2010

C'est sûr que ça fait une belle économie d'horloge !

chitloft a écrit :
> bonsoir,
> j'ai trouvé ca par hasard, ici : http://wiki.linuxmce.org/index.php/EIB.
> Ca peut peut etre en interesser ici.
>
> I found the solution! The question was the correct format - because
> LMCE Implementation uses integer values. Here is a short script which
> you can add to the crontab. Just change the groupadress.
>
> #!/usr/bin/perl
> $ENV{'PATH'}="/usr/bin";
>
> ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset,
> $dayOfWeek) = localtime(time);
> $dayOfWeek = 7 if ($dayOfWeek==0);
> $time2 = sprintf '%s\n', ($second << 16) | ( $minute << 8) | ($hour) |
> ($dayOfWeek << 5);
> @args = ("/usr/pluto/bin/MessageSend localhost -r 0 40 1 273 108
> \"3/0/50\" 109 \"$time2\" 110 \"3\"");
> system(@args);
>
>
> bien a vous.
> Arnaud