Initial release
This commit is contained in:
29
run.py
Normal file
29
run.py
Normal file
@@ -0,0 +1,29 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user