コード例 #1
0
def startAllDevices():
    print 'Starting DEVICE Mapping..'
    tenant_deviceIdsList = TENANT().getDevicesIds(BASE_URL, session)
    deviceInstanceList = []
    # Instantiate device objects then set device credentials
    for i in range(0, len(tenant_deviceIdsList)):
        deviceInstance = DEVICE(BASE_URL, session, tenant_deviceIdsList[i])
        deviceInstanceList.append(deviceInstance)
        print 'Device ' + str(i + 1) + ' mapped.'
    print 'Finished mapping devices.'
    return deviceInstanceList
コード例 #2
0
    def check(self, printGroat=False):
        """
        """

        # Create device from user 'device' module
        from device import DEVICE
        self._device = DEVICE(self.ets, self._deviceIndAddr)

        self.ets.register(self._device)

        if printGroat:
            logger.info(ets.getGrOAT(self._device, "gad"))
            logger.info(ets.getGrOAT(self._device, "go"))
コード例 #3
0
ファイル: deviceRunner.py プロジェクト: MBizm/KNXPDPT
    def check(self, printGroat=False):
        """
        """

        # Create device from user 'device' module
        from device import DEVICE
        self._device = DEVICE()

        self._device.register(self._ets)
        self._device.weave(self._ets)

        if printGroat:
            Logger().info(self._ets.getGrOAT("gad"))
            Logger().info(self._ets.getGrOAT("go"))

        self._device.init()
コード例 #4
0
def startDeviceInstance(deviceID):
    print 'Starting DEVICE Mapping..'
    # Instantiate device object by ID and then set device credentials
    deviceInstance = DEVICE(BASE_URL, session, deviceID)
    print 'Finished mapping device.'
    return deviceInstance