New binding suggestion: Wavin AHC 9000 / Jablotron AC-116

I’m interested in supporting such a solution. I can’t do any programming but I can help out testing.

Sorry about the late reply. There have been so much else to do, and not much need for floor heating, so I have had this on the back-burner for now.

But for those who have replied that they would be interested in testing, you will need the hardware:
An USB-to-RS485 adapter.

The ones using an FTDI FT232 chip are probably easiest to get working, since this chip has logic to handle the transmit-enable on RS485. Once we have something basic working, we can try getting other USB-to-RS485 adapters integrated.

Personally I used an isolated version:

Then you do not need to worry about ground loops etc., but of course there is a substantial price difference compared to non-isolated versions:
https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR0.TRC0.H0.Xftdi+rs-485.TRS0&_nkw=ftdi+rs-485&_sacat=0

Apart from this, all that is needed is a CAT5 or similar network cable with an RJ45 plug. Just buy a cheap network cable and cut off one end.

Br,
Mikkel

Searching the web gives some interesting documents:

Wavin’s Modbus Specification
Modbus address

and Physical connection (sorry in Danish only)

Yeah, I have those.

I also have python code to interact with the controller (I can read out temperatures, adjust setpoints, and enter the special modes like holiday and party).

My plan for openhab is to start with just reading temperatures from the thermostats, and then changing the setpoints.

However, further down the road, I want to have some more intelligence in the openhab plugin, because if everything has to be written with rules, even a simple weekly schedule gets quite complicated.

Hi Mikkel,

Any chance you want to share your Phyton code? In case, I could ask some friends with Java knowledge, to support with a code migration to Java for later OpenHab binding implementation?

Code credit of course remain yours :slight_smile:

OK, I put up the python code on github:


Unfortunately it seems I cannot find my notes from looking into it, I will try to re-create it.

One thing, though, I remember off the top of my head is, that the “Elements” described in the Wavin modbus specification document are the thermostats, and you read the “assignment map” from each to find out which channels (telestats/heating circuits) are controlled by the thermostat.

Added a few examples of reading (and understanding) the data from the controller.

I would like to mention that I am very interested in the development of a Wavin AHC 9000. I’m not experienced with openHAB binding development, but I would very much like to be a tester and otherwise participate in the binding development.

My personal setup is two Wavin AHC 9000 controllers connected to each other, so maybe that setup may be of interest for the development / testing of the binding. - Currently the main controller has a touchscreen attached to it, from which I can control both controllers. From my understanding I would need to remove the touchscreen and connect a Modbus interface instead (i.e. a RaspberryPi?).

@jakobjp: I can confirm that you would need to disconnect the display, and have openhab be the modbus master instead. Great with a tester with a somewhat more special configuration.

