[SOLVED] Update to SNAPSHOT #1597 (and later) partially failed (AllPlay(=SOLVED), AmazonDashButton(=SOLVED), wrapper service(=SOLVED), Z-Wave(=SOLVED))

Tags: #<Tag:0x00007f61700c8950> #<Tag:0x00007f61700c8888> #<Tag:0x00007f61700c87c0>

@J-N-K

Any news on this (amazondashbutton)?

Using npcap version 0.9982 (=the latest) on Windows 10 (Build 1903).

I’ve tried snapshot 1674, but unfortunately no changes.

Here is my error-log (set amazondashbutton to DEBUG):

13:29:03.440 [DEBUG] [org.openhab.binding.amazondashbutton ] - BundleEvent STARTING - org.openhab.binding.amazondashbutton
13:29:03.447 [DEBUG] [org.openhab.binding.amazondashbutton ] - BundleEvent STARTED - org.openhab.binding.amazondashbutton
13:29:03.463 [DEBUG] [org.openhab.binding.amazondashbutton ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=365, service.bundleid=219, service.scope=bundle, component.name=org.openhab.binding.amazondashbutton.internal.AmazonDashButtonHandlerFactory, component.id=220} - org.openhab.binding.amazondashbutton
13:29:03.484 [DEBUG] [org.openhab.binding.amazondashbutton ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=366, service.bundleid=219, service.scope=bundle, component.name=org.openhab.binding.amazondashbutton.internal.config.AmazonDashButtonConfigOptionProvider, component.id=221} - org.openhab.binding.amazondashbutton
13:29:03.493 [DEBUG] [org.openhab.binding.amazondashbutton ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=367, service.bundleid=219, service.scope=bundle, component.name=org.openhab.binding.amazondashbutton.internal.discovery.AmazonDashButtonDiscoveryService, component.id=222} - org.openhab.binding.amazondashbutton
13:29:03.607 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazondashbutton:dashbutton:92e559fa' changed from UNINITIALIZED to INITIALIZING
13:29:04.540 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet, use default value: null
13:29:04.543 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet6, use default value: null
13:29:04.546 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.packet, use default value: null
13:29:04.547 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.link, use default value: null
13:29:04.559 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:04.565 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:04.569 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{51EB6D2C-7C1A-49CC-882F-E6BF6936D570} is not a suitable network interfaces as no addresses are bound to it.
13:29:04.573 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:04.576 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{579B2824-1244-4FF8-937F-6778A5E386D5} is not a suitable network interfaces as no addresses are bound to it.
13:29:04.586 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.dlt.raw, use default value: null
13:29:04.593 [DEBUG] [rnal.capturing.PacketCapturingService] - Started capturing ARP  and BOOTP requests for network device \Device\NPF_{51EB6D2C-7C1A-49CC-882F-E6BF6936D570} and MAC address ac:63:be:52:42:79.
13:29:04.602 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazondashbutton:dashbutton:92e559fa' changed from INITIALIZING to ONLINE
13:29:06.942 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:06.945 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:06.948 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:09.294 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:09.296 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:09.299 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:11.648 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:11.649 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:11.650 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:14.006 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:14.008 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:14.009 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:16.339 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:16.340 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:16.341 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:18.683 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:18.684 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:18.685 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:21.038 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:21.040 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:21.041 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:23.404 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:23.405 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:23.406 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:25.739 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:25.740 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:25.740 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:28.074 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:28.075 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:28.076 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:30.391 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{15BB3150-73C5-41FF-9BE8-09206BE1EA4F} is not a suitable network interfaces as no addresses are bound to it.
13:29:30.392 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{7F922277-A355-4189-A60E-4B58109F55FC} is not a suitable network interfaces as no addresses are bound to it.
13:29:30.394 [DEBUG] [rnal.pcap.PcapNetworkInterfaceService] - \Device\NPF_{047CA84D-72FC-4B89-9698-81FF43C9ED49} is not a suitable network interfaces as no addresses are bound to it.
13:29:31.440 [WARN ] [pcap4j.packet.factory.PacketFactories] - java.lang.NoClassDefFoundError:org/pcap4j/packet/factory/PacketFactoryBinder 

