[SOLVED] Westaflex Binding

YES MATE!
TX is twinkling again!
But immediately in the log appears that:

2019-02-02 17:13:47.511 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 01 01 00 00 00 0f 7c 0e

2019-02-02 17:13:47.516 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)

2019-02-02 17:13:47.547 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadCoilsRequest@1846485 (unit id 1 & transaction 1). Serial parameters: SerialParameters@c8155f[portName=/dev/ttyS0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]

2019-02-02 17:13:47.553 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadCoilsRequest@1846485 (unit id 1 & transaction 1). Serial parameters: SerialParameters@c8155f[portName=/dev/ttyS0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]

2019-02-02 17:13:47.562 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@148e63a[slaveId=1,functionCode=READ_COILS,start=0,length=15,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 6d5d93bc-45be-44ac-9976-7655c5b6197c]

2019-02-02 17:13:49.200 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 01 01 00 00 00 0f 7c 0e

2019-02-02 17:13:49.203 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)

2019-02-02 17:13:49.208 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadCoilsRequest@4455ce (unit id 1 & transaction 2). Serial parameters: SerialParameters@c8155f[portName=/dev/ttyS0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]

2019-02-02 17:13:49.211 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadCoilsRequest@4455ce (unit id 1 & transaction 2). Serial parameters: SerialParameters@c8155f[portName=/dev/ttyS0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]

2019-02-02 17:13:49.216 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@148e63a[slaveId=1,functionCode=READ_COILS,start=0,length=15,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 6d5d93bc-45be-44ac-9976-7655c5b6197c]

My Poll thing looks like that:
But RS485 wires are not yet reconnected

Hi there,
Good news everyone :stuck_out_tongue_winking_eye:
Now TX and RX are twinkling!!
And no error messages in the log.
Seems to be the baudrate that was wrong. Before I used always 4800 (that used the external keypad) but in the manual is 19200 written.
But anyhow, I’d not fully understand how I poll a temperature from my Westaflex.
Would you kindly explain me that ?
br Peter

Okay.
The table 7.5 in that manual, suggests that there a number of interesting input registers. They seem to be in two address blocks, 0-3 and 12-16.
I’d set that up as two poller things to fetch all of them.

But let’s go one step at a time.
Set up a new poller thing belonging to your existing serial thing.
You want it to fetch input type registers, starting at address 0, and get 4 of them (length).
Because temperatures don’t change very quickly, you don’t need to poll very often. You could set the time (refresh) to 5000 mS for testing, and make it minutes later on if you like.

If that seems to work, you can set up four data things for the temperatures.
Might as well use the register names given in the manual -
Tlimit , Texhaust, Textract , Toutdoor
for read start addresses 0 , 1 . 2 , 3 each are length 1
So far as I can see these are of int16 (signed) type.
There’s no writing to these registers.

Now you link those channels to Number Items. As the registers come, it looks like they are x10. That is to say, 225 represents 22.5.
There’s actually a divide-by-ten example in the transformations / scaling part of the openHAB Modbus document.

Get that working first, and then we can look at the other registers.

Dear rossko57,

thank you sooooo much. Now i understand the basics!
I was able to read a kind of Temperatures, Speed of Fan and Moisture.

Let me ask you about another problem:
Yesterday i “paused” all things because want not flood my log with errors. Because I’d have to disconnect the Raspi from the Mod-Bus. Today I want get back “online” but no Tx Rx lights…

Ok…fixed…reboot fixed it… (like in good old windows days)

Ok another thing,
The table i send before does not fit on a few Adresses.
In the meantime I got the one that fits to the unit.


I want to change my Poller Things but I got errors.
Or is there no need to change the pollers?

No idea. Can’t see the whole chart, can’t see what you are doing, can’t see the errors reported.`

Here’s the whole chart

Errors:
2019-02-03 19:38:45.017 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1338ead[portName=/dev/ttyS0] – aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@e8496[slaveId=2,functionCode=READ_INPUT_REGISTERS,start=12,length=5,maxTries=3] [operation ID 87c1233d-6a0b-4fff-8661-64f7e253dca8]

Or:
2019-02-03 19:41:15.118 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1338ead[portName=/dev/ttyS0] – aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@175c6d6[slaveId=2,functionCode=READ_INPUT_REGISTERS,start=0,length=4,maxTries=3] [operation ID 23e39214-c95b-4743-a1c5-36bcf3b843de]

That seems to mean it’s having trouble finding ttyS0 again. Only one thing can use it at a time, make sure you have only one serial thing

Dear rossko57,
I got now a complete ModBus List.
Please have a look on to the Adresses Input Read - 04 how should i setup the PollerThing to fetch all of them ?
Start at 0 and length 16 ?
ModBusAdressListV2_4_2(2014-08-07).pdf (327.0 KB)

Have you got your serial bus working again?

You will have to “trial and error” this.
Some modbus slaves allow you to read registers that are not defined by the designers. (of course data in the undefined registers could be anything, who cares)
Some don’t allow block reads including unused addresses.
If they reject the read, they ought to give a “request rejected” response.
But of course, some don’t. They just stay silent and cause a timeout.

So try it out.
Read just register zero, to make sure everything else is set up right.
Then try different lengths in the poller.

Once you are polling the block(s) of registers that you want, set up your data things.
Obviously, you need not define data things for any undefined registers. You can have gaps.

The Serial Port is working, it don’t like hotpluggin.
Thanks for your hints about polling.
I will keep you informed
Br Peter

rossko57,

my Ventialtion Unit supports two modbus Ports.
I still have the issue that i cant establish communication at port 2.
The situation right now:
at port 1 i use a Displayunit that comes with the Ventilatio Unit.
at this port i can establish communication to my raspberry (with your outstanding support!)
but i cant use both.
Therefore the Unit supports a second port. But at this port i cant establish communication to
my raspberry and also no communication with the Displayunit.
I got the information from the supplier that port 1 only used for the Displayunit and port 2 for
connection to devices like the raspberry for example.
And the supplier also told me that this port 2 talks with “ModBus RTU”
Could there be a difference ? I read something about ASCII and RTU in the Web.

BR Peter

Yes, Modbus-RTU and Modbus-ASCII are different. (Modbus-ASCII is actually quite rare.)
In an earlier post, you showed us that you have selected RTU encoding in your openHAB modbus serial thing.
Since then, you’ve had it all working. Your Westaflex clearly supports RTU, there doesn’t seem to be any reason to to think that has changed.

Remember that Modbus is a bus - that is to say, many devices can be connected to one length of wire.

(a) Because of that, many Modbus devices have two modbus connectors - like an “in” and and “out”. In reality, they are just wired together so that a cable plugged in “in” is directly connected to a cable plugged in “out” to complete the bus, and run on to the next device.

(b) Or of course, some device might provide two entirely separate modbus ports that could provide different functions, run with different settings, baud, etc.
That could be a good design choice if they expected there to be two Modbus master devices - say, a keyboard and a building system - because two masters on the same bus doesn’t work well.

I’ve no way to know which of these is the case for your Westaflex, its not clear yet.

If its (b), you might have to set that port 2 up in the Westaflex - baud, slave ID etc. - because it is not necessarily the same as port 1. The manual (is this actually for your mystery model?) says, in translate -

RS485_2 Modbus RTU-compatible components can be connected, which allow the operation and control of the ventilation unit, as well as the current status of components different device functions.
For the basic configuration in interaction of these peripherals please take the following Preferences.
Configuration of the transmission mode (these settings are made on the control unit “FLEX”).
Item No. 355SAFLEX made.
MB addresses: 0-247
Please set preferably -1-
Baud rate: 19200 Bd
Parity: None
Stop: 1
Further setting instructions can be found in the
Manuals of Accessories / Peripherals.

I don’t know what a FLEX is, your keypad maybe. Remember looking at some settings like 4800? Are they the settings for port 2?

Hi there,

thank you for your quick response!
At the moment it works like this:
At Port1 i have to connect the Keypad (Name is Flex) OR the Raspberry.
This is at the moment unconvinied.
The ModBus Setup in the Keypad is: Adress: 1, Parity: None, Baud: 4800, Stop:1
This works fine.
Then i first try to runn the Raspberry with that settings, dont work.
After i changed the Baud to 19200 it worked fine.
So at the moment the Keypad OR the Raspberry work at the Port 1, but with different Baudrate.

I Table 2.6.2 of the Keypad Manual are written the settings. They wrote 19200Baudrate but i use 4800
with the Keypad because this was the setting out of stock.
The Keypad also does not work at Port 2… Strange… and the Raspi is Twinkelin the TX Led but no RX…
355SAFLEX_Bedienungsanleitung_2014_05052015.pdf (817.8 KB)

Unfortunately there is nothing writen in the manual how to setup the port 2…

Still confusing

I suggest that is the settings for the AC unit which will be used for port 2

Ok, i will try that and give you response…

Hello rossko57,

you are a savvy fox!!
I changed the baudrate to 19200 and it worked!
Now both are working with the WAC350 Unit.
(And there was a wrong twisted wire inside the Unit)

Thanks a lot!