I also have the touch display, and have sniffed a lot the communication between the display and AHC9000, in order to work out how to set various modes, etc. in the AHC9000 (if anybody is interested, see https://github.com/spiff42/wavin-python/blob/master/dispdump%20decoded.txt , some of it has my notes/comments)

Great with some progress here… good job.

Can you elaborate a bit on which RJ45 pinouts you are using ? - “+” to “+” and “-” to “-” i expect… But are you also using ground and 24V ? - Currently i have only wired ground along with +/-.

If I test using the enclosed read examples i get: “No communication with the instrument (no answer)” as response

if i wire “-” -> “+” and “+” -> “-” and using ground i get “Too short Modbus RTU response (minimum length 4 bytes). Response: ‘\x00’”

Would we great with a bit of input here :slight_smile: - thanks in advance

I use http://www.digitus.info/en/products/computer-accessories-and-components/computer-accessories/serial-and-parallel-adapter/da-70157/ to communicate with Wavin. I run another one directly to my Nilan CTS602 without any problem.

Yes, “-” to “-” and “+” to “+” (also known as A to A and B to B). And normally you need to connect GND as well. The only case where you should not do so is if the two devices already have a common ground connection, e.g. because they are using the same power supply, but that is not likely here, because wavin has its own 24V power supply.

The 24V is not used here, but is there to power e.g. the touch screen.

One possible cause of it not working is that you may need a termination resistor. My USB-to-RS485 adapter has one built in, that can be enabled or disabled, I have it enabled. I suspect the AHC9000 does not have one, because that would not work well when daisy-chaining multiple controllers. The correct way to terminate an RS485 bus is with a 120 ohm resistor across A and B at each end of the cable. However, with a short bus and low speeds it seems to work with just one termination resistor. Since the characteristic impedance of CAT5 cable is 100 ohm I guess a 100 ohm resistor would be equally fit in this case.

Roger that. Good input

Does the usb adapter you mention above have built in resistor?

If you disable the built-in resistor, will you get the same error as I do?

Will try and get some resistors 100 and 120 ohm

The adapter I have (and that I linked above) has built in termination resistor (120 ohms), which is enabled by connecting a wire between screw terminals 1 and 2. I haven’t tried without the termination resistor.

Just got some 120 and 100 ohm resistors… Tried with both between A and B on the dongle side. All with the same result as before. Just gets the respond:
IOError: No communication with the instrument (no answer)

Which Python are you using ? - Im using Python 2.7.9 on a Raspberry Pi.
What is your cable length ? im running 1,5m CAT 5E

Any other ideas ?

I’m using 2.7.13 on Debian Stretch x64. My cable length is also about 1.5-2 meters.

My only suggestion is that your USB-to-RS485 adapter is not working correctly, either not driving TX-enable at the right time, or not driving RX-enable at the right time. Even though you have one based on an FTDI-chip it could be wired in a way that requires you to drive TX enable or RX enable from the control lines.

Unfortunately the AHC9000 does not have an LED to indicate modbus activity. You don’t happen to have access to an oscilloscope or similar, to actually see if something is on the line?

The minimalmodbus documentation has some considerations regarding hardware:
https://minimalmodbus.readthedocs.io/en/master/serialcommunication.html

So status is:

  • tested with resistors in both ends, 100 and 120 ohm
  • made new cable from scratch and tested connections
  • tried to swap A and B
  • bought a display to check the firmware version (it worked fine)

so im pretty tired of it right now… I want it to work, so i guess i have to order a new USB dongle. Is the link above the exact dongle you use. I see several similar version on ebay, but at a much lower price. I just want to be sure its the same you have used with success.

Can you attach a photo of the wires going into the skrew terminals. To validate in future how its should be connected ?

Yes, I can confirm that this is the exact one I am using:

I hadn’t even noticed the cheaper ones that look much like it, but I think they use CH340 chipset instead of FTDI (don’t know if that works with TX enable), and they are surely not isolated. In the one I link above you can clearly see the FTDI chip (near the USB connector, with more pins than CH340), and the ADM2587 isolation driver along with the isolation on the circuit board.

I am pretty sure some of the other (cheaper) ones will also work, but of course I cannot say for sure without having tested it. Maybe someone else here (i.e. someone with an RS485 adapter and a Wavin AHC9000 controller) can try it out and pitch in?

I will see if I can take a picture and attach it, but until then, I can say that I have a short piece of wire connected between pins 1 and 2 (the ones labeled RT). This effectively enables the termination resistor.

Also, since you have bought the display, I can say that I have used the RS485 adapter to sniff the traffic between the display and AHC9000, which helps in understanding some of the features (as the documentation does not really explain how the various registers should be used together). It would be possible for the openhab binding to run in passive mode, where it just listens in on the display communication, and reports temperatures from the thermostats, etc.

In fact, let me add a small python program to the repo, which can be used to sniff the RS485 traffic. This is the one I used to create the “dispdump decoded.txt” file. I will put it up when I get home from work (if I remember), then you can try that and see if your RS485 can receive, but is just not sending (e.g. transmit enable problem).

Thank you for helping… I have ordered your recommended USB dongle, but unfortunately delivery takes a month like anything else from China :slight_smile:

Great if you cound upload the sniffer to GitHub. How is it connected, and how flows data ? Do you simply connect both display and modified RJ45 cable to AHC9000 at the same time… Then runs the sniffer on computer ? So dataflow would be like “Display” -> “RJ45 port 1 on AHC9000” -> “RJ45 port 2 on AHC9000” -> “RS485 adaptor” ?

I put serdump on github with a short instruction in the README.

Yes, I have connected the display on one port of AHC9000, and the RS485 dongle on the other.