[SOLVED] Westaflex Binding

I expect 18.3 and I got 18

Most likely problem area is in the Item label, the [%xxx] part.

You can also override that by setting a label with [%xxx] part.in your sitemap.

(personally I throw all the decimals away when displaying temp or humidity, the sensors aren’t that good and who cares anyway in a domestic setting)

Dear rossko57,

I think we can skip that. Because in the meantime I played with Habpanel and this worked perfect for me!


Now one comes the next thing.
I want add some Switches to set the speed of the Vents. I can set them 0 - 1 - 2 - 3, Off - Low - Middle - High.
This is written here in the Fans seed Register

Yep. A read/write holding register, and you would limit the allowed values to 0-3 in your openHAB setup.
What’s the problem?

Ok, but how did i make a switch with a input 0 - 1 - 2 - 3 ?

In HABpanel? No idea.

In a sitemap

Switch item=someNumber mappings=[0="Off",1="Low",2="Med",3="High"]

lots of examples of this kind of thing

NO mean in the PaperUI…

I added a poller thing:


and then the data thing:

But i receive some Errors in the log:
2019-02-10 20:52:24.794 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Unregistering regular poll task BasicPollTaskImpl@1e19327[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1a9cef1[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=0,length=3,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@11e24c7[portName=/dev/ttyS0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@b2e80810] (interrupting if necessary)

2019-02-10 20:52:24.798 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Poll task BasicPollTaskImpl@1e19327[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1a9cef1[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=0,length=3,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@11e24c7[portName=/dev/ttyS0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@b2e80810] canceled

==> /var/log/openhab2/events.log <==

2019-02-10 20:52:24.819 [hingStatusInfoChangedEvent] - ‘modbus:poller:4c74ab1d’ changed from ONLINE to OFFLINE

2019-02-10 20:52:24.829 [hingStatusInfoChangedEvent] - ‘modbus:data:ecd05e5d’ changed from OFFLINE (CONFIGURATION_ERROR) to OFFLINE (BRIDGE_OFFLINE)

2019-02-10 20:52:24.858 [me.event.ThingUpdatedEvent] - Thing ‘modbus:poller:4c74ab1d’ has been updated.

2019-02-10 20:52:24.871 [hingStatusInfoChangedEvent] - ‘modbus:poller:4c74ab1d’ changed from OFFLINE to ONLINE

2019-02-10 20:52:24.883 [hingStatusInfoChangedEvent] - ‘modbus:data:ecd05e5d’ changed from OFFLINE (BRIDGE_OFFLINE) to OFFLINE (CONFIGURATION_ERROR)

I have to say sorry, but at the moment iam able to READ from my Device.
But WRITE is total new for me…

(regarding Number with switch selection)

You can’t. PaperUI is an administration interface, it does not have the fancy controls of real user UI.
Your Item is a Number, I think if you want to change it then you type a new number in. Can’t pretend it is a switch in PaperUI.

Okay, I thought you were already reading holding register 0-3. But if you weren’t already, the new poller looks fine.
The poller only deals with reading, nothing to do with writing.

So let’s go one step at a time.
Set up your poller and data things and Items so that you can read those three registers from the AC unit.
Get that working before thinking about writing.

When it does come to writing later, you’ll be wanting the same 16-bit type as the read (not single bit) and you don’t usually want the write-multiple option. The only thing that will need changing to allow write is the data Thing for the channels you want to write.

Ok, thanks for your help!
This worked well.
So its only one Data thing needed.
I can read 0,1,2,3 as a number.
FanSpeed: 0=Stopped,1=low,2=middle,3=high

Now I want to know how to write the number in to that register

Edit:
The Writing is working also for me!
Thanks rossko57

It’s not complicated, in the data Thing you add the write Start (same as the read Start) , the write value type (same as), write type (holding).

That’s it, send a command to your Item from rule or UI and it gets written to modbus.
In this case, it’s up to you to manage only sending sensible commands
(0-3)

Okay, sorted apparently :smiley:

Yep! Now everything what I need for the moment is working very well!
Hopefully it helps other Westaflex Wac350 Airvent Units users to connect thier unit to the Openhab!

Give it a week for you to find any more to tinker with :wink:
and I’ll have a go at assembling your learnings into old-fashioned things and items file formats. Easier to follow later than PaperUI screenshots.

:rofl:, yes I found out how to set the Temperature.
And wand to do some maths. Because I want to calculate the relation between two temperatures
The formula is like that 100/AbluftxZuluft=%
100/18,5°x14,5°=78,37% (Its the Efficiency of the Ventunit)

Dear rossko57,

long time no hear :slight_smile:
I´ve going more far than i ever thought. So my Sitemap is growing and growing :slight_smile:
But now again iam struggeling with adding a new modbus Read/Write thing.
Here marked yello is the Modbus Adress i want to Read/Write:


Then i added a “PollerThing” for those:

And this Poller seem to be working:

And then the “DataThing” for those Poller:

But the “DataThing” will not work:

Here´s a Message from the Log:
`2019-02-26 21:15:06.648 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Unregistering regular poll task BasicPollTaskImpl@7927e6[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1d5db2e[slaveId=1,functionCode=READ_COILS,start=15,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@e7268e[portName=/dev/ttyS0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@70bcfddd] (interrupting if necessary)

2019-02-26 21:15:06.652 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Poll task BasicPollTaskImpl@7927e6[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1d5db2e[slaveId=1,functionCode=READ_COILS,start=15,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@e7268e[portName=/dev/ttyS0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@70bcfddd] canceled`

Would you kindly help me a little bit ?

Thanks a lot!

I suspect this is as simple as naming your poller FanStandby and also your data thing FanStandby.
You’ve got to give them unique names.

To save madness, consider calling your poller WestCoils or something like, and data thing wcoil17 or suchlike. So far as Modbus goes, these are just registers.
Your Item is the part you want with a meaningful name.
I’m guessing you’ll expand this poller to get some of the other functions and alarms eventually.

But of course any naming scheme is up to you.

So, I tested with differed names.
No changes

This error message is not coming from the poller you showed us, which is for coil start 17 length 1

The dat thing you showed us (for a coil), you have set to read uint16 type (incorrect) and write bit type (correct).

Hello rossko57,

thank you for your hint with the “bit”. That solved the problem.
And now its clear for me, because as far as i understand a coil can´t be a Number.
A coil must be a bit because of “0” or “1”.

Thank you again rossko!