Example #1
0
 def __init__(self, logger, cprint):
     self.air_version = "20180628"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "Air"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger,
                                           mac=self.mac,
                                           addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on"}
     self.mode_kv = {
         "0": "auto",
         "1": "cold",
         "2": "heat",
         "3": "dehumidity",
         "4": "wind"
     }
     self.speed_kv = {
         "0": "low",
         "1": "overlow",
         "2": "normal",
         "3": "overnormal",
         "4": "high",
         "5": "auto"
     }
 def __init__(self, logger, cprint):
     self.air_version = "20180706"
     self.mac = get_mac_by_tick()
     self.device_type = "THSensor"
     BasicCmd.__init__(self, logger=logger, cprint=cprint, version=self.air_version, d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger, mac=self.mac, addr=rout_addr)
     self.do_start()
 def __init__(self, logger, cprint):
     self.air_version = "20180703"
     self.mac = get_mac_by_tick()
     self.device_type = "Curtain_Wifi"
     BasicCmd.__init__(self, logger=logger, cprint=cprint, version=self.air_version, d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger, mac=self.mac, addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on", "2": "pause"}
 def __init__(self, logger, cprint):
     self.air_version = "20180703"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "Celling_lamp"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
 def __init__(self, logger, cprint):
     self.air_version = "20180703"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "Curtain"
     self.keylist = None
     self.watchlist = None
     self.device_addr = None
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
Example #6
0
 def __init__(self, logger, cprint):
     self.air_version = "20180706"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "TV"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger,
                                           mac=self.mac,
                                           addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on"}
Example #7
0
 def __init__(self, logger, cprint):
     self.air_version = "20180706"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "EleScale"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger,
                                           mac=self.mac,
                                           addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on"}
     self.unit_kv = {"0": "kg", "1": "jin", "2": "pound"}
     self.unitv_kv = {"kg": 100.0, "jin": 50.0, "pound": 45.36}
Example #8
0
 def __init__(self, logger, cprint):
     self.air_version = "20180702"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "Hanger"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger,
                                           mac=self.mac,
                                           addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on"}
     self.ctl_kv = {"0": "up", "1": "down", "2": "pause"}
     self.ster_d_list = [10, 20]
     self.dry_d_list = [30, 60, 90, 120]
     self.air_dry_d_list = [30, 60, 90, 120]
 def __init__(self, logger, cprint):
     self.air_version = "20180703"
     self.mac = str(hex(int(time.time())))[-8:]
     self.device_type = "AirFilter"
     BasicCmd.__init__(self,
                       logger=logger,
                       cprint=cprint,
                       version=self.air_version,
                       d_type=self.device_type)
     self.sim_obj = eval(self.device_type)(logger,
                                           mac=self.mac,
                                           addr=rout_addr)
     self.do_start()
     self.onoff_kv = {"0": "off", "1": "on"}
     self.ctl_kv = {"0": "auto", "1": "manual", "2": "sleep"}
     self.speed_kv = {
         "0": "low",
         "1": "middle",
         "2": "high",
         "3": "very_high",
         "4": "super_high",
         "5": "sleep"
     }