This is an example of routing serial communication to network protocols (websocket, MQTT, etc).
- install dependencies, best done in virtualenv so it's a matter of issuing simple
pip install -U -r requirements.txtin your terminal - connect the device you want to monitor to your computer
- update
service/settings.pywith your own configuration: serial port to listen to and MQTT settings (host and port) - run the application with
python server.py, if you want to debug using pdb/ipdb then exportDEBUGvariable to your environment (eg.DEBUG=1 python server.py) - to test websocket channel open
http://127.0.0.1:8080in browser