<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Magesh Vadivelu on Medium]]></title>
        <description><![CDATA[Stories by Magesh Vadivelu on Medium]]></description>
        <link>https://medium.com/@magesh?source=rss-ba1e8cfc1be7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pelePilbPqQupAlG.jpg</url>
            <title>Stories by Magesh Vadivelu on Medium</title>
            <link>https://medium.com/@magesh?source=rss-ba1e8cfc1be7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:37:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@magesh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hack Amazon’s dash button to play your favorite Spotify playlist]]></title>
            <link>https://medium.com/@magesh/hack-amazon-s-dash-button-to-play-your-favorite-spotify-playlist-4f8b48bb6c47?source=rss-ba1e8cfc1be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f8b48bb6c47</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[dashbutton]]></category>
            <category><![CDATA[amazon]]></category>
            <dc:creator><![CDATA[Magesh Vadivelu]]></dc:creator>
            <pubDate>Thu, 10 Sep 2015 20:38:36 GMT</pubDate>
            <atom:updated>2015-09-10T20:52:17.095Z</atom:updated>
            <content:encoded><![CDATA[<p>This hack was inspired by Ted Benson’s article on Medium <a href="https://medium.com/@edwardbenson/how-i-hacked-amazon-s-5-wifi-button-to-track-baby-data-794214b0bdd8">here</a></p><h3>For tl;dr folks</h3><p>Jump to summary of files below.</p><h3>Requirements</h3><ol><li>Amazon dash button</li><li>Amazon prime account</li><li>Spotify installed on Ubuntu</li><li>Familiarity with command line, shell script and python</li></ol><h3>Order a dash button</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*noKIYTKYkhQkheRF.png" /></figure><p>If you don’t have one, order an amazon dash button. Its $5 button, sold by amazon. For this hack I used “Tide” dash button. Any button will do the trick. You can borrow one from your friend too! You will require an amazon prime account only for the first couple of steps in this hack.</p><h3>Unpack and setup</h3><p>Go through the amazon dash button setup as suggested by amazon. Connect your dash button with wifi but do not set which “Tide” product to order, so the dash button is left with no choice.</p><h3>ARP probe</h3><p>Ted Benson’s idea is to run a python code on your computer which also is connected to the same network as the dash button. That python code will look for an ARP probe from the dash button. Here is the github gist of the python code I modified for my use</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e019b8d8e1ab51caa27a724db1684df/href">https://medium.com/media/0e019b8d8e1ab51caa27a724db1684df/href</a></iframe><p>Explanation for above code: Run the code and push the dash button. Since the code does not know your mac address, it will print out “ARP Probe from unknown device: your-macaddress” Copy your mac address and replace it on the first if condition Now run the code again and press the dash button. You will see “You pushed Tide button”</p><h3>Permissions ERROR</h3><p>I had to run the python code as ‘sudo’ but had problems while setting up Spotify. Run the following commands to setup proper permissions, so you don’t have to run as sudo. sudo setcap cap_net_raw=ep /usr/bin/python2.7 sudo setcap ‘CAP_NET_RAW+ep CAP_NET_ADMIN+eip’ /usr/bin/python2.7 sudo setcap ‘CAP_NET_RAW+eip CAP_NET_ADMIN+eip’ /usr/sbin/tcpdump Your ARP probe setup is now complete</p><h3>Setting up Spotify</h3><p>Install Spotify for ubuntu if you don’t have one. Open the application and leave it open. Get this command line utility to trigger playlists, written by <a href="https://gist.github.com/wandernauta">wandernauta</a> <a href="https://gist.github.com/wandernauta/6800547">https://gist.github.com/wandernauta/6800547</a> Copy the gist and save it as sp.sh in the same folder as your above ARP probe code Now see if the sp.sh shell script is working. Run “./sp.sh play” Now see if you can play one of your favorite play list. Open spotify and scroll to your favorite play list, right click it and hit “Copy Spotify URI” Example command: Run “./sp.sh open spotify:user:billboard.com:playlist:6UeSakyzhiEt4NB3UAd6NQ” Now spotify must play the first song of the playlist Now save the above command in a file named “callsp.sh” on the same folder. This file will serve as your caller shell script. You can see my file here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f8d545bb5de968a560cbdfa9b17044e/href">https://medium.com/media/9f8d545bb5de968a560cbdfa9b17044e/href</a></iframe><h3>Summary of files</h3><p>Now you have all the 3 files you need on the same folder:</p><p><a href="https://gist.github.com/caltrain/91f6353b728babca5bba">dash-arp.py</a> (Configured with your dash button’s mac address)</p><p><a href="https://gist.github.com/caltrain/9e63238eb501138c13b2">callsp.sh</a> (Configured with the Spotify URI of your choice)</p><p><a href="https://gist.github.com/wandernauta/6800547">sp.sh</a> (No modifications needed)</p><h3>Run your code</h3><p>Run this command on your command line python dash-arp.py</p><h3>Now press the button</h3><p>Now take a few steps away from your computer, call your Friend/Girlfriend/wife/Kid and ask them to press the button.</p><p>Song will play. Tide will not be ordered</p><p><em>Originally published at </em><a href="http://mageshkhanna.blogspot.com/2015/08/hack-amazon-dash-button-to-play-your.html"><em>mageshkhanna.blogspot.com</em></a><em> on September 10, 2015.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f8b48bb6c47" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>