diff --git a/btproxy/main.py b/btproxy/main.py index edf5379..1b201c0 100644 --- a/btproxy/main.py +++ b/btproxy/main.py @@ -32,9 +32,10 @@ async def read(connection, mqtt_client): if uart.in_waiting: res = uart.read(uart.in_waiting) data = res.decode().strip().split() - logging.info('Received data: %s', data) + nums = ','.join(data) + logging.info('Received data: %s', nums) - await mqtt_client.publish('test', payload=str(data)) + await mqtt_client.publish('test', payload=nums) async def main(): while True: diff --git a/misc/test.html b/misc/test.html new file mode 100644 index 0000000..0321594 --- /dev/null +++ b/misc/test.html @@ -0,0 +1,47 @@ + + + + + + Weboscoket MQTT + + + + Use WebSocket client to connect to MQTT server + +