OpenWebNet (BTicino/Legrand) Binding (Beta) [4.1.0;5.0.0)

This enhancement has been just added to the 3.2 branch, amazingly fast!

@bastler are you able to run the binding correctly? you can either install the one from marketplace or from official OH snapshot.

There are 8 days to test it before it gets released in 3.2 official.

i have some difficulties that i try to describe:
first of all, two days ago i accidentally installed the official distribution binding instead of the marketplace version - that was the reason why then dry contacts did not work at all.

now i installed the marketplace binding and it started working. contacts now are found:

2021-12-12 17:25:38.063 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openwebnet:bus_dry_contact_ir:bticino:Buero_Tuere_Kt' changed from UNINITIALIZED to INITIALIZING

2021-12-12 17:25:38.069 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openwebnet:bus_dry_contact_ir:bticino:Buero_Tuere_Kt' changed from INITIALIZING to UNKNOWN: Waiting state update...

but as mark already noted they stay unknown as long as they are not switched (it seems the asking of the state at boot is missing, i do that with #25354## for contact 54 for example)

as soon as the contact is switched it comes online:

2021-12-12 17:29:30.225 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openwebnet:bus_dry_contact_ir:bticino:Buero_Tuere_Kt' changed from UNKNOWN: Waiting state update... to ONLINE

2021-12-12 17:29:30.242 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'iBuero_Tuere_Kt' changed from NULL to ON

but when i reboot the rpi the complete binding does not start again (not one thing from this binding in the things-list, no entry for the binding in the karaf-list, although binding in marketplace is marked as “installed”). then i remove it (from marketplace) and then again click to install it again. now things come up again.

but, as soon as i click “install” i receive this in the log (at each install, even the first install):

java.lang.RuntimeException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT] : mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/3.2.0-SNAPSHOT/xml/features

	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:121) ~[?:?]

	at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[?:?]

	at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) ~[?:?]

	at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:165) ~[?:?]

	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:116) ~[?:?]

	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:95) ~[?:?]

	at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.installFromCache(CommunityKarafAddonHandler.java:159) ~[?:?]

	at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.install(CommunityKarafAddonHandler.java:106) ~[?:?]

	at org.openhab.core.addon.marketplace.internal.community.CommunityMarketplaceAddonService.install(CommunityMarketplaceAddonService.java:235) ~[?:?]

	at org.openhab.core.io.rest.core.internal.addons.AddonResource.lambda$1(AddonResource.java:223) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: java.io.IOException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:774) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]

	at java.net.URL.openStream(URL.java:1165) ~[?:?]

	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]

	... 17 more

	Suppressed: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT

		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:403) ~[?:?]

		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215) ~[?:?]

		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192) ~[?:?]

		at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]

		at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]

		at java.net.URL.openStream(URL.java:1165) ~[?:?]

		at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]

		at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[?:?]

		at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[?:?]

		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) ~[?:?]

		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) ~[?:?]

		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) ~[?:?]

		at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:165) ~[?:?]

		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:116) ~[?:?]

		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:95) ~[?:?]

		at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.installFromCache(CommunityKarafAddonHandler.java:159) ~[?:?]

		at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.install(CommunityKarafAddonHandler.java:106) ~[?:?]

		at org.openhab.core.addon.marketplace.internal.community.CommunityMarketplaceAddonService.install(CommunityMarketplaceAddonService.java:235) ~[?:?]

		at org.openhab.core.io.rest.core.internal.addons.AddonResource.lambda$1(AddonResource.java:223) ~[?:?]

		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

		at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

		at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.2.0-SNAPSHOT

	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:413) ~[?:?]

	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215) ~[?:?]

	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192) ~[?:?]

	at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]

	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]

	at java.net.URL.openStream(URL.java:1165) ~[?:?]

	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]

	... 17 more

as long as i do not reboot the contacts seem to work as expected when switched.

if you ask state using the OpenWebNet client using this message:
*#25*30##
what is the answer?

this look like more as a OH Marketplace problem.
I suggest you move the RaPi to snapshot for the moment and leave the Marketplace until 3.2 is released.

strange, should work, didnt know this command but seems to ask for all states with one command.

but seems not to work at boot, not just one contact comes online.

sorry i dont understand. do you mean i should download the *.kar file from git and put it in addon-folder? (this i did before, not quite sure but i think i had the same problem then)

side note: i realize that when i send *#25*30## not all contacts answer the state. i receive feedback from 32 contacts, but 7 dont answer, even not when sending the command several times. cannot see the 7 contacts have any common,

Hi @massi, could you please add a link to the according PR for this add-on?

Please note that this is required according to the publishing rules for the marketplace - thanks!

so when OH boots: 32 contacts become online and their item state is updated, only those 7 remain offline and linked items remain “unknown” ?
If this is specific to your system I would not implement any workaround here, as message *#25*30## which is sent at reboot , should be enough to refresh state of all contacts.

Since this enhancement has been already merged for 3.2 release I would remove this alpha version of the binding

actually it is very hard for me to test because this alpha binding does not start at boot. i have to uninstall it and install again. i never bevore realized such problems when i installed a testing binding. problem then is that most rules (jython) do not work because all the items are not present at boot and the rules will not be created.

i am not at home at the moment so cannot test again but i realized before that not one contact comes online when reinstalled the binding from marketplace. so i tried to send the own command manually from own-web-net client. when sending *#25*30## many but not all contacts come online. but when asking this contacts direct, for example *#25*354## then it answeres the state and comes online.

