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.
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.
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.