🌿 C6 Enviro Installer
← Miroslav DIY
c6.miroslav.diy · BME680 + solar · sleepy Zigbee end device

Flash your C6 Enviro sensor

This installs the firmware for an ESP32-C6 Super Mini wired to a BME680 environment sensor and powered by a Waveshare Solar Power Manager + Li-ion cell. Every 3 seconds (configurable 3 s…1 h from Home Assistant) it wakes from deep sleep, measures temperature · humidity · pressure · gas resistance · battery voltage, reports everything to HA over Zigbee2MQTT, and goes back to sleep.

Flashing happens entirely in your browser over USB — nothing is uploaded anywhere and no credentials are baked in (the device pairs over Zigbee). Wiring: diagram below · live boot log: serial console.

Install firmware

Plug the ESP32-C6 Super Mini into a USB port with a data cable, then press Connect & Flash and pick the device's serial port when prompted.

Advanced options

The C6 uses native USB-Serial/JTAG, where baud is virtual — leave the speed at 115200 unless you are flashing through an external UART adapter. Routine updates preserve Zigbee zb_storage; enable erase-first only for explicit factory-new recovery.

If the port doesn't appear or connecting fails

The C6's native USB-Serial/JTAG auto-reset into the bootloader is sometimes flaky. Force download mode by hand:

  1. Unplug the board.
  2. Hold the BOOT button (GPIO9).
  3. Plug it back in while still holding BOOT.
  4. Release BOOT after about 2 seconds.
  5. Press Connect & Flash again at 115200 with erase-first off.

Note: once the enviro firmware is running, the device deep-sleeps between cycles and its USB port comes and goes — that is normal. To flash again, use the hold-BOOT procedure above (it keeps the chip awake in the bootloader).

Power settings — apply after pairing

Choose the desired cadence and gas-heater state, then copy the exact Zigbee2MQTT payload. This panel does not write configuration over USB: a routine flash never overwrites the device's NVS or Zigbee pairing.

The heater runs a short ~12 mA burst each cycle. Disable it when you only need temperature, humidity and pressure.


      
      

After the new converter is installed, paste this in the C6 Enviro Zigbee2MQTT device page or publish it to zigbee2mqtt/C6 Enviro/set.

After flashing — pairing (order matters for a sleepy device)

  1. Install the Z2M converter first: z2m/biometal_enviro.mjs + z2m/lib/ into external_converters/, enable advanced.enable_external_js: true, restart Z2M.
  2. Open Zigbee2MQTT → Permit join.
  3. Power (or reset) the board. It joins and — important — stays awake 5 minutes so the interview can finish. Don't cut power during this window.
  4. It appears as EndDevice C6-ENVIRO by Biometal with temperature, humidity, pressure, gas, battery and diagnostic entities.

Wake a sleeping device: press BOOT briefly (it stays awake 5 more minutes). Re-pair on a new network: hold BOOT ≥3 s → Zigbee factory reset. Use the power-settings payload above to set report_interval_s and gas_enabled; both survive reboot and power loss.

Wiring diagram

The battery feeds the Super Mini's 5V pin (its LDO happily runs from 3.0–4.2 V), the Solar Power Manager only charges the cell, and a 2×200 kΩ divider lets GPIO2 watch the battery voltage. BME680 breakout sits on I²C (any GY-BME680 / CJMCU-680, address 0x76 or 0x77 — auto-detected).

