Reads HVAC data from a Ford FG Falcon's body control module over CAN bus and pushes it live into OpenAuto Pro using the official API client.
- Pushes the following values to OpenAuto Pro in real time:
- Outside temperature via
InjectTemperatureSensorValue - HVAC set temperature via an OBD gauge formula (
hvac_temp) - Fan speed via an OBD gauge formula (
fan_speed) - Vent mode — decoded from the vent status byte and sent as an OAP notification
- HVAC all-off state — sent as an OAP notification when the system is switched off
- Outside temperature via
- Python 3
- A Raspberry Pi with a CAN interface on
can0connected to MS-CAN - OpenAuto Pro running on the same host (API on port
44405) - Not required, but recommended - if you want to undertake your own headunit project - grab a CarPiHAT. It has all of the hardware requirements in HAT.
Edit /etc/modules and add the following lines:
uinput
can
can_dev
can_raw
vcan
Add the following to /boot/config.txt to enable the MCP2515 CAN controller:
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
If using a PiCAN board, set the oscillator to
16000000instead:dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
Add the following to /etc/network/interfaces to bring up can0 automatically on boot:
auto can0
iface can0 inet manual
pre-up /sbin/ip link set can0 type can bitrate 125000 triple-sampling on restart-ms 100
up /sbin/ifconfig can0 up txqueuelen 65535
down /sbin/ifconfig can0 down
To bring it up manually:
sudo ip link set can0 type can bitrate 125000 triple-sampling on restart-ms 100
sudo ifconfig can0 up txqueuelen 65535sudo apt update -y && sudo apt upgrade -y
sudo apt install -y can-utils libsocketcan2 libsocketcan-dev python-can python3-can
sudo apt install -y python3-uinput python3-evdev
pip3 install -r requirements.txt
sudo modprobe uinputpython3 fg_falcon_oap.pyThe script will:
- Open
can0 - Send a startup frame to wake the HVAC module
- Connect to the OpenAuto Pro API at
127.0.0.1:44405 - Begin listening for HVAC CAN frames and forwarding data to OAP
Two custom OBD gauge formulas must be configured in OpenAuto Pro to display the injected values:
| Formula name | Value |
|---|---|
hvac_temp |
HVAC set temperature (°C) |
fan_speed |
Fan speed (raw byte, 0–7) |
The formula names can be changed in fg_falcon_oap.py under the FORMULA_HVAC_TEMP and FORMULA_FAN_SPEED constants.
- OAP API code from BlueWave Studio
- FG Falcon CAN bus research: jakka351/FG-Falcon