Mebey Generator Controller integration

I have mebey generator controller and i have modbus registers but i dont know how to create configuration file for esp32 to work with home assistant















Are you looking for help on something specific?
You probably want to use ESPHome, do you realize that?

Fixed your SHOUTING. Please, not again.

im sorry if it seams like im shouting
i need some help understanding how to read the modbus registers

Try with this. Change the slave address to your actual, if you know it/can set it.

uart:
  id: uart_bus
  rx_pin: GPIO17
  tx_pin: GPIO16
  baud_rate: 19200
 

modbus:
  id: modbus1
  uart_id: uart_bus
  

modbus_controller:
  - id: test_modbus
    address: 0x01   ## address of the Modbus slave device on the bus
    modbus_id: modbus1
    update_interval: 5s

sensor:

  - platform: modbus_controller
    modbus_controller_id: test_modbus
    name: “voltage”
    register_type: holding
    address: 0x100A ## address of the register inside the Modbus slave device
    value_type: U_WORD

Karosm, thank you for your help i will try and get back to you

i have tried your config but its not working

It is working if your wiring and slave address are correct. Try with slave 0x10 if 0x01 didn’t work.
What’s your output on logger?

[00:35:53][D][modbus_controller:040]: Modbus command to device=16 register=0x100A countdown=0 no response received - removed from send queue

Hello @yellow_dre ,
first thing i see wrong with the ESP code above is the slave address is 0x01 when it should be 0x10 (the default address is 16 in decimal, 10 in HEX).
also, how do you have the ESP32 connected to the Mebay controller? the Mebay controller is RS485 and the ESP32 is TTL Serial, and needs a RS485 transceiver to communicate. and depending on wire lengths, probably some 120Ohm terminating resistors at each end if the transceiver and the Mebay don’t have them.
I have a Mebay DC62D controller, though no generator built yet to work with it (working on that). i will be using a USB to RS485 converter first to check TX/RX, but will be setting up with a network RS485 converter when i get it confirmed.
Also, i want to thank you for providing the Modbus register manual as i was unable to acquire one.
i will let you know if i make any headway. (bookmarking this thread)

Interesting discovery on my DC62D… the internal RS485 transceiver is missing, so i need a different controller to get Modbus. currently saving up for the upgrade…

1 Like

Thanks for posting this. I’ve been trying for 6 hours to get ESPHome to talk to a Mebay controller (I’m quite familiar with modbus so was surprised I was having so many issues).

After seeing your post, I opened my DC72D to find the RS485 block missing it it too.

I am SO ANGRY. I’m never buying anything with Mebay on it again. I’ve wasted so much time because they wanted to save 30c on some component.

Looks like the CAN interface runs through the same missing block, so that probably doesn’t work either. Like, why did they bother populating the terminal block for CAN and RS485 then? They could’ve saved another 50c on that!

1 Like