C6 Enviro — wiringFritzing-style wiring: solar panel and 18650 cell on a Waveshare Solar Power Manager, the cell feeding an ESP32-C6 Super Mini (5V pin) with a 2 x 200 kOhm divider to GPIO2, and a BME680 on I2C (GPIO22 SDA, GPIO23 SCL, 3V3).J-box+−SOLAR IN 6~24VUSB IN5V 1ABOOT5VGND3V3outputs unused+−Battery 3.7V−+14500 holder — leave empty(PH2.0 cell or holder, never both)100R7CN3791100µ100µSolar ChargeSolar DoneONOFFBattery SwitchUSB-CBOOTRSTC6TXRX012345675VGND3V32019181514982322211213104VCCGNDSCLSDASDOCSBME680186503.7 V Li-ion · 1S · ≥ 2000 mAh−+−+PV1 · solar panel6–24 V (drawn small; any size)U1 · Waveshare Solar Power ManagerMPPT charger (plain board; the (D) works the same — tap its battery terminals)charges the cell only; its 5V / 3V3 outputs stay unusedU2 · ESP32-C6 Super Mini18 × 25.6 mm, USB-C up01234567801234Divider boardperfboard 9 × 5 holes ≈ 23 × 13 mmR1 200kR2 200kC1 100nU3 · BME680 breakoutGY-BME680 / CJMCU-680 · I²C 0x76 / 0x77BT1 · 18650 cell in a holderprotected cell (own PCM) recommendedplugs into the manager's PH2.0 «Battery 3.7V»Before you power it1. The cell feeds the C6 «5V» pin; never wire it to the 3V3 pin.2. Manager: Battery Switch ON, MPPT SET (back) at your panel voltage.3. One cell only: the PH2.0 cell or the 14500 holder, never both.4. The C6 taps the cell directly: use a protected cell (own PCM).5. R1 = R2 = 200 kΩ, C1 = 100 nF: GPIO2 sees half the cell voltage.6. GPIO22 / GPIO23 are inner pads by the antenna: solder wires there.7. BME680: leave SDO and CS as the breakout straps them (I²C).8. Flashing over USB: safest with the cell unplugged (5V rail).9. Pin order follows common boards — check your silkscreen.Wire colourssolar panel + → SOLAR IN +solar panel − / GND (common minus)VBAT — cell + → C6 «5V» pin and R1VBAT_SENSE — divider midpoint → GPIO23V3 — C6 3V3 → BME680 VCCI²C SDA — GPIO22 → BME680 SDAI²C SCL — GPIO23 → BME680 SCLsolder bridge between neighbouring padsthin insulated wire under the boardsolder joint · grey sleeve = branch

Wire checklist

#NetFromTo
1SOLAR_P
panel + into the manager
PV1 solar panel — red lead (+)U1 Solar Power Manager — SOLAR IN «+» (screw)
2SOLAR_N
panel − into the manager
PV1 solar panel — black lead (−)U1 Solar Power Manager — SOLAR IN «−» (screw)
3VBAT
cell + (3.0–4.2 V)
U1 Solar Power Manager — PH2.0 «+»branch on the red cell lead by the PH2.0 plug
4VBAT
cell + (3.0–4.2 V)
branch on the red cell lead by the PH2.0 plugBT1 18650 — red lead (+ tab)
5VBAT
cell + (3.0–4.2 V)
branch on the red cell lead by the PH2.0 plugdivider board VBAT (col 1, row 4)
6VBAT
cell + (3.0–4.2 V)
divider board VBAT (col 1, row 0)U2 ESP32-C6 — 5V
7GND
common minus
U1 Solar Power Manager — PH2.0 «−»branch on the black cell lead by the PH2.0 plug
8GND
common minus
branch on the black cell lead by the PH2.0 plugBT1 18650 — black lead (− tab)
9GND
common minus
branch on the black cell lead by the PH2.0 plugdivider board GND (col 2, row 4)
10GND
common minus
divider board GND (col 0, row 0)branch next to the C6
11GND
common minus
branch next to the C6U2 ESP32-C6 — GND
12GND
common minus
branch next to the C6U3 BME680 — GND
13VBAT_SENSE
cell voltage ÷ 2 into ADC1_CH2
divider board VBAT_SENSE (col 8, row 4)U2 ESP32-C6 — 2 (GPIO2)
143V3
sensor supply from the C6 LDO
U2 ESP32-C6 — 3V3U3 BME680 — VCC
15SDA
I²C data
U2 ESP32-C6 — pad 22 (inner, GPIO22)U3 BME680 — SDA
16SCL
I²C clock
U2 ESP32-C6 — pad 23 (inner, GPIO23)U3 BME680 — SCL

On the divider board, neighbouring pads of one net are joined with a solder bridge (columns 0–8 left to right, rows 0–4 top to bottom; column 0 is GND, column 1 is VBAT); the one dashed GND link is a thin insulated wire under the board.

Details, part numbers and the power-budget math: docs/WIRING.md. Battery-life note: at the default 3 s cycle the radio duty cycle dominates — fine on solar, ~2–3 days on a bare 2000 mAh cell. Set report_interval_s ≥ 60 for weeks-long battery-only operation.

Documentation