Esphome and tire pressure sensors (TPMS)

Hi all,

I just started with esphome and i plan to put one into my old car and turn it into a smart car.

I’m wondering has anyone tried this with wireless tire pressure sensors?

Short answer; no I have no experience with TPMS sensors being used in an electronics hobby aspect. However, I know the basic concepts to setup a system to use them.

First you need a radio receiver. You can find the hardware pre-made and try to interface with it or make your own with an RTL-SDR. Get one that matches the frequency of the sensors, either 433MHz (most of Europe) or 315MHz (pretty much the rest of the world). From there you need to figure out the output from said receiver. Whether it is serial based like SPI, or I2C, or CANBUS (typical for the actual receiver in a car), or other. CANBUS will more than likely require special wiring. Last thing to do is figure out or find the documentation for the communication protocol. This will give you a list of commands to send to the receiver which then sends out to the transmitter or replies with requested data. Each sensor will transmit its serial number followed by data. On a newer car with TPMS, these serial numbers are registered to the receiver so that it only reads those sensors. Imagine driving down the road and your car starts picking up the 5 other cars around you… it’d get confused really quick.

1 Like

Here is a guy explaining TPMS

This should give you a good idea of what you need.

5 Likes

Anyone have success getting their TPMS data? I tried getting it thru an OBD2/Torque, setup but no luck.

I’m also interested in this, anyone had any luck?

I am using an RTL-SDR stick (the Nooelec NESDR-Smart V4) and the rtl_433 package on a Raspberry Pi, and that works pretty well for receiving TPMS transmissions. Both of my cars happen to use 315MHz. One car transmits a lot more frequently than the other, but I do get values from both. The Pi (a 3B) also runs a few other things aside from the rtl_433 package, and performance has not been a problem at all. It looks like there might be some work going on to run some of the rtl_433 decoders on like an esp32 system with a cc1101 module, which would bring the cost down quite a bit, but I’m not sure if the cc1101 can be set up to run 315MHz.

2 Likes

I have a friend who builds exactly this kind of thing for a living (various devices for collecting TPMS data for presentation and analysis by Userspace tools).

If I were to ask him, my prediction is that he’d say it would be relatively easy to:
Get an off-the-shelf CAN bus adapter, (which I believe have already been integrated with ESPHome),
Let it read the TPMS (among other things that might be interesting) right off your OBD-II connector’s CAN pins.
Let the ESP offer the data as a webpage for in-car use, or upload it to HomeAssist when parked at home.

Hi there, I’m doing a similar thing - I have a car with one set of street tires, and another set of race tires, all with 315 MHz sensors (I think) . I’ve just gotten data flowing using the Ford sensor in Andreas’ video above, but it’s a huge stream of data that I don’t know how to parse out. I feel dumb asking this, but can you help me get pointed in the right direction to get the sensor data like you show above in Home Assistant?

This is how I currently have my sensors configured

  • platform: mqtt
    state_topic: “HomeAssistant/rtlsdr/event/71AC40”
    device_class: pressure
    unique_id: 71AC40
    name: TPMS 4
    unit_of_measurement: ‘PSI’

and the data I get is like this: {“time”:“2021-05-20 20:53:29”,“model”:“Schrader-SMD3MA4”,“type”:“TPMS”,“flags”:3,“id”:“71E193”,“pressure_PSI”:19.2}

I’m currently lost.

Thanks,

Jake

It should be possible, you would need to verify that they are into the list of supported protocols from Northernman library, I would be interested by your result if you happen to test it.

Note also that I have added BLE TPMS to OpenMQTTGateway, you just need a barebone ESP32 for these ones and they will be autodiscovered into HASS

1 Like

I’m curious, is the TPM system built into the car or an after market? if after market what system did you use? I’m looking at doing something like this for my RV, and pretty sure I have to do it as aftermarket.

How did you find the frequency? need to figure out if my car transmits on radio frequency as well.

This is for the factory TPMS, one on a Toyota product and the other on a Hyundai / Kia product. For my installation, I am using rtl_433 to “read” the sensor transmissions independent of the monitoring / alerting system in the car. The sensors on my Toyota broadcast all the time (when pressurized), and the Hyundai / Kia broadcasts at a much slower interval when it has been parked for a while.

I was able to find the frequency using Google and the model of my car, but it seems like a lot of TPMS operate on 315 or 433 or 868 MHz.

I would note that there are two types of TPMS, one that uses “direct” sensors (in the tire pressure transducers) and one that uses an “indirect” method, using the ABS wheel speed sensors. If you have the “direct” system, you may be able to read the sensors using rtl_433. If it is the indirect type, you might have to use an aftermarket TPMS.

I was just messing with this and it does not seem the library from NorthernMan is as large as the merbana library for the standard rtl_433 distro available for rtl-sdr. Any reason why these cannot be combined it seems like alot of work overlaps here.

I’m currently running a RTL-SDR on RTL_433 on Ubuntu in parallel with an ESP32 CC1101 and they are both finding different items.

Starting to figure out how to define sensors but not there yet.

Did you identified the protocol used by your tpms with the sdr?

I have not but it is included in the merbana rtl_433.

I could determine it if it can be added.

{“time”:“2022-04-17 22:04:00”,“model”:“Schrader”,“type”:“TPMS”,“flags”:“00”,“id”:“xxxxx”,“pressure_kPa”:0,“temperature_C”:17.0,“mic”:“CRC”}

is an example

Seems that the TPMS decoders are causing an overflow when using with ESP32:

So they are removed by RTL_433_ESP, @NorthernMan54 did you happen to retest this recently ?

@1technophile @loca5790

When I pulled over the rtl_433 device decoders into rtl_433_ESP I only include the ones that use OOK_PULSE_PWM or OOK_PULSE_PPM modulation as during the initial effort with porting I could only confirm that these worked correctly ( availability of test devices etc ). For the particular TPMS device being discussed here “Schrader”, it uses OOK_PULSE_MANCHESTER_ZEROBIT modulation which is not enabled, and hence not included within the build.

At the present time I have not looked at enabling OOK_PULSE_MANCHESTER_ZEROBIT modulation as I don’t have access to a test device. For the other TPMS sensors, with a bit of manual coding and testing ( removal of bitbuffer_t databits going onto the stack ) they may work. But my goal with the port was to try and avoid tweaking each of the device decoders to reduce the needed code maintenance during updates.

One thing to keep in mind, I found that after the effort with the port that the CC1101 is a bit deaf and the receiver is not as sensitive as a rtl-sdr, so that could also explain the missing messages.

Understood on the def part I have a few different methods. I installed the CC1101 on an ESP32 in the garage with an external antenna to mainly pickup my TPMs sensors. Sounds like maybe I should ditch it and go the other route with the traditional RTL-SDR RTL433?

I have some other TPMS’s I need to get included still looking into figuring out how to add to library.

I see that some readers have mentioned the SDR (software defined radio) solution and I want to strongly encourage anybody using Home Assistant to consider adding one of these, whether they do tire pressure monitoring or not.
I got one from Amazon for about $30 (https://smile.amazon.com/gp/product/B00VZ1AWQA) but you can order from China if you’re not in a hurry and save about half.

I bought mine so I could read the Oregon Scientific weather station in my yard and have it show-up in HA instead of just on the dedicated head-unit in my kitchen. The standard package for rtl_433 decodes SO MANY devices! In addition to my OWN weather station, data from the following devices started flowing into my MQTT:

  1. My natural gas meter (as well as 5 of my neighbors)
  2. OTHER people’s weather stations
  3. MY wireless temperature probes in my freezers. (cheap Walmart devices)
  4. Several moisture sensors from neighbors (probably part of their irrigation system)
  5. MANY TPMS. I live near a school and get data from cars in the parking lot.
  6. Some remote vehicle/security systems (haven’t done anything with that).

So, if you run a monitor like MQTT-Explorer, you can see what devices are nearby and add YAML to your configuration file for any that are yours (or that you want to monitor.)

But back to the TPMS question you asked. If you add this device (I run it on an old Pi3b, separate from my HA), you should have access to your vehicles’ sensors. The only “detective work” you’ll need to do is figure out which sensor is in each tire. That’s dead-simple, just check the car’s dashboard, usually tires are not exactly the same pressure. Even if they are, you can temporarily inflate/deflate one tire at a time to see which sensor it contains. Here’s the MQTT entry for one of my tires (2016 Toyota):

image