Using UART on web with logging
sudo apt install python3 python3-full
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
or just
sudo apt install python3 python3-pip
pip3 install -r requirements.txt --break-system-packages
Fix Permission denied for /dev/ttyUSB* :
sudo usermod -a -G dialout pi
python3 app.py
Then open http://localhost.
sudo nano /etc/systemd/system/uart-web.service
[Unit]
Description=UART Web Console Service
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home/pi/UART-Web
ExecStart=/home/pi/UART-Web/.venv/bin/python /home/pi/UART-Web/app.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start uart-web.service
sudo systemctl enable uart-web.service
If failed, then
sudo journalctl -u uart-web.service -f
sudo systemctl status uart-web.service
and ask AI for help.😉