myServer 6 now has ability to monitor Tire Pressure and Temperature for heavy duty truck, RVs, Autos.
So, if you are using myServer 6 to control "everything else", now you can add the additional safety and convenience of viewing TPMS related data in an intuitive and integrated user interface.
Tire Pressure, Tire Temperature, and 5 sets of Alerts are supported. Alerts include: High pressure / Low pressure, High Temperature, Excessive Leakage.
The 5 sets of Alerts can be assigned to: Steer Tires, Drive Tires, Tag Tires, Trailer or towed Car tires with seperate settings.
The myServer 6 user interface is provided to display the above in a simple manner. It is completely customizable for your exact needs using myDesigner 6 application.
myServer 6 can be programmed for "automation rules" that trigger notifications (on screen popups, email, SMS messages etc) if your conditions are met (Transceiver sent a warning message).
Your daily Check List can be automated with the TPMS data.
The system works with both TireView and TSTechnology branded TPMS hardware. These are the most popular US branded systems.
Required is the RV-C / CAN transceiver (all available from Allonis as a tested package).
Optionally available is a standalone TPMS display that connects to the tire sensors in parallel with the Transceiver if you want another way to view TPMS data. This is powered via USB. It also contains a lithium battery for unwired use (requires regular charging).
Wiring:
The RV-C / CAN transceiver gets wired into the vehicle's existing CAN bus. myServer 6 controller gets a "CAN HAT" to get myServer on the same CAN bus. You may also have an RF repeater (just requires power) that relays the small radio signal from the wheel sensors to the Transceiver if there is a long vehicle and / or trailer involved.
The CAN wiring is standard: Red power / Black ground / Yellow CAN High / Purple CAN Low
INTRODUCTION
This solution is based on the RVC2MQTT bridge originally coded by Sean Brogan and ported to RPI4 by Richard Swika for Allonis. The RVC2MATT bridge facilitates monitoring and controlling RV systems via RV-C CAN BUS and HTTP MQTT protocols. This software enables RV owners to access real-time information about their vehicles, such as battery levels, temperatures, and tank levels, from anywhere with an internet connection. In this report, we present an extension of the RVC2MQTT software that adds two new entity classes for monitoring tank levels and tire pressure monitoring system (TPMS) readings. Specifically, we have developed a new TANK LEVEL SENSOR entity class and a new TPMS (Tire Pressure Monitoring System) entity class to allow for real-time monitoring of these critical RV systems. In addition, we have modified the RVC2MQTT software to work seamlessly with Allonis myServer, a popular automation and control software suite used by RV enthusiasts. This modification enhances the functionality of the RVC2MQTT software, providing RV owners with even greater insights into the performance and health of their vehicles.
Furthermore, we have extended the floor plan used by RVC2MQTT to include new definitions for our TANK LEVEL SENSOR and TPMS entity classes. This extension provides a visual representation of the RV's critical systems, allowing RV owners to easily monitor their status and quickly identify any potential issues. In the following sections, we describe the design and implementation of our new entity classes and floor plan extension, as well as their integration with the existing RVC2MQTT framework and Allonis myServer. We also present the Python script clients useful for testing and observing MQTT topics and traffic.
RVC2MQTT
Please familiarize yourself with RVC2MQTT on github here:
https://github.com/spbrogan/rvc2mqtt/blob/main/readme.md
WARNING
No Guarantees or warranties. This software can control physical devices on your RV CANBUS and makes no promises about the safety or security of those operations. Use at your own risk!
THEORY OF OPERATION
This program is a service that runs on hardware that has access to the RV CANBus and a MQTT Broker. The service enables bidirectional communication to the RV devices (sensors, switches, lights, tank level, TMPS, HVAC, etc) from Allonis myserver (or any other "smart home application")
SERVER STATE
When the server starts or stops running and when it loses or regains connection to the MQTT broker it reports state like this (where 012345678901234568 is the RV’s VIN):
rvc2mqtt/012345678901234568/state: online
Or
rvc2mqtt/012345678901234568/state: offline
MQTT LOGGER
To monitor output from RVC2MQTT in real time and save a log file, cd to mqtt_test folder and run:
Python3 mqtt_logger.py
Sensor Instances
Since there can be any number of the same kind of sensor in a given RV configuration, specific sensors are identified by “INSTANCE”. Multi-instance RV-C messages contain the INSTANCE as the first byte of the bus message to identify the associated sensor. Every corresponding MQTT message also contains the same INSTANCE number in the device field of the topic. Below tpms-0fef4-i0 is the device field and 0 is the INSTANCE number. This means the number in the MQTT message payload is the tire_pressure reading for the TPMS sensor at INSTANCE 0. Here 012345678901234568 represents the RV VIN number and must be set in the RVC2MQTT configuration file.
rvc2mqtt/012345678901234568/tpms-0fef4-i0/tire_pressure
Furthermore, for TPMS sensors, INSTANCE also corresponds to the Axle and Tire locations where the sensor is installed. Axle is the upper 4 bits and Tire is the lower 4 bits of INSTANCE:
INSTANCE = Axle << 4 + Tire
For this reason, it is necessary to “pair” specific TPMS sensors with an INSTANCE number to establish their installed location.
TIRE RAW STATUS
Unpaired TMPS sensors, don’t have an INSTANCE yet, so don’t use MULTI-INSTANCE RV-C messages. They transmit TIRE RAW STATUS instead, which contains a SENSOR IDENTIFICATION NUMBER, along with tire pressure and temperature readings. For convenience, we transmit TIRE_RAW_STATUS over MQTT on instance 255, like this:
rvc2mqtt/012345678901234568/tpms-0fef4-i255/tire_raw_status: {"sensor_identification_number": 56848, "tire_pressure": 25, "tire_temperature": 69.8}
This means a sensor with id 56848 is unpaired and available. This facilitates the ability to build a GUI that shows unpaired sensors along with live pressure and temperature readings. Listen for the TIRE RAW STATUS and SENSOR_IDENTIFICAION messages to construct the GUI.
python3 setup_sensors.py
SENSOR PAIRING
You can only pair sensors that are reporting on TIRE RAW STATUS. To pair the sensor, you set the sensor_identification_number of the desired INSTANCE. In this case to INSTANCE 48, axle 3 tire 0, like this:
rvc2mqtt/012345678901234568/tpms-0fef4-i48/sensor_identification_number/set: 56848
If the INSTANCE is already in use, the pairing will fail. If successful, you will immediately receive sensor_identification_number on the INSTANCE, like this:
rvc2mqtt/012345678901234568/tpms-0fef4-i48/sensor_identification_number: 56848
Along with an update of all the sensor’s readings sent in a similar fashion as individual MQTT messages as shown below. Updates are only resent when the reading changes or you request a refresh.
rvc2mqtt/012345678901234568/tpms-0fef4-i48/tire_pressure: 29
rvc2mqtt/012345678901234568/tpms-0fef4-i48/tire_temperature: 89.9
rvc2mqtt/012345678901234568/tpms-0fef4-i48/battery_level: N/A
rvc2mqtt/012345678901234568/tpms-0fef4-i48/signal_level: N/A
rvc2mqtt/012345678901234568/tpms-0fef4-i48/pressure_status: N/A
rvc2mqtt/012345678901234568/tpms-0fef4-i48/battery_status: N/A
IMPORTANT: you can only pair to INSTANCES that are in the RVC2MQTT floor plan file.
SENSOR UNPAIRING
To unpair a sensor, send the unpair command on the INSTANCE like this:
rvc2mqtt/012345678901234568/tpms-0fef4-i48/sensor_identification_number/unpair
SETPOINTS
TPMS setpoints are organized into 4 groups associated with each axle and are reported on tire position 15 (0xF) for each axle.
15 (0x0F) - setpoints for axle 0
31 (0x1F) - setpoints for axle 1
47 (0x2F) - setpoints for axle 2
63 (0x3F) - setpoints for axle 3
The following setpoints are supported on TPMS by RV-C protocol but may or may not be supported depending on the TPMS hardware. If unsupported they are reported as N/A and can’t be set. Note, setpoints may be rounded because of unit differences, and are always echoed when changed, sometimes with an adjusted value.
NOTE: Add /set to the end of the topic to change the setpoint.
low_tire_pressure
extremely_low_tire_pressure
high_tire_pressure
extremely_high_tire_pressure
high_tire_temperature
extremely_high_tire_pressure
low_battery_level
python3 setup_limits.py
REFRESH
To refresh all signals on all sensors:
rvc2mqtt/{vin}/refresh
Used by example programs when starting up to request RVC2MQTT server to resample and retransmit all readings over MQTT.
ALARM SIGNALS
There are two alarm signals, alarm_status and leak_rate that are only reported when they exist and have changed.
Topic hierarchy
rvc2mqtt uses the following topic hierarchy. Information about the bridge device (this device) is located here: rvc2mqtt/<client-id>
NOTE: For RV applications, <client-id> is typically the VIN number
More specifically: rvc2mqtt/<client-id>/state - this reports the connected state of our bridge to the mqtt broker (online or offline) rvc2mqtt/<client-id>/info - contains json defined metadata about this bridge and the rvc2mqtt software
Devices managed by rvc2mqtt are listed by their unique device id rvc2mqtt/<client-id>/<device-id>
MQTT AUTO-DISCOVERY
RVC2MQTT supports mqtt auto-discovery. NOTE: this came with RVC2MQTT for usage by Home Assistant. Usage by myserver is optional and probably not necessary..
This describes how rvc2mqtt integrates with mqtt auto-discovery.
follows path like: <discovery_prefix>/<component>/<unique_device_id>/<entity_id>/config
myserver is the discovery prefix
component is one of the home assistant component types
unique_device_id is the sensors unique id. This will be a concatination that includes the rvc2mqtt_client-id_object
entity_id is the entity id within the device
config payload is json that matches HA config (at least all required)
For this example:
VIN: 012345678901234568
Sensor Instances: i48, i17, i1, and i0
For example, the following is transmitted over MQTT when RVC2MQTT starts up (topic: payload)
myserver/sensor/rvc2mqtt_012345678901234568_tpms-0fef4-i48/config: {"name": "axle 3 tire 0", "state_topic": "rvc2mqtt/012345678901234568/tpms-0fef4-i48", "qos": 1, "retain": false, "state_class": "measurement", "value_template": "{{value}}", "unique_id": "rvc2mqtt_012345678901234568_tpms-0FEF4-i48", "device": {"manufacturer": "RV-C", "via_device": "rvc2mqtt_012345678901234568", "identifiers": "rvc2mqtt_012345678901234568_tpms-0FEF4-i48", "name": "axle 3 tire 0", "model": "RV-C TPMS"}, "availability_topic": "rvc2mqtt/012345678901234568/state"}
myserver/sensor/rvc2mqtt_012345678901234568_tpms-0fef4-i17/config: {"name": "axle 1 tire 1", "state_topic": "rvc2mqtt/012345678901234568/tpms-0fef4-i17", "qos": 1, "retain": false, "state_class": "measurement", "value_template": "{{value}}", "unique_id": "rvc2mqtt_012345678901234568_tpms-0FEF4-i17", "device": {"manufacturer": "RV-C", "via_device": "rvc2mqtt_012345678901234568", "identifiers": "rvc2mqtt_012345678901234568_tpms-0FEF4-i17", "name": "axle 1 tire 1", "model": "RV-C TPMS"}, "availability_topic": "rvc2mqtt/012345678901234568/state"}
myserver/sensor/rvc2mqtt_012345678901234568_tpms-0fef4-i1/config: {"name": "axle 0 tire 1", "state_topic": "rvc2mqtt/012345678901234568/tpms-0fef4-i1", "qos": 1, "retain": false, "state_class": "measurement", "value_template": "{{value}}", "unique_id": "rvc2mqtt_012345678901234568_tpms-0FEF4-i1", "device": {"manufacturer": "RV-C", "via_device": "rvc2mqtt_012345678901234568", "identifiers": "rvc2mqtt_012345678901234568_tpms-0FEF4-i1", "name": "axle 0 tire 1", "model": "RV-C TPMS"}, "availability_topic": "rvc2mqtt/012345678901234568/state"}
myserver/sensor/rvc2mqtt_012345678901234568_tpms-0fef4-i0/config: {"name": "axle 0 tire 0", "state_topic": "rvc2mqtt/012345678901234568/tpms-0fef4-i0", "qos": 1, "retain": false, "state_class": "measurement", "value_template": "{{value}}", "unique_id": "rvc2mqtt_012345678901234568_tpms-0FEF4-i0", "device": {"manufacturer": "RV-C", "via_device": "rvc2mqtt_012345678901234568", "identifiers": "rvc2mqtt_012345678901234568_tpms-0FEF4-i0", "name": "axle 0 tire 0", "model": "RV-C TPMS"}, "availability_topic": "rvc2mqtt/012345678901234568/state"}