mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-02-04 06:14:17 +01:00
little Modul changes
This commit is contained in:
parent
7731031a15
commit
2b2f8c54e6
|
|
@ -52,9 +52,9 @@ except:
|
|||
data = {"ric":"1234567", "function":"1", "msg":"Hello World!"}
|
||||
|
||||
while True:
|
||||
time.sleep(1)
|
||||
logging.info("Alarm!")
|
||||
for i in pluginloader.getPlugins():
|
||||
logging.debug("Load Plugin: " + i["name"])
|
||||
plugin = pluginloader.loadPlugin(i)
|
||||
plugin.run("POC","80000000",data)
|
||||
time.sleep(1)
|
||||
logging.info("Alarm!")
|
||||
for i in pluginloader.getPlugins():
|
||||
plugin = pluginloader.loadPlugin(i)
|
||||
logging.debug(i["name"] + " Plugin called")
|
||||
plugin.run("POC","80000000",data)
|
||||
|
|
@ -9,8 +9,6 @@ import urllib #for the HTTP request with parameters
|
|||
import base64 #for the HTTP request with User/Password
|
||||
|
||||
def run(typ,freq,data):
|
||||
logging.debug("BosMon Plugin called")
|
||||
logging.debug(" - typ: " +typ)
|
||||
try:
|
||||
#get BosMon-Config
|
||||
bosmon_server = globals.config.get("BosMon", "bosmon_server")
|
||||
|
|
@ -18,6 +16,7 @@ def run(typ,freq,data):
|
|||
bosmon_user = globals.config.get("BosMon", "bosmon_user")
|
||||
bosmon_password = globals.config.get("BosMon", "bosmon_password")
|
||||
bosmon_channel = globals.config.get("BosMon", "bosmon_channel")
|
||||
logging.debug(" - typ: " +typ)
|
||||
logging.debug(" - Server: " +bosmon_server)
|
||||
logging.debug(" - Port: " +bosmon_port)
|
||||
logging.debug(" - User: " +bosmon_user)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import logging # Global logger
|
|||
import globals # Global variables
|
||||
|
||||
def run(typ,freq,data):
|
||||
logging.debug("template Plugin called")
|
||||
try:
|
||||
logging.info("ZVEI: %s wurde auf %s empfangen!", data["zvei"],freq)
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue