Skip to content

esadpyrenees/serial2websockets

Repository files navigation

serial2websockets.py

Read serial port and broadcast it on websockets. Allow multiple websocket clients, each has its own thread.

installation

with pip and venv :

sudo apt install python3-venv python3-pip # make sure you have venv and pip packages
python -m venv venv/ # create virtual environment
source venv/bin/activate # activate virtual environment
pip install -r requirements.txt # install all dependencies

or install the dependencies manually :

pip install pyserial websockets

use python script

python serial2websockets.py

# with this default parameters
python serial2websockets.py -p 5678 -b 9600 
  • automatic find ip address for the host and serial port is only tested on linux.
# log all messages with timestamp on standard output
python serial2websockets.py -l -t > log.csv

looks like:

YY/MM/DD hh:mm:ss:ffffff, a message from serial

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors