Tools for encoding and transmitting TPMS (Tire Pressure Monitoring System) signals.
This project uses uv for dependency management. Make sure you have uv installed:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Clone the repository:
git clone https://github.com/yagoliz/tpms_tools.git
cd tpms_tools
- Create and activate a virtual environment using uv:
uv venv
source .venv/bin/activate
- Install dependencies including development tools:
uv pip install -e ".[dev]"
Generate a WAV-file that can then be transmitted:
python3 scripts/wavfile.py renault --sensor-id 0x123456 --pressure 220 --temperature 25
Format code:
black src/ tests/
ruff check src/ tests/ --fix
Run tests:
pytest
tpms_tools/
├── src/
│ └── tpms_tools/ # Main package
│ ├── encoders/ # Modulation and encoders
│ │ └── devices/ # TPMS transmitter devices
│ ├── modulation/ # Signal modulation
│ └── transmission/# SDR transmission (not developed atm)
├── tests/ # Test suite
└── pyproject.toml # Project configuration
- Create a new encoder in
src/tpms_tools/encoders/devices
- Subclass
TPMSEncoder
- Implement the required methods
- The CLI will automatically detect your new encoder
Example:
from tpms_tools.encoders.base import TPMSEncoder
class MyTPMSEncoder(TPMSEncoder):
@property
def protocol_name(self) -> str:
return "MyProtocol"
# Implement other required methods