I have written a complete single (standalone) PHP Library (Object Orientated) for controlling and reading the Max!Cube and Max!Devices. (If anybody is interested please ask me

Many reading operations are based on the script our user mega (many thanks for that) uploaded.
But I got stuck at a very important point. The weekly program. From the, I call it "mega-script", he wrote:
Code: Select all
for ($j = 1 ; $j <= 7 ; $j++)
{
$readlen = 26;// Sat, Sun, Mon, Tue, Weg, Thu, Fri
$program = array();
unset($program);
for($i = $pos; $i < $readlen+$pos ; $i+=2)
{
$bin = str_pad(decbin(hexdec(dechex(ord(substr($str,$i,1))))),8,"0",STR_PAD_LEFT).str_pad(decbin(hexdec(dechex(ord(substr($str,$i+1,1))))),8,"0",STR_PAD_LEFT);
//echo $bin." ";
$deg = bindec(substr($bin,0,7));
//$deviceconf[$hilf["RFAdress"]]["WeeklyProgramm".$j.""] .= ($deg/2)."^C ";
$min = bindec(substr($bin,7,9));
//$deviceconf[$hilf["RFAdress"]]["WeeklyProgramm".$j.""] .= number_format(($min*5/60),2)."hr | ";
$program["deg"][] = ($deg/2);
$program["time"][] = number_format(($min*5/60),2);
}
$pos += $readlen;
}
Code: Select all
8.58 - 17.67 - 23.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00 - 24.00
Happy hollidays and a happy new year 2014!
SilentHunter