# andi38/tpms architecture

> Architecture diagram of the GitHub repository andi38/tpms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andi38/tpms
- Repository: https://github.com/andi38/tpms

## Overview

This repository contains independent receivers for two external TPMS sensor types: 433 MHz radio and BLE. The principal BLE workflow is sensor advertising → scanning → extracting battery, temperature, and pressure readings; it is implemented in two alternative Python programs and documented for ESP32. The radio workflow receives 433 MHz transmissions through a CC1101-based ESP8266 setup. The Arduino files are represented from README descriptions and filenames; their source was not sampled, so implementation details and links beyond those documented are omitted.

Main entry points: [`tpms-bleak.py`](https://github.com/andi38/tpms/blob/main/tpms-bleak.py) (Bleak scanner), [`tpms-bluepy.py`](https://github.com/andi38/tpms/blob/main/tpms-bluepy.py) (Bluepy scanner), [`CC1101_TPMS_433.ino`](https://github.com/andi38/tpms/blob/main/CC1101_TPMS_433.ino) (CC1101 receiver), [`BLE_TPMS.ino`](https://github.com/andi38/tpms/blob/main/BLE_TPMS.ino) (ESP32 BLE receiver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_radio["433 MHz receiver"]
  node_cc1101_receiver["CC1101 receiver"]
end

subgraph group_ble["BLE receivers"]
  node_esp32_ble["ESP32 BLE receiver<br/>[BLE_TPMS.ino]"]
  node_bleak_scanner["Bleak scanner<br/>[tpms-bleak.py]"]
  node_bluepy_scanner["Bluepy scanner<br/>[tpms-bluepy.py]"]
end

subgraph group_readings["Sensor readings"]
  node_bleak_readings["Bleak readings<br/>[tpms-bleak.py]"]
  node_bluepy_readings["Bluepy readings<br/>[tpms-bluepy.py]"]
end

node_radio_sensor(("433 MHz TPMS sensor"))
node_ble_sensor(("BLE TPMS sensor"))

node_radio_sensor -->|"transmits 433 MHz"| node_cc1101_receiver
node_ble_sensor -->|"advertises data"| node_esp32_ble
node_ble_sensor -->|"advertises data"| node_bleak_scanner
node_ble_sensor -->|"advertises data"| node_bluepy_scanner
node_bleak_scanner -->|"decodes readings"| node_bleak_readings
node_bluepy_scanner -->|"decodes readings"| node_bluepy_readings

click node_cc1101_receiver "https://github.com/andi38/tpms/blob/main/CC1101_TPMS_433.ino"
click node_esp32_ble "https://github.com/andi38/tpms/blob/main/BLE_TPMS.ino"
click node_bleak_scanner "https://github.com/andi38/tpms/blob/main/tpms-bleak.py"
click node_bluepy_scanner "https://github.com/andi38/tpms/blob/main/tpms-bluepy.py"
click node_bleak_readings "https://github.com/andi38/tpms/blob/main/tpms-bleak.py"
click node_bluepy_readings "https://github.com/andi38/tpms/blob/main/tpms-bluepy.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cc1101_receiver toneBlue
class node_esp32_ble,node_bleak_scanner,node_bluepy_scanner toneAmber
class node_bleak_readings,node_bluepy_readings toneMint
class node_radio_sensor,node_ble_sensor toneIndigo
```

## Components

### 433 MHz receiver

- [CC1101 receiver](https://github.com/andi38/tpms/blob/main/CC1101_TPMS_433.ino): `CC1101_TPMS_433.ino`

### BLE receivers

- [ESP32 BLE receiver](https://github.com/andi38/tpms/blob/main/BLE_TPMS.ino): `BLE_TPMS.ino`
- [Bleak scanner](https://github.com/andi38/tpms/blob/main/tpms-bleak.py): `tpms-bleak.py`
- [Bluepy scanner](https://github.com/andi38/tpms/blob/main/tpms-bluepy.py): `tpms-bluepy.py`

### Sensor readings

- [Bleak readings](https://github.com/andi38/tpms/blob/main/tpms-bleak.py): `tpms-bleak.py`
- [Bluepy readings](https://github.com/andi38/tpms/blob/main/tpms-bluepy.py): `tpms-bluepy.py`

### Other components

- **433 MHz TPMS sensor**
- **BLE TPMS sensor**

## Connections

- 433 MHz TPMS sensor → CC1101 receiver: transmits 433 MHz (evidence: `README.md`)
- BLE TPMS sensor → ESP32 BLE receiver: advertises data (evidence: `README.md`)
- BLE TPMS sensor → Bleak scanner: advertises data (evidence: `README.md`)
- BLE TPMS sensor → Bluepy scanner: advertises data (evidence: `README.md`)
- Bleak scanner → Bleak readings: decodes readings (evidence: `tpms-bleak.py`)
- Bluepy scanner → Bluepy readings: decodes readings (evidence: `tpms-bluepy.py`)
