john30 / ebusd-esp32

Firmware for ESP32-C3 allowing eBUS communication for ebusd (https://github.com/john30/ebusd)
https://adapter.ebusd.eu/v5
24 stars 1 forks source link

Firmware on generic ESP32-C3 with eBUS Adapter 2 #49

Closed LeZerb closed 4 months ago

LeZerb commented 7 months ago

Currently I have an eBUS Adapter 2 connected to a Pi Zero.

Would it be possible to use the eBUS Adapter Shield v5 firmware on a generic ESP32-C3 (e.g. ESP32-C3 SuperMini from eBay) when connecting I/O 7 and 10 to an eBus Adapter 2?

I already have an adapter shield v5 on a seperate setup which seems to behave better than the PI+Adapter2 setup.

LeZerb commented 7 months ago

I started to look into it.

When I only connect Rx I see some raw messages coming in but I am not sure if these are correct. When I connect Tx of the ESP32 C3 board the Tx LED on Adapter 2 is always on. The Tx input on adapter 2 seems to be low active. And from what I can see the ESP32 firmware does not toggle I/O 10 (ebus Tx) at all it always stays low.

I would expect to see some activity on I/O 10. Maybe someone can point me in the right direction?

LeZerb commented 7 months ago

One additional note.

During initialization I am getting this information.

device status: extra info: firmware 1.1[3c17].1[3c17], jumpers 0x0f

Could this issue be related to the jumper states? Maybe one of those means something like a "monitor mode". Is there information available what these bits mean exactly?

LeZerb commented 7 months ago

I have been able to get it to work by inverting the signals between the ESP32C3 board and the Ebus Adapter v2. At least I am now getting "eBUS signal: acquired".

During initialization I am getting the information "setup_uart: eBUS UART 1 on TX=10(inv) RX=7(inv) with 2400 Bd" Is it possible to initialize the UART with IO7 and IO10 not inverted? I have tried setting pin.7.func and pin.10.func to "i" (I thought this might mean inverted) which did not change the behaviour.

If that is not possible yet would it be possible to add a way to invert the UART behaviour maybe by setting a specific NVS value or with a "hidden" switch to the ebus easi command?

LeZerb commented 7 months ago

I have found a solution. For a more detailed description you can have a look at the discussion in the eBus repo (in german)

LeZerb commented 7 months ago

It would however still be nice to have the possibility to configure the Rx and Tx pins in a more user friendly way.

john30 commented 4 months ago

I've added a release targeting the Wemos C3: https://adapter.ebusd.eu/v5/wemos.en this can be used for the purpose as well