Python library for reading industrial scales using the P03 protocol.
Project description
📦 P03Py
Biblioteca Python para comunicação com balanças industriais via protocolo P03, com suporte à porta serial e TCP/IP.
📝 Descrição (PT-BR)
🚀 Conheça a P03Py, a primeira biblioteca Python dedicada à comunicação com balanças que utilizam o protocolo P03 (via serial ou TCP/IP).
Esta biblioteca foi desenvolvida para facilitar a integração com balanças industriais, utilizando leitura byte a byte com máquina de estados, validação de STX, CR e checksum, e extração de variáveis como peso bruto, líquido, tara e status da balança.
📺 Veja a demonstração da biblioteca no YouTube:
https://youtu.be/kWqxdXJBAPY
🔧 Compatível com portas COM (serial) ou conexões TCP/IP
📝 Description (EN)
🚀 Meet P03Py, the first Python library dedicated to communication with weighing scales using the P03 protocol (via serial or TCP/IP).
This library is designed to simplify integration with industrial scales, using byte-by-byte reading, a state machine, validation of STX, CR and checksum, and extraction of variables like gross weight, net weight, tare, and scale status.
📺 Watch the library demo on YouTube:
https://youtu.be/kWqxdXJBAPY
🔧 Compatible with serial (COM) ports and TCP/IP connections
📚 Funcionalidades | Features
- Comunicação via porta serial (RS-232) ou TCP/IP
- Máquina de estados para leitura segura
- Verificação de integridade (STX, CR, Checksum)
- Extração de dados: peso bruto, líquido, tara, status da balança
- Suporte a pacotes P03 reais usados na indústria
📦 Instalação | Installation
pip install p03py
📁 Exemplos disponíveis | Available Examples
-
diagnostico.py— Testa a porta serial com diversas configurações para descobrir qual está sendo utilizada pela balança -
teste_leitura_serial.py— Exemplo de leitura de dados da balança via porta serial -
teste_leitura_tcp.py— Exemplo de leitura de dados da balança via conexão TCP/IP -
diagnostico.py— Tests the serial port with multiple settings to discover the correct configuration used by the scale -
teste_leitura_serial.py— Sample test for reading scale data using serial port -
teste_leitura_tcp.py— Sample test for reading scale data using TCP/IP connection
🧪 Running Examples
python -m p03py.Exemplos.diagnostico
python -m p03py.Exemplos.teste_leitura_serial
python -m p03py.Exemplos.teste_leitura_tcp
🔗 Project
- GitHub: github.com/roneitop/p03py
📄 Licença | License
MIT © 2025 — Ronei Toporcov
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file p03py-1.0.4.tar.gz.
File metadata
- Download URL: p03py-1.0.4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
552eb988651ed25864c0d3747c373b2d026e35df1aa5c2789b801c1d37a6e3b9
|
|
| MD5 |
34af5e3fa2dd29e2fb16c0e9df0a00b9
|
|
| BLAKE2b-256 |
35dfcdc921b7357e64c101f8b9dce8c3d0e480895a8dd3aba5f2c5086b95815a
|
File details
Details for the file p03py-1.0.4-py3-none-any.whl.
File metadata
- Download URL: p03py-1.0.4-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c054d5d6b837f01adeee6cb7a73637d35b390d3b9268bd9b690c20ebe0b4abc
|
|
| MD5 |
4804c8a3dc9431d0f3af787234348f7b
|
|
| BLAKE2b-256 |
fdff4780c67d677a7f0a11d2240ff3f503edf06f1286245fb8670d2b80670ab0
|