Example #1
0
def testing():
    ActivityCheck().start()
    settings = ProjectSettings()
    settings.GAD_TABLE = GAD_MAP_TABLE_OUTSIDE
    KNXWriter(name='b0_Set_Pos', value=str(random.randint(0, 100)))
    time.sleep(12)
    tempData = KNXReader(name="externalTemp")
    val = tempData.ReadValue()
    print(val)
    time.sleep(12)
    KNXWriter(name='b0_Set_Pos', value='50')
Example #2
0
            mapper = GroupAddressTableMapper(GAD=self.GAD_TABLE)
            translator = mapper.getDptXlator(self.KNX_Address)
            if value == '' or value is None:
                return ''
            else:
                self.value = value
                self.valueData = translator.valueToData(value)
                self.valueAsFrame = translator.dataToFrame(self.valueData)
                self.valueAsFrameHEX = self.valueAsFrame.hex()
                return str(self.valueAsFrameHEX)
        except Exception as e:
            pass


if __name__ == "__main__":
    try:
        settings = ProjectSettings()
        from LKNX_ProjectSettings import ProjectSettings
        from DATA_KNXAdresses import GAD_MAP_TABLE_OUTSIDE
        settings.GAD_TABLE = GAD_MAP_TABLE_OUTSIDE

        #tempData = KNXReader(name= "indoorTemp")
        #curVal,error = tempData.ReadValue()

        #settings.ServerIP = "http://90.145.162.7:8109"
        #startLogging()
        #main()

    except Exception as e:
        pass