notify payload only

This commit is contained in:
Nico Schottelius 2020-03-12 15:09:26 +01:00
parent 478c0706ab
commit e12db330a2
2 changed files with 3 additions and 3 deletions

View file

@ -20,8 +20,8 @@ log = logging.getLogger(__name__)
dbname="lorawan"
def db_notify(provider, payload='', deveui=''):
notify="{}:{}".format(deveui, payload)
def db_notify(provider, payload=''):
notify=payload
log.debug("Notify: {} {}".format(provider, notify))
try:
conn = psycopg2.connect("dbname={}".format(dbname))

View file

@ -31,7 +31,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
# And insert into the db
lorautil.db_insert_json("ttn", post_data, payload, deveui)
lorautil.db_notify("ttn", post_data, deveui)
lorautil.db_notify("ttn", post_data)
def payload_hex(self, data):
mydict = lorautil.jsonToDict(data)