Skip to content

Macchina A0

Works, with caveatsA car OBD-II dongle. Only worth it if you already own one.
ChipESP32
Form factorOBD-II dongle, powered from the car's 12 V
FlashNot documented
AntennaPCB antenna
InstallBrowser installer, esp32 flavor (v5 and later)
Price~$89
Storesmacchina
GPIOFunctionESPresense setting
2RGB status LED (addressable)LEDs
21CAN transceiver standby (held high)Outputs
3512 V supply voltage (divider)Battery voltage pin

Paste this into the Board Template box on the node's Templates page, then Preview and Apply (firmware v5.0.0b1 or later). It sets the board's pins (and Ethernet type, if it has one) in one go. The LED, input and output lists replace what was configured before, so the result doesn't depend on the node's old setup. See Templates.

{"name":"Macchina A0","chip":"esp32","settings":{"leds":[{"type":"grb","pin":2,"count":1,"control":"status"}],"inputs":[],"outputs":[{"name":"CAN standby","pin":21,"type":"high"}],"batt_pin":35,"batt_type":1,"batt_mult":5.8}}
Formatted, with what each value means
{
  "name": "Macchina A0",
  "chip": "esp32",
  "settings": {
    "leds": [
      {
        "type": "grb",
        "pin": 2,
        "count": 1,
        "control": "status"
      }
    ],
    "inputs": [],
    "outputs": [
      {
        "name": "CAN standby",
        "pin": 21,
        "type": "high"
      }
    ],
    "batt_pin": 35,
    "batt_type": 1,
    "batt_mult": 5.8
  }
}

LED type: pwm, pwm_inverted, grb, grbw, rgb or rgbw (the last four are addressable). LED control: mqtt, status, motion, count, or output (follows the output numbered byoutput). Input type: pullup, pulldown or floating, with_inverted for active-low. Output type: output, output_inverted, or high/low for a pin that's just held at that level. An output's input is the 1-based input that controls it. power takes ESPHome's hlw8012 values (a cse7766 needs only rx); sel_inverted matches ESPHome's inverted on sel_pin. eth is the Ethernet Type's option number.

  • Battery multiplier is an estimate. The old flavor converted the raw ADC reading with a fixed formula. 5.8 is that formula translated to the generic code’s calibrated millivolts, not a measured value. Compare the node’s Battery Voltage with a multimeter on the OBD-II port’s 12 V and scale batt_mult by (multimeter ÷ reported). It accepts 1–20.
  • Battery type 1 is 12 V lead-acid. It uses the A0 flavor’s old charge curve and adds a Charging binary sensor, on above 13.2 V (engine running).
  • CAN standby: GPIO 21 held high keeps the CAN transceiver in standby, as the old flavor did at boot. It’s an Always High output, so it gets no MQTT or Home Assistant entity.
  • I2C is off by default. Don’t put it on GPIO 21: that’s the CAN standby pin.
  • The LED is brighter than before. The old flavor capped LED brightness at 20 %, and templates can’t set that.
  • On many cars the OBD-II port stays powered with the ignition off, so a node left plugged in slowly drains the car battery.
  • ESPresense firmware v4: main/Battery.cpp, main/CAN.cpp and the MACCHINA_A0 block in main/defaults.h
  • ESPresense#2530 (v5 hardware settings, removes the flavor)
  • Macchina A0 docs