diff --git a/xmlapi/devicelist.cgi b/xmlapi/devicelist.cgi index 7e9b38d..06a481e 100755 --- a/xmlapi/devicelist.cgi +++ b/xmlapi/devicelist.cgi @@ -7,21 +7,27 @@ puts -nonewline "" if {[info exists sid] && [check_session $sid]} { - set show_internal "" + set show_internal 0 + set show_remote 0 catch { set input $env(QUERY_STRING) set pairs [split $input &] foreach pair $pairs { if {0 != [regexp "^show_internal=(.*)$" $pair dummy val]} { set show_internal $val - break + continue + } + if {0 != [regexp "^show_remote=(.*)$" $pair dummy val]} { + set show_remote $val + continue } } } array set res [rega_script { - string show_internal = "} $show_internal {"; + integer show_internal = "} $show_internal {"; + integer show_remote = "} $show_remote {"; integer DIR_SENDER = 1; integer DIR_RECEIVER = 2; @@ -35,7 +41,9 @@ if {[info exists sid] && [check_session $sid]} { { object oDevice = dom.GetObject(sDevId); boolean bDevReady = oDevice.ReadyConfig(); - if( (true == bDevReady) && ("HMW-RCV-50" != oDevice.HssType()) && ("HM-RCV-50" != oDevice.HssType()) ) + boolean isRemote = ( ("HMW-RCV-50" == oDevice.HssType()) || ("HM-RCV-50" == oDevice.HssType() ) ); + + if( (true == bDevReady) && ( ( isRemote == false ) || ( show_remote == 1 ) ) ) { string sDevInterfaceId = oDevice.Interface(); string sDevInterface = dom.GetObject(sDevInterfaceId).Name(); @@ -60,7 +68,7 @@ if {[info exists sid] && [check_session $sid]} { show = true; } - if ( show_internal == "1"){ + if ( show_internal == 1){ show = true; } diff --git a/xmlapi/index.cgi b/xmlapi/index.cgi index bb055ae..d7deeb2 100755 --- a/xmlapi/index.cgi +++ b/xmlapi/index.cgi @@ -32,7 +32,8 @@ if {[info exists sid] && [check_session $sid]} { checkuptodate.cgi???? devicelist.cgiLists all devices with channels. Contain names, serial number, device type and ids.
sid=string - security access token id
- show_internal=0/1 - adds internal channels also (default=0) + show_internal=0/1 - adds internal channels also (default=0)
+ show_remote=0/1 - adds output of virtual remote channels (default=0) devicetypelist.cgiLists all possible device types with their possible meta data.
sid=string - security access token id
@@ -101,7 +102,8 @@ if {[info exists sid] && [check_session $sid]} { statelist.cgiOutputs all devices with channels and their current values.
sid=string - security access token id
ise_id=int - output only channels and values of device with specified id (e.g. "1234")
- show_internal=0/1 - adds internal channels also (default=0) + show_internal=0/1 - adds internal channels also (default=0)
+ show_remote=0/1 - adds output of virtual remote channels (default=0) systemNotification.cgiOutputs the currently existing system notifications.
sid=string - security access token id
diff --git a/xmlapi/statelist.cgi b/xmlapi/statelist.cgi index bce192e..7b87d83 100755 --- a/xmlapi/statelist.cgi +++ b/xmlapi/statelist.cgi @@ -9,6 +9,7 @@ if {[info exists sid] && [check_session $sid]} { set ise_id 0 set show_internal 0 + set show_remote 0 catch { set input $env(QUERY_STRING) set pairs [split $input &] @@ -21,11 +22,16 @@ if {[info exists sid] && [check_session $sid]} { set show_internal $val continue } + if {0 != [regexp "^show_remote=(.*)$" $pair dummy val]} { + set show_remote $val + continue + } } } set comm "var ise_id=$ise_id;\n" append comm "var show_internal=$show_internal;\n" + append comm "var show_remote=$show_remote;\n" if { $ise_id != 0 } then { @@ -64,7 +70,9 @@ if {[info exists sid] && [check_session $sid]} { { object oDevice = dom.GetObject(sDevId); - if( oDevice.ReadyConfig() && (oDevice.Name() != "Zentrale") && (oDevice.Name() != "HMW-RCV-50 BidCoS-Wir") ) + boolean isRemote = ( ("HMW-RCV-50" == oDevice.HssType()) || ("HM-RCV-50" == oDevice.HssType() ) ); + + if( oDevice.ReadyConfig() && ( ( isRemote == false ) || ( show_remote == 1 ) ) ) { Write("