Ok then I suggest you do more tests with the official 3.2.0 due Dec24th (or 3.2.0.RC1 already available if you do not want to wait), and skip for now the Marketplace version that may have some problem at the boot (even if my code is the same)

now i uninstalled the marketplace version and installed the 3.2.0rc1 as suggested.

all contacts work as expected, they are found and all state requests work now.

only on reboot it takes very long until the states are reported (or lets say until they come online), it takes about 6 minutes. all other items are online within the first minute. so meanwhile all rules are loaded and when they need an contact-state they dont work properly.

Yup. On restart openwebnet things dissappear and I have uninstall and reinstall the binding to get them back. And in my case reboot mh202 or some scenarios stop.

As the PR was merged and so is included in official 3.2, I suggest to suppress this version from the marketplace.

ok, is it enough to remove the published tag ?

Reading @ysc announcement this is what I understand.

The functionality (support for Dry Contact and IR interfaces) has been integrated in OH 3.2.0 release.

1 Like

Yep. Deleting the topic can cause problems if you upgrade openHAB for those who have the add-on installed (they have to delete it from userdata/marketplace).

The idea is that you could reuse this topic (edit the title/description and the “published” tag) to act as a “beta channel” whenever you have a new change waiting to be merged, so interested people can easily test it. When there is no pending PR you can unpublish the marketplace entry until there’s something new.

1 Like

3.3 beta 2 appears to have fixed the startup interference issues with MH202 scenarios ‘only if’ conditions.

I am not happy with the thermo support peroformance for the central 99zone thermo unit. I will report in the dedicated thread, but after spending sometime with the 3.3 beta 3 which I am now testing.

First start up errors with beta 3. Things are online/offline as expected even thermo zone 5 online despite messages below. Interestingly I normally use numbers for the thing id but the zone after zone 5 has ‘office’ as the id… maybe coincidence.

All things, items, rules seem to be behaving as normal so far.


2022-01-26 09:02:27.925 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - Created a DiscoveryResult for gateway 'MH202' (UDN=pnp-scheduler-1_0-00:xxxxxxxxxxx)

2022-01-26 09:02:27.933 [INFO ] [al.discovery.BusGatewayUpnpDiscovery] - Created a DiscoveryResult for gateway 'Touch Screen' (UDN=pnp-ts10-2_1-00:03:50:xxxxxxx)

2022-01-26 09:02:28.642 [INFO ] [rnal.handler.OpenWebNetBridgeHandler] - ---- CONNECTED to BUS gateway bridge 'openwebnet:bus_gateway:gateway' (xxxxxxxxx)

2022-01-26 09:02:28.688 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - newDiscoveryResult() WHERE=w:5#1, deviceType=SCS_THERMO_ZONE

2022-01-26 09:02:28.820 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key openwebnet:bus_thermo_zone:gateway:5 in ManagedThingProvider, because it does not exists.

2022-01-26 09:02:29.073 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler@26933022': null

java.lang.NullPointerException: null

	at org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler.initialize(OpenWebNetThermoregulationHandler.java:83) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor15550.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

2022-01-26 09:02:29.084 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'openwebnet:bus_thermo_sensor:gateway:500': null

java.lang.NullPointerException: null

	at org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler.initialize(OpenWebNetThermoregulationHandler.java:83) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor15550.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

2022-01-26 09:02:29.105 [WARN ] [rnal.handler.OpenWebNetBridgeHandler] - registering device with an existing ownId=4.500

2022-01-26 09:02:29.107 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler@26933022': null

java.lang.NullPointerException: null

	at org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler.initialize(OpenWebNetThermoregulationHandler.java:83) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor15550.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

2022-01-26 09:02:29.111 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'openwebnet:bus_thermo_sensor:gateway:500': null

java.lang.NullPointerException: null

	at org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler.initialize(OpenWebNetThermoregulationHandler.java:83) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor15550.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

2022-01-26 09:02:47.242 [WARN ] [rnal.handler.OpenWebNetBridgeHandler] - --- no handler for thing openwebnet:bus_thermo_zone:gateway:5

2022-01-26 09:03:17.173 [WARN ] [rnal.handler.OpenWebNetBridgeHandler] - --- --- CHECKED COMPLETED: ^^^NOT ALL THINGS ONLINE^^^ for bridge openwebnet:bus_gateway:gateway

OH 3.3.0M3 has been published .
For openwebnet it brings:

After updating to 3.3.0M3 I see what appears to be constant disconnections (the bridge goes constantly offline/online):

2022-04-10 14:42:25.142 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## openCommandConnection() returned exception (Could not open BUS-CMD connection to 192.168.1.11:20000 (IOException: Connection refused (Connection refused))) while opening NEW CMD connection

2022-04-10 14:42:25.145 [WARN ] [rnal.handler.OpenWebNetEnergyHandler] - subscribeToActivePowerChanges() Unable to refresh subscription to active power changes notifications for WHERE=w:51. Exception=IOException while sending frame *#18*51*#1200#1*10## or reading response: Cannot create NEW CMD connection to send message *#18*51*#1200#1*10##

2022-04-10 14:42:25.145 [WARN ] [rnal.handler.OpenWebNetEnergyHandler] - subscribeToActivePowerChanges() Unable to refresh subscription to active power changes notifications for WHERE=w:51. Exception=CMD is not connected

2022-04-10 14:53:44.400 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openwebnet:bus_gateway:MYHOMESERVER1_000350a46d47' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway.

2022-04-10 14:53:47.007 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openwebnet:bus_gateway:MYHOMESERVER1_000350a46d47' changed from OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway. to ONLINE