diff --git a/config.yaml b/config.yaml index fd4697f..f5cb328 100644 --- a/config.yaml +++ b/config.yaml @@ -95,3 +95,87 @@ devices: accuracy_decimals: 0 icon: mdi:engine-off update_interval: 300s + # ── DPF / exhaust aftertreatment (SAE J1979 diesel PIDs) ── + # Byte a is the PID's "supported" bitmask, so values start at byte b. + # If these answer NO DATA, the ECU exposes DPF data only through PSA-specific mode 22 DIDs. + - key: dpf_inlet_temp + mode: "01" + pid: "7C" + formula: "(b*256+c)/10-40" + unit: "°C" + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + icon: mdi:thermometer-chevron-up + update_interval: 10s + - key: dpf_outlet_temp + mode: "01" + pid: "7C" + formula: "(d*256+e)/10-40" + unit: "°C" + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + icon: mdi:thermometer-chevron-down + update_interval: 10s + # Signed 16-bit: rising differential pressure means soot is building up. + - key: dpf_differential_pressure + mode: "01" + pid: "7A" + formula: "(b*256+c-floor(b/128)*65536)/100" + unit: "kPa" + device_class: pressure + state_class: measurement + accuracy_decimals: 2 + update_interval: 10s + # 100 % means the ECU wants a regeneration. + - key: dpf_regen_trigger + mode: "01" + pid: "8B" + formula: "c*100/255" + unit: "%" + state_class: measurement + accuracy_decimals: 0 + icon: mdi:air-filter + update_interval: 30s + - key: dpf_regen_required + platform: binary_sensor + mode: "01" + pid: "8B" + formula: "floor(c/255)" + icon: mdi:air-filter + update_interval: 30s + - key: dpf_regen_active + platform: binary_sensor + mode: "01" + pid: "8B" + formula: "b%2" + icon: mdi:fire + update_interval: 10s + - key: dpf_avg_distance_between_regens + mode: "01" + pid: "8B" + formula: "f*256+g" + unit: "km" + device_class: distance + state_class: measurement + accuracy_decimals: 0 + update_interval: 300s + - key: egt_bank1_sensor1 + mode: "01" + pid: "78" + formula: "(b*256+c)/10-40" + unit: "°C" + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + update_interval: 10s + - key: egt_bank1_sensor2 + mode: "01" + pid: "78" + formula: "(d*256+e)/10-40" + unit: "°C" + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + update_interval: 10s diff --git a/templates.yaml b/templates.yaml index 45008e1..156294c 100644 --- a/templates.yaml +++ b/templates.yaml @@ -4,7 +4,7 @@ templates: - id: toyota_proace_city name: Toyota Proace City (Vgate iCar Pro BLE) - description: Standard OBD-II PIDs for the PSA-based Proace City — bind the adapter in the app + description: Standard OBD-II and DPF PIDs for the PSA-based Proace City — bind the adapter in the app device: id: proace_city_obd name: Toyota Proace City @@ -96,3 +96,82 @@ templates: accuracy_decimals: 0 icon: mdi:engine-off update_interval: 300s + - key: dpf_inlet_temp + mode: '01' + pid: 7C + formula: (b*256+c)/10-40 + unit: °C + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + icon: mdi:thermometer-chevron-up + update_interval: 10s + - key: dpf_outlet_temp + mode: '01' + pid: 7C + formula: (d*256+e)/10-40 + unit: °C + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + icon: mdi:thermometer-chevron-down + update_interval: 10s + - key: dpf_differential_pressure + mode: '01' + pid: 7A + formula: (b*256+c-floor(b/128)*65536)/100 + unit: kPa + device_class: pressure + state_class: measurement + accuracy_decimals: 2 + update_interval: 10s + - key: dpf_regen_trigger + mode: '01' + pid: 8B + formula: c*100/255 + unit: '%' + state_class: measurement + accuracy_decimals: 0 + icon: mdi:air-filter + update_interval: 30s + - key: dpf_regen_required + platform: binary_sensor + mode: '01' + pid: 8B + formula: floor(c/255) + icon: mdi:air-filter + update_interval: 30s + - key: dpf_regen_active + platform: binary_sensor + mode: '01' + pid: 8B + formula: b%2 + icon: mdi:fire + update_interval: 10s + - key: dpf_avg_distance_between_regens + mode: '01' + pid: 8B + formula: f*256+g + unit: km + device_class: distance + state_class: measurement + accuracy_decimals: 0 + update_interval: 300s + - key: egt_bank1_sensor1 + mode: '01' + pid: '78' + formula: (b*256+c)/10-40 + unit: °C + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + update_interval: 10s + - key: egt_bank1_sensor2 + mode: '01' + pid: '78' + formula: (d*256+e)/10-40 + unit: °C + device_class: temperature + state_class: measurement + accuracy_decimals: 0 + update_interval: 10s