add support for sending to ttn2prom
This commit is contained in:
parent
d4349fa854
commit
6602000cb7
4 changed files with 39 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ import psycopg2.extensions
|
|||
import sys
|
||||
import time
|
||||
import websocket
|
||||
|
||||
import requests
|
||||
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s')
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -60,6 +60,16 @@ def nodered_send(path, data):
|
|||
ws.send("%s" % data)
|
||||
ws.close()
|
||||
|
||||
|
||||
|
||||
|
||||
myobj = {'somekey': 'somevalue'}
|
||||
|
||||
|
||||
def ttn2prom_send(path, data):
|
||||
url = 'http://localhost:8047/'
|
||||
x = requests.post(url, data = data)
|
||||
|
||||
channels = [ "loriot", "swisscom", "ttn" ]
|
||||
|
||||
def pg_conn_notify():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue