Skip to content

Plugin wird nicht ausgeführt #565

@JonasP97

Description

@JonasP97

Moin zusammen,

ich bin absoluter RPi und Python Anfänger.
Ich versuche gerade ein Leuchtschild bestehend aus ws2812b LED's mithilfe eines Plugins je nach RIC bei der POCSAG Alarmierung zum leuchten zu bringen.

in der BosWatch config ist template aktiviert.

Das Plugin wird auch fehlerfrei geladen, jedoch wird mir im BosWatch betrieb nicht einmal die empfangene RIC aus der Zeile "logging.debug(data["ric"])" angezeigt.

Ebenso hatte ich Anfangs versucht die Rics per globalVars aus der Boswatch Config zu ziehen, was jedoch auch 0 Reaktion ergab.
Meine ersten Versuche sehen so aus:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

import logging # Global logger
from includes import globalVars  # Global variables
from includes.helper import timeHandler
from includes.helper import configHandler

def onLoad():

	try:

		pass

	except:

		logging.error("unknown error")
		logging.debug("unknown error", exc_info=True)
		raise

def run(typ,freq,data):	

			if typ == "POC":

				logging.debug(data["ric"])

				if data["ric"] == 111111:

					logging.debug("RTW1")

				elif data["ric"] == 111112:

					logging.debug("RTW2")

				elif data["ric"] == 111113:

					logging.debug("HLF1")

				elif data["ric"] == 111114:

					logging.debug("HLF2")

				elif data["ric"] == 111116:

					logging.debug("DLK")

				else:

					logging.debug("Kein Treffer")
			else:
				logging.warning("Invalid Typ: %s", typ)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions