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

Hi,

I checked your github recently, is there an update?

1 Like

@zmartify Hello Peter,

Is this still being developed or is there another binding for this ?

Thanks.

Hi Thomas, I am right now updating it for OpenHAB 3
Rgds,
Peter

2 Likes

Is this binding working well with the ahc 9000. I’m considering getting it because of the binding.

I never managed to make 2.x binding to work, hopefully we’ll have a wavin binding for oh3 soon!

1.I have tried to compile your zip, to .jar using maven and VScode:

2. copy 2 resulting .jar files (from ‘target’ dir) in /usr/share/openhab/addons

But bundle is not resesolved, (only installed) … according to console.
openhab> bundle:diag 233

openHAB Add-ons :: Bundles :: ZmartModbus Binding (233)
-------------------------------------------------------
Status: Installed
Unsatisfied Requirements:
osgi.wiring.package; filter:="(&(osgi.wiring.package=io.reactivex)(&(version>=2.2.0)(!(version>=3.0.0))))"
osgi.wiring.package; filter:="(&(osgi.wiring.package=io.reactivex.disposables)(&(version>=2.2.0)(!(version>=3.0.0))))"
osgi.wiring.package; filter:="(&(osgi.wiring.package=io.reactivex.flowables)(&(version>=2.2.0)(!(version>=3.0.0))))"
osgi.wiring.package; filter:="(&(osgi.wiring.package=io.reactivex.functions)(&(version>=2.2.0)(!(version>=3.0.0))))"
Declarative Services

I’m using it everyday :slight_smile:

1 Like

Hi Peter,

Will you share the binding of OH3?
Sorry I’m not technical and don’t know how to compile the project…

Thanks

Hi Mai,
Here is a link to zip file, which contains 3 jar files. Decompress the zip and put the 3 jar files in the addons folder and you should be up and running. If not - get back to me :wink:

https://github.com/zmartify/org.openhab.binding.zmartmodbus/blob/master/zmartmodbus%20-%20to%20addons%20folder.zip

Best regards,
Peter

Hi Peter, thanks a lot for the binding! I think I managed to get it work now. Will report is any issue. Just two quick question: I see two types of things:
(1) Wavin Actuator Channel XX
(2) Wavin TP-150 Channel XX Element XX - looks like temperatures settings are here.
What is (1) used for?

In the previous version the channel “ThermostatActive” indicate if heating is active or not. In this version which channel should I use?
Thanks in advance!

Just add all channels I can see below:

Hi zmartify (Peter Kristensen)

I’m So glad that you have made this bindingfor OH3 so thank you for that :slight_smile:

I’m that happy user of Openhab who is currently in use with 2 IHC installation and 4 Velux windows and my next endeavour is to get my 2 Wavin AHC 9000 units connected to the OpenHab 3 system… So your work is definately “water on my mill” so to speak… Very Happy! :slight_smile:

However i have some trouble setting it up… I have tried to carefully read the thread in here but i cant find what i’m looking for…

  • I currently have done a fresh installation of OH3 on a Raspberry PI 3B+ (my test setup so the live setup is not disturbed until thoroughly tested)
  • I have installed bindings for IHC and Velux but not set them up yet
  • I have copied the 3 files from your Github repository to /addonfolder under Openhab
  • I have connected the AHC 9000 to the RPI via an USB to RS485 adapter and can see activity in datalines (LED blinking on adapter and measurement with oscilloscope)
  • I have rebooted the RPI after copying the 3 jar files
    But… i cannot see any things or bindings comming up in hte OH3 interface…

What am i missing??

a things file containing:
Bridge Port=serial /dev/ttyUSB0 id=1 Baud=384000…??

A little lost here… Looking forward to your help :slight_smile:

Br
M Klitgaard

Hi again

I have taken your TCP Example code and modified it to:

Bridge modbus:serial[ port="/dev/ttyUSB0", id=2, baud=38400, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”] {
// read-write for coils. Reading 4 coils, with index 4, and 5.
// These correspond to input register numbers 000005, and 000005
Bridge poller coils [ start=4, length=2, refresh=1000, type=“coil” ] {
// Note the zero based indexing: first coil is index 0.
Thing data do4 [ readStart=“4”, readValueType=“bit”, writeStart=“4”, writeValueType=“bit”, writeType=“coil” ]
Thing data do5 [ readStart=“5”, readValueType=“bit”, writeStart=“5”, writeValueType=“bit”, writeType=“coil” ]
}
// read-write for holding registers. Reading 4 registers, with index 1500, 1501, 1502, 1503.
// These correspond to holding register numbers 401501, 401502, 401503, 401504.
Bridge poller holding [ start=1500, length=4, refresh=1000, type=“holding” ] {
Thing data holding1500 [ readStart=“1500”, readValueType=“float32”, writeStart=“1500”, writeValueType=“float32”, writeType=“holding” ]
Thing data holding1502 [ readStart=“1502”, readValueType=“float32”, writeStart=“1502”, writeValueType=“float32”, writeType=“holding” ]
}
// read-only for input registers. Reading 4 registers, with index 1500, 1501, 1502, 1503.
// These correspond to input register numbers 301501, 301502, 301503, 301504.
Bridge poller inputRegisters [ start=1500, length=4, refresh=1000, type=“input” ] {
Thing data input1500 [ readStart=“1500”, readValueType=“float32” ]
Thing data input1502 [ readStart=“1502”, readValueType=“float32” ]

    // Extract high or low byte of the 16-bit register as unsigned 8-bit integer (uint8)
    Thing data input1502lo [ readStart="1502.0", readValueType="uint8" ]
    Thing data input1502hi [ readStart="1502.1", readValueType="uint8" ]

    // Extract individual bits of the 16-bit register
    // bit 0 is the least significant bit, and bit 15 is the most significant bit
    Thing data input1502bit0 [ readStart="1502.0", readValueType="bit" ]
    Thing data input1502bit1 [ readStart="1502.1", readValueType="bit" ]
    Thing data input1502bit2 [ readStart="1502.2", readValueType="bit" ]
}

// read-only for discrete inputs. Reading 4 discrete inputs, with index 1200, 1201, 1202, 1203.
// These correspond to input register numbers 101201, 101202, 101203, 101204.
Bridge poller discreteInputs [ start=1200, length=4, refresh=1000, type="discrete" ] {
    Thing data di1200 [ readStart="1200", readValueType="bit" ]
    Thing data di1201 [ readStart="1201", readValueType="bit" ]
}

// Write-only entry: thing is child of tcp directly. No readStart etc. need to be defined.
// Note that the openHAB state might differ from the physical slave since it is not refreshed at all
Thing data holding5write [ writeStart="5", writeValueType="int16", writeType="holding" ]

}

Is this right?

Thanks in advance :slight_smile:

No, I believe Wavin uses custom function codes, so I cannot be used with the Modbus binding, which is why @zmartify’s binding is needed :slight_smile:

I was thrown off by the examplecodes noted on the GitHub - zmartify/org.openhab.binding.zmartmodbus: Zmartify Modbus binding for OpenHAB 2

Ok so i tried changing to this:
Bridge zmartmodbus:serialbrigde:controller[ port="/dev/ttyUSB0", id=2, baud=38400, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”] {

which led to this responce in Frontail
2021-03-27 09:49:12.993 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘AHC9000.things’

Which i guess is good news… But how do then see or identify the individual things in the AHC 9000 system? I cant see any binding activated in the GUI nor things popping up… Sorry if i’m asking stupid questions but i dont quite understand the setup here???

BR
M Klitgaard

Sorry for asking all these questions but I have a feeling of beeing on the right track but still having something wrong, and i have read this complete thread several times without getting wiser
I have also tried to look at the Code at github but i’m not a SW engineer so its not easy…

Could someone please help me with a few comments on the following:

  1. In my things file i have:
    Bridge zmartmodbus:serialbrigde:controller[ port="/dev/ttyUSB0", id=2, baud=38400, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”] {
    Bridge poller coils [ start=4, length=2, refresh=1000, type=“coil” ] {
    // Note the zero based indexing: first coil is index 0.
    Thing data do4 [ readStart=“4”, readValueType=“bit”, writeStart=“4”, writeValueType=“bit”, writeType=“coil” ]
    Thing data do5 [ readStart=“5”, readValueType=“bit”, writeStart=“5”, writeValueType=“bit”, writeType=“coil” ]
    }
    }
    Is this correct (assuming USB - RS485 converter is on /dev/ttyUSB0)?

  2. In my items file i have: Switch ReadDI4WriteDO5 “Coil 4/5 mix [%d]” { channel=“zmartmodbus:data:serialbrigde:controller:items:readDiscrete4WriteCoil5:switch” }
    Is this correct?

It just seems odd to me that readDiscrete4WriteCoil5 is not mentioned in the Thing file but rather do5 is

Gennerally i’m trying to use the examples written on github: GitHub - zmartify/org.openhab.binding.zmartmodbus: Zmartify Modbus binding for OpenHAB 2

But they do not mention zmartify
Help is much apprecited as i’m somewhat confused about the whole thing

BR
M Klitgaard

OK, sorry if I added a lot of confusion here. I have only used Zmartify’s OH2 binding, with the Things configured using the GUI interface, and a manually added Items-file. From the readme on the Github it appears that is totally changed with OH3.

Hi, I can report Peter’s binding works for me (almost) with OH3, the setup isn’t as straightforward as OH2 though, mainly due to the new UI with OH3. Basically below is what I did:

  1. Install the binding by copying the files to addon folder
  2. Manually add the ModBus Serial Controller bridge
  3. Then add Wavin AHC 9000 and set the bridge in step 2)
  4. Scan for the thermostats, you should now have a list of them in inbox (Wavin TP-150 Channel XX Element XX)

I do encounter some issue setting the temperature through OpenHAB though, reading is no problem and works 100%, but I couldn’t seem to get writing work reliably, sometimes it works but most of the time it reverts back to the original setting. In log I can see the following which indicates OH3 tries to set the temperature, but for some reason the register isn’t changed and it revert back to the old value after some seconds. Any suggestion?

2021-04-10 20:04:08.041 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘WavinOfficeTargetTemp’ received command 21.5
2021-04-10 20:04:08.043 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘WavinOfficeTargetTemp’ predicted to become 21.5
2021-04-10 20:04:08.046 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘WavinOfficeTargetTemp’ changed from 21.0 to 21.5
2021-04-10 20:04:16.224 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘WavinOfficeTargetTemp’ changed from 21.5 to 21.0

Hi Somy

Thanks for your reply which made me try once again with OpenHAB3… Here is what i did while trying to follow you instructions…

  1. Fresh install of Raspberry pi and OH3 (with no other binding installed than what is explained beneath)

  2. Install the binding by copying the files to addon folder

    • Copy the following files to RPI-IP-Addr\openHAB-addons folder
      a. org.openhab.binding.zmartmodbus-3.1.0-SNAPSHOT.jar
      b. reactive-streams-1.0.3.jar
      c. rxjava-2.2.20.jar
  3. Reboot OpenHAB/Raspberry Pi

  4. Enter the OpenHAB Webpage interface (IP-Addr:8080)
    Login as Admin

  5. Manually add the ModBus Serial Controller bridge by:
    a. Install ModBus binding 3.0.1

  6. Add Things Zmartify Modbus Binding version 2.x by:
    a. Press Things (in left menu) → + Sign (in lower left corner)
    b. Chose Zmartify Modbus Binding version 2.x → select Modbus Serial Controller (Brigde)
    c. Setup info
    Serial Port = /dev/ttyUSB0
    Id. = 1
    Baud = 38400
    Stopbits = 1
    Parity = None
    Databits = 8
    Encoding = RTU
    Discovery enables = Yes
    Flow Control In = None
    Flow Control Out = None
    Time btw transactions = 35 ms
    Transmission Mode = RTU
    d. Press “Create Thing”
    e. Modbus Serial Controller indicates a green “ONLINE” (so far so good)

  7. Then add Wavin AHC 9000 thing by:
    a. Press Things (in left menu) → + Sign (in lower left corner)
    b. Chose Zmartify Modbus Binding version 2.x → select Wavin AHC 9000
    c. Set the bridge to Modbus Serial Controller
    d. AC-116 Unit Address = 1
    e. Discovery Enabled
    f. Press “Create Thing”
    g. Wavin AHC 9000 indicates a green “ONLINE” (so far so good)

  8. Scan for the thermostats, you should now have a list of them in inbox (Wavin TP-150 Channel XX Element XX)
    a. Now this is here where the “chain starts to fall off”… as i Do not see the Thermostats nor the picture added by you on the 24 marts as a reply to Zmartify Peter Kristensens link to Github
    b. As you can see on the attached picture i cannot see same as you. I hope you or someone else can guide me in the last steps or explain to me why I see a diffirent “picture”?

Thanks in Advance
M Klitgaard

Hi Morten,
Do you get the device info channel populated with data - this needs to be and will ensure that there is a connection with the AHC-9000. Without connection to the AHC-9000 you will not be able to locate the thermostats
Best regards,
Peter