I’ve just found by accident this post and I’m very interested in your modern FHT binding. I’m still using the old openHAB1 addons for CUL and FHT with openHAB 2.5 and bridge the items to openHAB 3.1. With your binding I would get rid of openHAB 2.5.
I’m struggling a bit to get the binding running with openHAB 3.1. I’ve copied oh-ibapl-kar-3.0.0-20210224.184448-5.kar and de.ibapl.openhab.fhz4j-3.0.0-20210224.184422-5.jar and to the addons and managed to get debug log output from the binding. It doesn’t look like the CUL is found. Also the binding is not show in the configuration page nor a config file is created in the services folder.
Is it possbile to run these builds with openHAB 3.1 at all? If so, how can I configure the binding to use the CUL and my housecode?
Maybe the CUL is used by the old OW - network.
If so disable this first or test if you can open /dev/ttyACM0 with i.e. screen or minicom.
then the CUL should be found.
on the new Frontend log in as admin.
Go to Things press the + button on the lower right corner.
Choose the binding FHT4J which should be listed.
Add the CUL RS232 Bridge and configure the bridge.
then the FHT80 devices should show up. I added them with the “old” HAB Panel.
this helped a lot! After adding the CUL RS232 bridge, a scan button appeared once in the WebGUI. All the FHT80b and the HMS were found. From the HMS I could receive temperature and humidity updates. For the FHT80b I have to check, why no updates are received.
I’ve installed log.io to listen to 127.0.0.1:6689, but couldn’t get any messages. Is there a special configuration required?
You don’t need log.io Maybe “log the IO” is a better phase. the logs are found here (*nix):
/var/lib/openhab/CUL_SpswBridgeHandler_‘TIMESTAMP_OF_OPENING’.log.txt
so I have a /var/lib/openhab/CUL_SpswBridgeHandler_2021-11-19T16:31:31.101275Z.log.txt
for which the port was opened at 2021-11-19T16:31:31.101275.
this is set to ASCII, because the CUL reds and writes in command line style.
For the commands see the refernence culfw reference.
meanwhile I’ve installed your bindings on my productive setup (Intel NUC with openHAB 3.1.0 in a docker container). It works just fine! It’s amazing to see the old FHT80b beeing supported natively without any legacy bundles and bridging or other workarounds.
The missing support for window contacts can easily be replaced by rules which detect the WindowopenTemperatur setting.
What kind of support do you need for window contacts - I haven’t got any in use.
If its only parsing please send me some IO log snipplets - I will look into it.
If its sending give me the command…
I’ve scanned with the CUL bridge for new things, but the TF are not discovered - I’ve triggered the sensors multiple times.
Next I’ve created the TF manually with the 6 digit hex number from the log, but the channels are not updated.
Here is another snippet from the CUL log. Maybe it doesn’t work due to the runtime exception?
@2022-01-22T14:37:18.411019Z CH call read
@2022-01-22T14:37:27.989083Z CH return read: "T3EBA5A0220\r\n" duration: PT9.578064S
@2022-01-22T14:37:27.990348Z ExR java.lang.RuntimeException: State: COLLECT_COMMAND command: null last byte 0x5a
at de.ibapl.fhz4j.parser.fht.FhtParser.parse(FhtParser.java:340)
at de.ibapl.fhz4j.parser.cul.CulParser.parse(CulParser.java:305)
at de.ibapl.fhz4j.cul.CulAdapter$StreamListener.run(CulAdapter.java:66)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.UnsupportedOperationException: Unknown command: 0x5a
at de.ibapl.fhz4j.parser.fht.FhtParser.getCommand(FhtParser.java:215)
at de.ibapl.fhz4j.parser.fht.FhtParser.parse(FhtParser.java:322)
... 3 more
@2022-01-22T14:37:27.992792Z CH call read
@2022-01-22T14:37:28.485494Z CH return read: "T3EBA5A8221\r\n" duration: PT0.492702S
@2022-01-22T14:37:28.486650Z ExR java.lang.RuntimeException: State: COLLECT_COMMAND command: null last byte 0x5a
at de.ibapl.fhz4j.parser.fht.FhtParser.parse(FhtParser.java:340)
at de.ibapl.fhz4j.parser.cul.CulParser.parse(CulParser.java:305)
at de.ibapl.fhz4j.cul.CulAdapter$StreamListener.run(CulAdapter.java:66)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.UnsupportedOperationException: Unknown command: 0x5a
at de.ibapl.fhz4j.parser.fht.FhtParser.getCommand(FhtParser.java:215)
at de.ibapl.fhz4j.parser.fht.FhtParser.parse(FhtParser.java:322)
... 3 more
I did a lot of more tries with the feature command. The version numbers remain the same. Also the dependencies seem to be the ones that are visible in the bundle list:
Feature openhab-fhz4j-binding 3.2.0.SNAPSHOT
Description:
Fhz4J OH Binding
Feature has no configuration
Feature has no configuration files
Feature depends on:
openhab-runtime-base 0.0.0
Feature contains followed bundles:
mvn:de.ibapl.spsw/de.ibapl.spsw.api/3.1.0
mvn:de.ibapl.fhz4j/de.ibapl.fhz4j.parser.cul/2.1.0-SNAPSHOT
mvn:de.ibapl.openhab/de.ibapl.openhab.fhz4j/3.2.0-SNAPSHOT
Feature has no conditionals.
I updated the version of the kar archive, did you delete the 3.0.0 kar
in addons?
If not OpenHAB/karaf will see both and decided not to use the newer one
for all bundles?
And now the good news: The manually created things started to update the linked items! To complete the test, I deleted one thing and successfully added it via CUL scan. The log gets populated with lots of messages like: