[SOLVED] Westaflex Binding

Hello Folks,
Hopefully someone can give me a little help in here.
My current project is to connect our Westaflex Ventilation System with ModBus.
I have a Raspi with Openhab 2 running and a rs485 Hat and it’s connected to the rs485 from the Westaflex.
Iam also a little bit familiar with the Openhab.
But now it comes to where I need help. Westaflex is providing something at GitHub to connect the Ventilation System to the Openhab:

But how did I “manual” Binding, because in the List of Bindings there is Westaflex available.

How do I a manual Binding?
Br Peter

So far as I can see, you should be able to use ordinary Modbus 2 binding instead, to link your Westaflex to openHAB Items, via Things and channels.

The “1.x Westaflex binding” appears to be just a modbus binding.

Hi,

thank you for your answer.
I did the Modbus Binding but now it´s getting difficult for me.
The RS485 Shield i use is this:


i hope is installed it right.
Can i Test the Shield with the console ?
And then i would kindly ask if you can give me a example in witch way i have to
add thing/item to read/write the Westaflex Modbus adresses ?

BR Peter

Best to try simple reads with some low-level utility like Modbus Poll.or pollmb.py

You will need to know your units connection details - baud rate, parity, unit ID/address
Pages 25/26 of this manual looks helpful, gives us register addresses we will need for openHAB things later
https://www.westaflex.com/support/dokumente/bawac351/at_download/file

As far as i can see my modbus shield is “online”

It did this settings:

but now i need some help to create a item to show a temperature for example

I don’t know how you even set the unit address on that. That manual suggest baud rate is 19200. It’s really going to help if you can find out what model you have.

Ok, for manual operation there is a display unit that iam using. It shows Address 1, 4800baud, parity none

Excellent.
Let’ start simple then. The docs show there are sixteen coils for various functions, addresses 0-15. Start address 0 , length 16
So add a poller Thing to your serial Thing for those.

At this stage, openHAB should be read polling your Westaflex. If there are twinkly lights for this, you should see them twinkle.

Most of the ‘coils’ seem to be alarm signals, so there won’t normally be anything much to see or any need to turn them on/off.
coil 12 seems to be “Fans on”, so that would be a good one to add a data Thing for, to that poller.

Once you’ve got that data thing, you can add a Switch type Item, and link it to the modbus data channel.

Ok, its going to get more clearly…
But now I’ve got an error message:

Now you start guessing.
Might be something wrong with your poller settings, but you kept those secret.

More likely, something about establishing the modbus connection.
Confident your serial Thing is pointing to the RS485 hardware?
A/B wires swapped, using twisted pair? How long is the cable, do you need to arrange termination?

It’s easier to fault find this kind of problem using mbpoll or similar tools.

Ok, the wiring seems to be ok.
On the RS485 board the TX and RX LEDs not twinkle at any time.
I guess i did not configure it right…but I did everything in the manual:

And then I can choose something here:
With both I got comm error


:man_shrugging:t3:

Poller settings:

I know nothing about setting up Pi serial, but that seems like a big clue this is where the problem lies. Working Poller should twinkle Tx light even with no cable connection.
Looks like it ought to come up on AMA0. I can’t help with this part.

Ok, I would contact the supplier of this shield…
I will keep you updated!
Br

HI there,
long time no hear :slight_smile: cause i went out for a Business trip in the UK.
The Supplier of the RS485 Shield told me that to to to get the Shield running:

sudo raspi-config

'5 Interfacing Options' auswählen

'P6 Serial' auswählen

'Would you like a login shell to be accessible over serial?' --> NO

'Would you like the serial port hardware to be enabled?' --> YES

raspi-config close

Raspberry Pi reboot

now you can use the /dev/ttyS0

If this worked well i should see the TX light twinkelin somehow.

It does (YEAH). But after it try to read a adress with the Poll/Thing/item in my PaperUI
It stopps, and never worked again… :confused:

Let’s go back to simple.

Make sure you have no westaflex files in addons.cfg or something like.

Configure just a serial thing and a poller thing.
Delete data things.
Disconnect wires to RS485.
close down openHAB
Perform the instructions for getting the card as ttyS0

Reboot openHAB and look for TX led

These thing is driving me crazy…
I did a full wipe of SDcard and flashed it new with etchter.
But there so Errors If I login console:
2019-02-02_13:10:36_UTC [openHABian] Ensuring network connectivity… OK
2019-02-02_13:10:36_UTC [openHABian] Waiting for dpkg/apt to get ready… OK
2019-02-02_13:10:45_UTC [openHABian] Updating repositories and upgrading installed packages… FAILED
2019-02-02_13:10:51_UTC [openHABian] Initial setup exiting with an error!

Update:
I did a another flash of the SD card… now its working…