15 lines
345 B
Python
15 lines
345 B
Python
# Enter your python code.
|
|
import json
|
|
from common.Logger import logger
|
|
from quickfaas.remotebus import publish
|
|
import re, uuid
|
|
|
|
|
|
def sendData(message):
|
|
logger.debug(message)
|
|
payload = {}
|
|
for measure in message["measures"]:
|
|
payload[measure["name"]] = measure["value"]
|
|
|
|
publish(__topic__, json.dumps(payload), __qos__)
|
|
|