Hope this helps, thank you very much!
.
.
EDIT: SLF4J errors (in wrapper.log) does not appear in later snapshots (e.g. here: 1674)! So also SOLVED!

Did you try one of the versions listed here: https://github.com/kaitoy/blog/blob/master/content/post/pcap4j-with-four-native-libraries-on-windows10.md?

They tested npcap 0.0.5 omn windows 10 and that is reported to work

No, but I’m going to try it this evening or tomorrow morning.

No, it doesn’t. I’ve tested all above mentioned versions. No success.

Btw, npcap version 0.0.5 is from 28 Nov 2015 !! And the other above mentioned versions are obsolete as well.

With the latest npcap I always get:

19:48:34.403 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet, use default value: null
19:48:34.405 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet6, use default value: null
19:48:34.406 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.packet, use default value: null
19:48:34.407 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.link, use default value: null
19:48:34.495 [WARN ] [org.pcap4j.util.PropertiesLoader     ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.dlt.raw, use default value: null
19:48:35.128 [WARN ] [pcap4j.packet.factory.PacketFactories] - java.lang.NoClassDefFoundError:org/pcap4j/packet/factory/PacketFactoryBinder

But it was running with all kind of versions, beginning from 0.80 until 0.9982 with snapshot 1486 AND before.

And it stops working, after ESH core was re-implemented into OH. But I don’t know when it stopped.

See also this topic, from Feb 07 2017.

There I used the latest available version (0.80) of npcap. And after 0.80 all kind of newer versions.

Important for me is: Raw 802.11 Packet Capture, because I use a Wifi adapter, only.

I think I found at least one problem and can fix the NoClassDefFound error. Still I get other errors.

1 Like

Ok. I have a version https://janessa.me/esh/org.openhab.binding.amazondashbutton-2.5.0-SNAPSHOT.jar that works with npcap 0.80 without errors in my setup. At least it’s not repeating errors over and over again. Maybe you can test that. Uninstall the binding and drop this file in the addons-folder.

This is a version that can’t be released but maybe helps to get there.

1 Like

@J-N-K

Yeah, this is running now. :slight_smile:

14:03:34.703 [INFO ] [smarthome.event.ChannelTriggeredEvent] - amazondashbutton:dashbutton:ac-63-be-52-42-79:press triggered PRESSED

And autodetection when searching in inbox is now running as well! :+1:

I’ve tested with npcap 0.80 and also with 0.9982, both are running!

Ok. I have an idea what causes the problems. Could you try unzipping https://janessa.me/esh/dashbutton-1.8.2.zip in your addons-folder instead of the other version? The other version is still available, so you can easily switch back if this is not working.

I upgraded to pcap4j 1.8.2, not sure if that works without problems, but we might get around the NoClassDefFoundException if it does.

1 Like

Ok. Thank you very much. I’ m going to try within the next 10 minutes.

@J-N-K

223 │ Active │  80 │ 2.5.0.201909011533    │ openHAB Add-ons :: Bundles :: Amazon Dash Button Binding
224 │ Active │  80 │ 5.4.0                 │ jna

.

It’s also running! :slight_smile:
.

17:55:39.729 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazondashbutton:dashbutton:ac-63-be-52-42-79' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
17:55:43.184 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazondashbutton:dashbutton:ac-63-be-52-42-79' changed from INITIALIZING to ONLINE
17:55:54.347 [INFO ] [smarthome.event.ChannelTriggeredEvent] - amazondashbutton:dashbutton:ac-63-be-52-42-79:press triggered PRESSED

Thanks. That’s great. We can get rid of the ancient jna then. I’ll check how I can get that in a mergable state. Would you be willing to try another version in the next days?

Yes, of course! Thanks a lot. :slight_smile:

I updated the bundle above. You can just replace the one in your addons foilder with this one. Please leave the jna-bundle in place. This is a version that is compatible with some other changes I’m preparing, so if it works, this could be the next release version.

@J-N-K

I tried out. Unfortunately not running:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
18:42:07.598 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.Error: Structure.getFieldOrder() on class org.pcap4j.core.NativeMappings$PcapErrbuf returns names ([buf]) which do not match declared field names ([])
        at com.sun.jna.Structure.getFields(Structure.java:1089) ~[?:?]
        at com.sun.jna.Structure.deriveLayout(Structure.java:1234) ~[?:?]
        at com.sun.jna.Structure.calculateSize(Structure.java:1159) ~[?:?]
        at com.sun.jna.Structure.calculateSize(Structure.java:1111) ~[?:?]
        at com.sun.jna.Structure.allocateMemory(Structure.java:414) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:205) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:193) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:180) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:172) ~[?:?]
        at org.pcap4j.core.NativeMappings$PcapErrbuf.<init>(NativeMappings.java:864) ~[?:?]
        at org.pcap4j.core.Pcaps.findAllDevs(Pcaps.java:52) ~[?:?]
        at org.openhab.binding.amazondashbutton.internal.pcap.PcapUtil.getAllNetworkInterfaces(PcapUtil.java:40) ~[?:?]
        at org.openhab.binding.amazondashbutton.internal.pcap.PcapNetworkInterfaceService.determineBoundNetworkInterfaces(PcapNetworkInterfaceService.java:168) ~[?:?]
        at org.openhab.binding.amazondashbutton.internal.pcap.PcapNetworkInterfaceService.lambda$0(PcapNetworkInterfaceService.java:56) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]
