Neodymium Plated Magnet

    pimatic-dash-button

    0.2.1 • Public • Published

    Build Status Version downloads

    pimatic-dash-button

    pimatic-dash-button is a pimatic plugin that enables Amazon's dash button to be used as push button device.

    Installation

    Since this plugin uses node-pcap, libpcap-dev must be installed on a raspberry pi:

    sudo apt-get install libpcap-dev
    

    To install the plugin just add the plugin to the config.json of pimatic:

    {
      "plugin": "dash-button"   
    }

    This will fetch the most recent version from npm-registry on the next pimatic start and install the plugin.

    Dash Button installation

    Follow the instructions in the Amazon app to configure your button, to connect to your wifi but don't select a product in the last step. Just exit the app. Optionally disable the internet access for your dash button in your router configuration, otherwise the Amazon app might complain the incomplete setup of your dash button, every time you press it.

    Configuration

    pimatic-dash-button supports the device discovery feature of pimatic (as of version 0.9.x). To create a new dash button device, just click on "Discover devices" in the Devices section of pimatic. Once the discovery mode is on, press the dash button and it should show up as a new discovered device. If you have any issues discovering your dash button please report here.

    To manually add a dash button to your configuration just add it to the devices section including the mac address:

    "devices"[
      {
        "id": "dash_button",
        "class": "DashButtonDevice",
        "name": "Dash Button",
        "address": "aa:bb:cc:dd:ee:ff"
      }
    ]

    If you have multiple network interfaces on your hardware and pimatic has issues finding your dash button, then configure the plugin to explicitly to use a defined interface.

    {
      "plugin": "dash-button",
      "interface": "eth0"   
    }

    Sponsoring

    Do you like this plugin? Then consider a donation to support development.

    PayPal donate button Flattr pimatic-dash-button

    Changelog

    0.2.0

    • #7 Normalize MAC address
    • #6 Extend vendor mac ids

    0.1.0

    • #2 Dash button device acts like a ButtonsDevice now, fixes issues with pimatic-mobile-frontend. Device can now be used in UI, too.
    • #3 Decreased buffer size of pcap to 1 MB
    • #4 Filtering for mac addresses directly in libpcap on kernel level

    0.0.2

    • bugfix for mac address filtering

    0.0.1

    • initial release

    Credit

    Most of the dash button discovery code was inspired by node-dash-button and node-pcap.

    Keywords

    none

    Install

    npm i pimatic-dash-button

    DownloadsWeekly Downloads

    16

    Version

    0.2.1

    License

    none

    Last publish

    Collaborators

    • michbeck100