Drexel & Weiss Device Integration

Hi Matthias

Here the self made version. I would not recommend to go this way unless you are experienced in electronics. There is a potential risk to damage your DuW HW.

  1. I bought a standard RS232 to TTL Serial Port Converter Module (eg. https://a.aliexpress.com/_mKmdcg1).
  2. Made a ribbon cable with the plugs. The side connection to DuW has a very special plug “MICA 06 Female 6pin”. As far as I know this is not produced anymore.
  3. Connected everything according the following schema (Pins)

Good luck
Thomas

PS: I recommend to buy the official DuW RS232 Adapter. It should be available from DuW or your local distributor.

Thanks a lot! Well I can’t find it (the d&w adapter) in the online shop. You don’t happen to have a link or part number?

The RS232 Adapter is mentioned here on page 2: 2019_loxone-flyer.pdf (drexel-weiss.at)
I could not find it in an online shop either. I guess best is to contact DuW directly.

Just got a reply from my d&w distributor: 140€… I think I‘ll solder :sweat_smile:

Last question: the ttl of the d&w is modbus as far as I understand? Why go ttl - rs232 - usr-640w and not through a usb modbus adapter on a pi running Openhab?

This might be also a solution. But I am not 100% sure this would work with the modbus binding as it only supports `Modbus serial slave’ and not ‘master’ on the serial interface. With TCP Master is possible.

Furthermore your Raspberry Pi would need to be close to the DuW (USB max cable length ca10m). With LAN your flexibel, you can even go wireless. And most of all it would not solve the problem with this ugly MICA plug.

There would be an approach with solves all HW problems. The DuW device has an USB Interface with a proprietary “Service Protocol”. You would though need to write your own add-on binding to connect with openhab.

Thanks! Sorry to disagree, but AFAIK the openhab modbus binding may act as master in RTU mode as well - see Modbus - Bindings | openHAB

Will try to get the components and return with an update. Might obviously take a while, but I‘ll be back :wink:
Thanks for your support!

I’ve been trying to connect my D&W device to the original Modbus adapter on Openhab for a long time. Unfortunately, it doesn’t really work for me. I’ve tried several USB-RS232 adapters. Openhab shows me the bridge, poller and data “online”, but no data is displayed. What can I do wrong there?

I have never tried with an USB<->RS232 Converter. I am using a Wifi/LAN<->RS232 converter. Anyone there who made it work with USB?

A potential problem could be the RS232 connection. To connect some devices with RS232 is quite nasty, sometimes you need a null modem cable, sometimes a straight trough cable. That is a potential for connection problems.
You can test the connection and localize the error with a loop back. Loop the RS232 Pin 2-3 (with a wire) and try to send some data. If you get it back, then you know the connection is fine.

I now use an RS232 shield on the GPIOs, Openhab3 on a Raspberry Pi 4. D&W also provided the D&W Modbus adapter for exchange on a trial basis. The 3-pole cable is shielded and 3m long. On the oscilloscope, I can see on the TXD when I send via ModPoll on the Raspberry. I do not get an answer from Drexel & Weiss.
If I try to send with the same setting with the Modbus binding, no signal is sent to the TXD.
The authorizations are actually set too.
I also tried several USB-RS232 adapters.
I’m slowly getting stuck.
Maybe someone can help me.

I have never tried to send RS232 directly from the Raspberry PI. As mentioned in the article, I used the LAN/RS232 converter, is a rather small investment. However if you really want to send RS232 directly with the raspberry this might help: The D&W device should answer, if you send valid data. On page 10 you find a valid example: Drexel und Weiss Modbus RTU. Unfortunately the CRC you need to calculate. Modbus address, mode and baudrate needs to beforehand set in the D&W device to correspond with your RS232 settings. If you even have an oscilloscope you can check if you receive the signal on the D&W TTL interface.

With the ModPoll program on the Raspberry, I am able to send data with the Serial Hat. With Openhab, however, I am not able to send anything over the same interface. Of course I have set the connection settings Parity, Stopbit, and so on. I have not yet calculated the CRC. I assumed that the Modbus binding would do that for me …

Show us the settings that worked there.

Show us the settings you used there.

Show us your openhab.log for the failure.

[ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 2/100 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@112170a[portName=/dev/serial0,port=]. Endpoint ModbusSerialSlaveEndpoint@c9baee[portName=/dev/serial0]

What does it do for try number 1? I’m trying to find out if it never connects, or fails to re-connect.

Number 1 was the same…

Directly after reboot:
2021-03-02 22:31:33.898 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘modbus:serial:3c6b556ac8’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

That’s not the same, and it’s not connect try 1/100.

I’m inclined to think the second message tells you the truth -you’ve got permissions issues on the serial port (which will result in Things not initializing).

2021-03-02 15:50:12.539 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/100 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@1b774b5[portName=/dev/serial0,port=]. Endpoint ModbusSerialSlaveEndpoint@34f97e[portName=/dev/serial0]

I had already thought of an authorization error

That’s good, what did you do about it? I wonder why you didn’t say before.

The serial binding docs used to have a usefule section on permissions, but gone now.
Old notes, still valid -
https://docs.openhab.org/v2.2/addons/bindings/serial1/readme.html#port-configuration-notes