Alpine Boiler with ESPHome Modbus Sucess

Thanks for taking the time out to respond and thanks for the pic. I’ve double checked that pins 6-8 are lined up correctly with a continuity tester from the stripped ends of the cable through to the terminal block connecting to the sage controller. I’ve also tried every combination of swapping tx and rx and with and without the 120 ohm resistor between tx and rx. All I see is the either the tx or rx led flash( depending on how I have the tx and rx connected). Nothing on the other led indicating return data from the sage controller.

I’ve also double checked a half dozen times that the slave address is set to 1.

I’m at a loss. I’ll probably take a look at this with a clear head in a day or two.

So, back to basics. When something doesn’t work, eliminate every component. This time I tried a d1 mini in lieu of a d1 mini pro with a new rs485 adapter. No good. So I thought. What else can I swap out? The power supply! I tried l a new power supply and now for the first time, I see both RX and TX LEDs flash. That’s the good news. However, the connection is still failing with the same error. I’ve tried with and without a 120 ohm resistor between TX and RX.

I’m using a 120 ohm 1/2 watt metal film resistor. I tested with a meter and it’s spot on at 120 ohms. Do you see any reason why this resistor would not be up to the task? And am I just litterally connecting it between RX and TX near the A and B terminals on the rs485 adapter?

I posted my troubles to the Home Assistant facebook group. Someone suggested using an ESP32. I had one laying around, so I tried that and now I’m successful.

Their comment was… “Personally I would not disable the logging serial port to use it with other devices like your modbus. It seams the serial communication is not ok. Do you have an esp32 to test with this project as it has 2 real serial ports.”

So, now, I need to work on expanding the register readings. I am particularly interested in alerting myself when the boiler has error codes displayed.

Glad you got it. I have a esp32 sitting right next to mine, only acting as a BT proxy. Perhaps I’ll move over to that to consolidate.

Please post the pins layout and config file you use, so others people can see. Also post any more registers you find.

Sure. Will post the pinouts tomorrow.

In the meantime, I added the following registers that I found by reading the sage2 document that you posted above. Note that I don’t really know what unit of measurement to use, so I just used “code”. It doesn’t display nicely, but I found that if I didn’t have a unit of measurement, those sensors didn’t show as available triggers for automations.

If I have time, I’d like to play around with the python code by jdleslie that you linked to above. There is an option to probe all registers. I’m curious what I get back there and what may be useful info. Can then add what I like to this project.

  • platform: modbus_controller
    modbus_controller_id: vlb
    name: “burner_control_state”
    id: burner_control_state
    register_type: holding
    address: 33
    value_type: U_WORD
    unit_of_measurement: “code”
  • platform: modbus_controller
    modbus_controller_id: vlb
    name: “lockout_code”
    id: lockout_code
    register_type: holding
    address: 34
    value_type: U_WORD
    unit_of_measurement: “code”
  • platform: modbus_controller
    modbus_controller_id: vlb
    name: “hold_code”
    id: hold_code
    register_type: holding
    address: 35
    value_type: U_WORD
    unit_of_measurement: “code”

I used an Adafruit Devboard. This one: Pinouts | Adafruit ESP32 Feather V2 | Adafruit Learning System

Here is my pinout. I did connect a 120 ohm resistor across A and B.

ESP32 <-> RS485 Module

  • RX-RX (Pin 22)
  • TX-TX (Pin 19)
  • 3V-3V ( The RS485 Module states that it works with either 3.3 or 5v. This Adafruit board doesn’t have a 5V Pin)
  • Ground-Ground

RS485 <-> Boiler

  • A-A (RJ45 Pin 8)
  • B-B (RJ 45 Pin 7)
  • G -G (RJ45 Pin 6)

I ordered one of these d1 mini shields: RS-485 Shield for WeMos D1 Mini – TaaraLabs

I struggled a joy getting it to work, but I’m not getting g readings from the boiler. It makes for a really nice compact solution. If anyone wants details, I’m happy to provide. The pins weren’t perfectly aligned (pin wise) with a standard Ethernet cable, but otherwise it is pretty straight forward.

1 Like

Here are two RJ45 sockets that fit. Info has also been added to the product page.
https://www.molex.com/en-us/products/part-detail/955012881
https://www.te.com/en/product-215877-1.html