18:42:07.600 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.Error: Structure.getFieldOrder() on class org.pcap4j.core.NativeMappings$PcapErrbuf returns names ([buf]) which do not match declared field names ([])
        at com.sun.jna.Structure.getFields(Structure.java:1089) ~[?:?]
        at com.sun.jna.Structure.deriveLayout(Structure.java:1234) ~[?:?]
        at com.sun.jna.Structure.calculateSize(Structure.java:1159) ~[?:?]
        at com.sun.jna.Structure.calculateSize(Structure.java:1111) ~[?:?]
        at com.sun.jna.Structure.allocateMemory(Structure.java:414) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:205) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:193) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:180) ~[?:?]
        at com.sun.jna.Structure.<init>(Structure.java:172) ~[?:?]
        at org.pcap4j.core.NativeMappings$PcapErrbuf.<init>(NativeMappings.java:864) ~[?:?]
        at org.pcap4j.core.Pcaps.findAllDevs(Pcaps.java:52) ~[?:?]
        at org.pcap4j.core.Pcaps.getDevByName(Pcaps.java:125) ~[?:?]
        at org.openhab.binding.amazondashbutton.internal.pcap.PcapUtil.getNetworkInterfaceByName(PcapUtil.java:56) ~[?:?]
        at org.openhab.binding.amazondashbutton.internal.handler.AmazonDashButtonHandler.lambda$0(AmazonDashButtonHandler.java:62) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]

@J-N-K

Any progress here? Maybe you’ve missed my reply?

I have included the version before (will be included when https://github.com/openhab/openhab2-addons/pull/6005 is ready).

1 Like

It has been merged. :slight_smile: I’m going to try next Snapshot release tomorrow or on Sunday.

1 Like

It seems to be not merged into snapshot 1701 ??

220 │ Active │  80 │ 4.2.1                 │ jna
221 │ Active │  80 │ 2.5.0.201909260727    │ openHAB Add-ons :: Bundles :: Amazon Dash Button Binding

Did you remove the files from the addons directory?

The code was merged but it wasn’t build. It should be part of 1702.

2 Likes