Commit cf4cd8cf authored by Nico Schottelius's avatar Nico Schottelius

Pass provider information to lower level

parent 7fa83bab
......@@ -76,12 +76,16 @@ def get_temp(deveui, payload):
return res
def decode_adeunis(pkg):
def decode_adeunis(provider, pkg):
data = pkg.split(":")
deveui = data[0]
payload = data[1]
# ttn -> base64 encoded
if provider == "ttn":
payload = base64.b64decode(payload)
res = []
# Only handle known devices
......@@ -94,11 +98,8 @@ def decode_adeunis(pkg):
return res
def nodered_adeunisrf(provider, data):
# ttn -> base64 encoded
if provider == "ttn":
data = base64.b64decode(data)
res = decode_adeunis(provider, data)
res = decode_adeunis(data)
if not res:
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment