Forward raw xml data
This commit is contained in:
parent
7ab68e218c
commit
25e1adc3fb
1 changed files with 4 additions and 1 deletions
|
@ -41,10 +41,13 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
|
||||||
self.to_dashboard(post_data)
|
self.to_dashboard(post_data)
|
||||||
|
|
||||||
def to_dashboard(self, data):
|
def to_dashboard(self, data):
|
||||||
|
|
||||||
dev = self.devEUI(data)
|
dev = self.devEUI(data)
|
||||||
text = self.payload(data)
|
text = self.payload(data)
|
||||||
|
|
||||||
|
ws = websocket.create_connection("wss://home-safety-visual.eu-gb.mybluemix.net/data")
|
||||||
|
ws.send("%s", data)
|
||||||
|
ws.close()
|
||||||
|
|
||||||
ws = websocket.create_connection("wss://home-safety-visual.eu-gb.mybluemix.net/rawmessage")
|
ws = websocket.create_connection("wss://home-safety-visual.eu-gb.mybluemix.net/rawmessage")
|
||||||
ws.send("%s:%s" % (dev, text))
|
ws.send("%s:%s" % (dev, text))
|
||||||
ws.close()
|
ws.close()
|
||||||
|
|
Loading…
Reference in a new issue