Please tell me your Amazon Dash Button MAC Vendor prefix

Hi everyone,

I have developed an Amazon Dash button bindung for OH2 (GitHub). In order to improve the discovery process I would like to know the vendor prefix of your Amazon Dash Button’s MAC address.

I just need the frst three segments of the MAC address. So if the MAC address is FC:FB:FB:01:FA:21, you just have to post FC:FB:FB.

Additionally it would be helpful to get to know where (Country) and when you bought your Amazon Dash Button.

So, I start with my device:
ac:63:be, Germany, 05 Sept 2016

Thanks for contributing!

Kind regards
Oliver

Hi,

50:f5:da, Austria, 3. Sept 2016

Kind regards
Manfred

74:c2:46 and 74:75:48, about a year after they first came out in the U.S.

If you submit this to be included in the distro as an officail binding, make sure you make it very clear in the docs that this will require reconfiguring openHAB to run as root.

Also, typically the native libraries that are required come packaged with the binding and do not require the user to install something separately.

Thanks!

I mentioned this in the README.md

As mentioned there you do not have to run openHAB as root if you grant CAP_NET_RAW and CAP_NET_ADMIN to the java command which executes openHAB.

I don’t think that is reasonable as it depends on the os you use. I think it’s absolutely valid to define the installation of the native library as a prerequisite.

See the Bluetooth Binding as an example of one that comes with the native libraries.

50:F5:DA, Germany, 02.09.2016

f0:27:2d US mid-2016

Ok, thanks for the hint. I will have a look at the binding.

My Dashbutton starts with AC:63:BE (Germany).
Could you provide the addon for download or send it to me by mail? I don’t know how to compile it by myself…

Thank you

Michael

I uploaded it to https://ufile.io/433.

Great. Thank you!
Works perfect.

ac:63:be - US - mid 2016
44:65:0d - US - mid 2016

Rather than doing network sniffing I had the option with my router to do something on DHCP requests http://somnambulistic-monkey.blogspot.co.uk/2016/07/yet-another-amazon-dash-button-post.html

to get Dash-Button to work, I used the command that I found here:

sudo setcap cap_net_raw,cap_net_admin=eip /usr/lib/jvm/java-8-oracle/jre/bin/java

without knowing, what it does…

Now I get new errors when starting OH2:

2016-10-01 15:54:00.283 [ERROR] [nding.network.service.NetworkService] - Cannot use DHCP listen: Permission denied

Tried to fix it with another command, I don’t understand:

sudo setcap cap_net_bind_service=+ep /usr/lib/jvm/java-8-oracle/jre/bin/java

But didn’t work…

Now it seems, that the Z-Wave-Binding doesn’t call the zwave-device-database anymore.
Before the commands it worked?!?

2016-10-01 15:54:14.492 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet, use default value: null
2016-10-01 15:54:14.493 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet6, use default value: null
2016-10-01 15:54:14.494 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.packet, use default value: null
2016-10-01 15:54:14.494 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.link, use default value: null
2016-10-01 15:54:15.998 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.dlt.raw, use default value: null
2016-10-01 15:56:07.935 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:70d54c3f:node2' to inbox.
2016-10-01 15:56:20.896 [WARN ] [wave.discovery.ZWaveDiscoveryService] - NODE 2: Device discovery could not resolve to a thingType! 7FFFFFFF:7FFFFFFF:7FFFFFFF::0.0

What is the setcap? Can I revert to the state before for testing?

44:65:0d - UK - 29/09/2016
50:f5:da - UK - 29/09/2016

Got the same problem, “Cannot use DHCP listen: Permission denied (Bind failed)”

I tried the setcap command on my Raspberry Pi without any problem.

I uploaded a sample application which just lists all devices found by pcap4j. You can download it here: https://ufile.io/72113

Just start with

java -jar pcap4j-sample-0.0.1-snapshot-jar-with-dependencies.jar

It should list all available devices. If no device is displayed the openHAB2 binding won’t work.

Cannot get it to work either (Raspberry Pi, raspbian)

What I did:

sudo setcap cap_net_raw,cap_net_admin=eip /usr/lib/jvm/java-8-oracle/bin/java

openhab.log:

2016-11-02 16:25:51.007 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.link, use default value: null
2016-11-02 16:25:51.211 [ERROR] [nal.pcap.PcapNetworkInterfaceService] - An exception occurred while calling onPcapNetworkInterfaceAdded for org.openhab.binding.amazondashbutton.internal.discovery.AmazonDashButtonDiscoveryService@64c162
java.lang.RuntimeException: org.pcap4j.core.PcapNativeException: lo: You don't have permission to capture on that device (socket: Die Operation ist nicht erlaubt)

Any ideas?

Edit: output from sample application:

8 Devices found:
eth0 (192.168.2.237, fd00:0:0:0:ec03:f2b7:c580:32e2, fe80:0:0:0:cc13:7303:fe0b:5efd)
any (Pseudo-device that captures on all interfaces)
lo (127.0.0.1, 0:0:0:0:0:0:0:1)
wlan0 (fe80:0:0:0:991a:d12c:ffca:b278)
bluetooth0 (Bluetooth adapter number 0)
nflog (Linux netfilter log (NFLOG) interface)
nfqueue (Linux netfilter queue (NFQUEUE) interface)
usbmon1 (USB bus number 1)

@sihui, do you get the same error, if you run openHAB as root?

Part of it (but now the dash button shows up in the inbox!):

2016-11-02 19:38:37.631 [WARN ] [org.pcap4j.util.PropertiesLoader    ] - [org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.dlt.raw, use default value: null
2016-11-02 19:38:56.915 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'amazondashbutton:dashbutton:ac-63-be-62-be-f5' to inbox.

So it works? What happens after you added the thing which is displayed in the inbox?