Files
domoticz-FrameworkPlugin/run.py
2023-03-26 22:16:47 +02:00

30 lines
542 B
Python

import time
import Domoticz
import plugin
Parameters = {
"Address":"localhost",
"Port":"8080",
"Username":"",
"Password":"",
"Mode1":"",
"Mode2":"",
"Mode3":"",
"Mode4":"",
"Mode5":"",
"Mode6":0
}
Images = Domoticz.Images
Devices = Domoticz.Devices
with open("./plugin.py", 'rb') as fileobj:
exec(compile(fileobj.read(), "plugin.py", 'exec'), globals(), globals())
onStart()
while True:
Domoticz.Log("## Plugin Heartbeat ##")
onHeartbeat()
time.sleep(Domoticz.domo.GetHeartbeat())