Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FG Falcon HVAC → OpenAuto Pro Bridge

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.

What it does

  • 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

Requirements

  • Python 3
  • A Raspberry Pi with a CAN interface on can0 connected 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.

Installation, Dependencies & Config

1. Kernel modules

Edit /etc/modules and add the following lines:

uinput
can
can_dev
can_raw
vcan

2. CAN hardware overlay

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 16000000 instead:

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25

3. Persistent CAN interface

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 65535

4. Install dependencies

sudo 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 uinput

Usage

python3 fg_falcon_oap.py

The script will:

  1. Open can0
  2. Send a startup frame to wake the HVAC module
  3. Connect to the OpenAuto Pro API at 127.0.0.1:44405
  4. Begin listening for HVAC CAN frames and forwarding data to OAP

OBD gauge formulas

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.

Credits

About

Integration for a Ford Falcon to work with OAP

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages