diff --git a/images/info.png b/images/info.png new file mode 100644 index 0000000..4dcc170 Binary files /dev/null and b/images/info.png differ diff --git a/index.php b/index.php index 76cd858..5ffe4fd 100644 --- a/index.php +++ b/index.php @@ -56,7 +56,7 @@ foreach($DATA as $room){ echo '
'; - echo '

'.$room["name"].'

'; + echo '

'.$room["name"].'

'; $DEVICES = array(); @@ -87,7 +87,7 @@ echo '
'; //power > 0 then enabled //level = brightness //state = on or off - echo '

'.$device['name'].'

'; + echo '

'.$device['name'].'

'; echo ' | '; echo '
'; echo '

Brightness:

'; diff --git a/info.php b/info.php new file mode 100644 index 0000000..c27d01e --- /dev/null +++ b/info.php @@ -0,0 +1,38 @@ +Device Info'; + echo '

Device ID:'.$did.'

'; + $CMD = "cmd=DeviceGetInfo&data=1".TOKEN."".$did."name,power,product,class,image,control,realtype,other,status"; + + $result = getCurlReturn($CMD); + $array = xmlToArray($result); + if( isset( $array["image"] ) && ! is_array( $array["image"]) ){ + echo '

'; + } + + pa( $array ); + +} + +if( isset($_REQUEST['rid']) && $_REQUEST['rid'] != "" ){ + $rid = $_REQUEST['rid']; + echo '

Room Information

'; + echo '

Room ID:'.$rid.'

'; + + $CMD = "cmd=RoomGetInfoAll&data=1".TOKEN."".$rid."name,power,product,class,image,imageurl,control,other"; + + $result = getCurlReturn($CMD); + $array = xmlToArray($result); + + pa( $array ); +} +?> \ No newline at end of file