コード例 #1
0
ファイル: __main__.py プロジェクト: mnowotka/pyamaha
    def do_setWiredLan(self, line):
        """
        For setting Wired Network. Network connection is switched to wired by using this API. If no
        parameter is specified, current parameter is used. If set parameter is incomplete, it is possible not
        to provide network avalability.
        
        Usage: setWiredLan [dhcp=<true|false>] [ip_address=] [subnet_mask=] [default_gateway=] [dns_server_1=] [dns_server_2=] <enter>
        Example: setWiredLan dhcp=false dns_server_2=8.8.4.4 <enter>
        """
        data = {
            'dhcp': None,
            'ip_address': None,
            'subnet_mask': None,
            'default_gateway': None,
            'dns_server_1': None,
            'dns_server_2': None
        }

        args = line.split()
        for arg in args:
            k, v = arg.split('=')
            if k in data.keys():
                data[k] = v

        resp = DEV.request(System.set_wired_lan(**data))
        pprint.pprint(resp.json())
コード例 #2
0
 def do_getNetworkStatus(self, _):
     """
     For retrieving network related setup/information.
     
     Usage: getNetworkStatus <enter>
     """    
     resp = DEV.request(System.get_network_status())
     pprint.pprint(resp.json())
コード例 #3
0
 def do_getFeatures(self, _):
     """
     For retrieving feature information equipped with a Device.
     
     Usage: getFeatures <enter>
     """
     resp = DEV.request(System.get_features())
     pprint.pprint(resp.json())
コード例 #4
0
 def do_getDeviceInfo(self, _):
     """
     For retrieving basic information of a Device.
     
     Usage: getDeviceInfo <enter>
     """
     resp = DEV.request(System.get_device_info())
     pprint.pprint(resp.json())
コード例 #5
0
 def do_getLocationInfo(self, _):
     """
     For retrieving Location information.
     
     Usage: getLocationInfo <enter>
     """      
     resp = DEV.request(System.get_location_info())
     pprint.pprint(resp.json())
コード例 #6
0
 def do_getFuncStatus(self, _):
     """
     For retrieving setup/information of overall system function. 
     Parameters are readable only when corresponding functions are available in "func_list" of /system/getFeatures.
     
     Usage: getFuncStatus <enter>
     """    
     resp = DEV.request(System.get_network_status())
     pprint.pprint(resp.json())
コード例 #7
0
 def do_setAutoPowerStandby(self, enable):
     """
     For setting Auto Power Standby status. 
     Actual operations/reactions of enabling Auto Power Standby depend on each Device.
     
     Usage: setAutoPowerStandby <true|false> <enter>
     """
     enable = True if enable == 'true' else False
     resp = DEV.request(System.set_autopower_standby(enable))
     pprint.pprint(resp.json())
コード例 #8
0
 def do_sendIrCode(self, code):
     """
     For sending specific remote IR code. 
     A Device is operated same as remote IR code reception. But continuous IR code cannot be used in this command. 
     Refer to each Device's IR code list for details..
     
     Usage: sendIrCode <code> <enter>
     """      
     code = code.strip()
     resp = DEV.request(System.send_ir_code(code))
     pprint.pprint(resp.json())
コード例 #9
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_sendIrCode(self, code):
     code = code.strip()
     resp = DEV.request(System.send_ir_code(code))
     pprint.pprint(resp.json())
コード例 #10
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_getLocationInfo(self, _):
     resp = DEV.request(System.get_location_info())
     pprint.pprint(resp.json())
コード例 #11
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_setAutoPowerStandby(self, _):
     resp = DEV.request(System.set_autopower_standby())
     pprint.pprint(resp.json())
コード例 #12
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_getFuncStatus(self, _):
     resp = DEV.request(System.get_network_status())
     pprint.pprint(resp.json())
コード例 #13
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_getFeatures(self, _):
     resp = DEV.request(System.get_features())
     pprint.pprint(resp.json())
コード例 #14
0
ファイル: __main__.py プロジェクト: gitter-badger/pyamaha
 def do_getDeviceInfo(self, _):
     resp = DEV.request(System.get_device_info())
     pprint.pprint(resp.json())