Forward raw xml data

This commit is contained in:
Nico Schottelius 2016-09-17 05:42:38 +02:00
parent 7ab68e218c
commit 25e1adc3fb

View file

@ -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()