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

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

It was a complete new installation from snapshot 1701. But like @wborn mentioned, I will wait for 1702.

EDIT: 1702 was just released. I’m going to try it soon.

I’ve tried snapshot 1702 now. Unfortunately no success!

WARNING:

21:29:50.171 [WARN ] [pcap4j.packet.factory.PacketFactories] - No PacketFactoryBinder is available. All packets will be captured as UnknownPacket.


bundle:list

219 │ Active  │  80 │ 5.4.0                 │ jna
220 │ Active  │  80 │ 2.5.0.201909281253    │ openHAB Add-ons :: Bundles :: Amazon Dash Button Binding

.

Is this missing?: (I cannot find it…) In 1701 there were these two more:

222 │ Active │  80 │ 1.6.6                 │ Pcap4J Core
223 │ Active │  80 │ 1.6.6                 │ Pcap4J Packetfactory Static

.

But there is something strange also: waiting??

133 │ Waiting │  80 │ 2.5.0.201909280301    │ openHAB Core :: Bundles :: Core
166 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Model Persistence
181 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Persistence

The classes these bundles provided are now embedded into the bundle. If you extract org.openhab.binding.amazondashbutton-2.5.0-SNAPSHOT.jar you’ll see these classes are in /org/pcap4j

@wborn

Thanks for clarifying. But why it’s (AmazonDashButton) not running?

And do you know about the other problems: on what do they wait? :wink:

133 │ Waiting │  80 │ 2.5.0.201909280301    │ openHAB Core :: Bundles :: Core
166 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Model Persistence
181 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Persistence

I don’t know why but I do see the same when I run a new openHAB 2.5.0-SNAPSHOT instance and install the demo package:

openhab> bundle:list|grep Waiting
133 │ Waiting │  80 │ 2.5.0.201909280301    │ openHAB Core :: Bundles :: Core
166 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Model Persistence
181 │ Waiting │  80 │ 2.5.0.201909280307    │ openHAB Core :: Bundles :: Persistence
236 │ Waiting │  80 │ 2.5.0.201909281254    │ openHAB Add-ons :: Bundles :: Astro Binding
243 │ Waiting │  80 │ 2.5.0.201909280305    │ openHAB Core :: Bundles :: Automation
248 │ Waiting │  80 │ 2.5.0.201909281317    │ openHAB Add-ons :: Bundles :: IO :: Hue Emulation Service

It also fails when I try to approve the Astro things in the Inbox:

22:19:17.416 [WARN ] [ig.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type astro:moon.
22:19:18.901 [WARN ] [ig.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type astro:sun.

Maybe the other @maintainers know of a change causing these issues?

Maybe it’s better to start a new topic for this problem?

@wborn
@J-N-K

I’ve tried snapshot 1703, same issues!

openhab> bundle:list|grep Waiting
133 │ Waiting │  80 │ 2.5.0.201909290301    │ openHAB Core :: Bundles :: Core
166 │ Waiting │  80 │ 2.5.0.201909290307    │ openHAB Core :: Bundles :: Model Persistence
181 │ Waiting │  80 │ 2.5.0.201909290306    │ openHAB Core :: Bundles :: Persistence

.
And AmazonDashButton:

12:41:29.359 [WARN ] [pcap4j.packet.factory.PacketFactories] - No PacketFactoryBinder is available. All packets will be captured as UnknownPacket.

But that looks, good. This error message should probably be suppressed but IIRC we had that always, even in the working versions.

No. No DashButtons are discovered.
Adding manual is possible. But no packages are discovered.

Same thing on my side with build #1703, Astro and many core bundles stays Waiting