ESP32-C6 with OH

Hi there,
is there anyone who has seccessfull connected a ESP32-C6 to OH anc can use it as a switch (for example) ?
Or has some Links/HowTos ?

Exactly de model C6? Or any Esp32? Because I have some of them using ESPHOME and connecting through MQTT.

Ruben

C6, becouse it has hardware zigbee support.

okey, mqtt may be a workarround, thanks for the tip.
but i would realy prefer zigbee. now when esp32 provides it

I have one working as a toggle switch. But it is very EARLY.

oh cool. congratulations ! :slight_smile:
which example did you used and what did you changed ?

i use the ha-light example. OH sees the ESP, but at this moment, ESP-Log says: network steering error (something like this).
can add the ESP to Things-List in OH, but with error: could not be discovered

The network steering error means its not connecting to the network.
I used the esp_HA_customized_switch. And changed esp_HA_customized_switch.c per
ESP32-C6 Unable to join zigbee network (IDFGH-9286) · Issue #10662 · espressif/esp-idf · GitHub adding modelid[] and manufname[]

This let zigbee2mqtt see it. And add this as a custom converter to zigbee2mqtt



const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['ESP32C6.Light'],
    model: 'ESP32C6.Light',  // works leftover from trying light exampes
    vendor: 'Espressif',
    description: 'light_bulb',
    fromZigbee: [fz.on_off],
    toZigbee: [tz.on_off],
    exposes: [e.switch()],
    // The configure method below is needed to make the device reports on/off state changes
    // when the device is controlled manually through the button on it.
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
        await reporting.onOff(endpoint);
    },
};
module.exports = definition;

It’s a start. when the arudino support is released the c6 and H2 are going to be very cool. Cheap DIY zigbee stuff.

okey, thanks. for the code.
but do i understand right? its only for “mqtt”, not a native zigbee3 handled by OH ?

Yes I use zigbee2mqtt. I am on OH 1.8 so I do not use the OH zigbee.

Hi, can you tell us how you compiled this code for the C6 ? What board definition did you use ? Arduino IDE ? Thanks !!!

I used VS code with the ESP-IDE plugin. And used these edits-

Also see this one-

I’m running a lot of ESP32 or ESP 8266 with attached sensors and I can recommend the Tasmota firmware. It supports almost all sensors out of the box and has a built in feature to distribute sensor values via mqtt.

1 Like

I also use a lot of diy ESP’s. The new C6 is zigbee so all the advantages of zigbee and zigbee2mqtt.

I have a lot of ESP (several types ESP8266 and ESP32 depending on requirements). I wrote a little library to provide for json webservices, logging, file usage, command processing, html pages, updating, etc.

Connection to openHAB is either by http binding to one of the services or the device pushes values by using the openHAB API to change items. The API is already present, does the job and easier than setting up MQTT.

If you’re not familiar with programming than tasmota or esphome is easier.

Funny I’ve been looking at this device too. But so far couldn’t find a good usecase for it.

The C6 now has Arduino support. I have 2 zigbee running now 1 on the garage door now running for 4 days with no crashes and 1 with get this a lux senser using a Adafruit driver. So this one both sends and receives commands.