What's new

[Amazon Dash Button - DNSMASQ Problem]

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

StefanP

New Around Here
Hello,

i have buy for few days my ASUS AC88U Router and flash them with "asus merlin".
Network Speed is on 2.4 and 5.0 GHZ Band perfectly.

I have found a Amazon Dashbutton its connect to 2.4GHZ and block internet access.
I found few "scripts" to load a action when the Button is pressed but DNSMASQ give me an error and
the few wlan devices cant login into wlan.

May 5 07:17:16 custom_config: Appending content of /jffs/configs/dnsmasq.conf.add.
May 5 07:17:16 dnsmasq[3182]: illegal repeated keyword at line 42 of /etc/dnsmasq.conf
May 5 07:17:16 dnsmasq[3182]: FAILED to start up

On:
/jffs/configs/dnsmasq.conf.add file with this line :
dhcp-script=/jffs/a/post-lease.sh

On:
/jffs/a/post-lease.sh
#!/bin/sh
# just for testing
# touch /tmp/0_script_test
NowLeasedMac=$2
if [ “$NowLeasedMac” == “10:B3:32:42:55:62” ]; then
#Do what you want here when dashbutton pressed.
#e.g. I switch on-off my squeezebox player.

wget http://10.10.1.204/cm?user=demo&password=demo&cmnd=Power Off
echo “Caught !”
fi


Its a Sonoff behind with the cm? command to put it offline when is online.

Cant help me? Thanks
 
May 5 07:17:16 dnsmasq[3182]: illegal repeated keyword at line 42 of /etc/dnsmasq.conf

Because /etc/dnsmasq.conf (default dnsmasq config file) already contains a 'dhcp-script=' directive in it
 
If you are using a dedicated DASH button Amazon discontinued supporting them several months ago at least in the USA. They no longer work. They are electronic trash now.

If you log into your Amazon account you can still use virtual DASH buttons but Amazon really wants you to ask Alexa to get you what you need

To bad as my wife really liked the real buttons.
 
Because /etc/dnsmasq.conf (default dnsmasq config file) already contains a 'dhcp-script=' directive in it

Can you help me to fix the problem?
When the button is pressed than call with wget the "tasmota" url to activate oder deaktivate the light.

@CaptainSTX
Yes you have right, the Amazon Dashbutton is deactivated and electronic trash now.
When you connected to amazon and press the button to order -> is trash now
When you only have connected to your wlan and close the setup you can use the dashbutton to any "action" when sniff or filter the mac of the dashbutton.

Big thanks for your replay. I hope you can help me to integrated the "dash" button for the sonoff action.
 
Can you help me to fix the problem?
When the button is pressed than call with wget the "tasmota" url to activate oder deaktivate the light.

Not I at the moment. Maybe @ColinTaylor or another site guru might have an idea.

If I understand right, when you press the button is when the 'Dashbutton' connects to the router, then disconnects after X secs Im guessing, and you are trying to execute a script when then Dashbutton connects?
 
There may be a way to edit the dhcp-script file called in the /etc/dnsmasq.conf but likely not otherwise Id think there'd be a thread around about it
Many use 'dnsmasq.postconf' to plug-in their custom script:

e.g. this is mine
Code:
# v384.9 (Feb-2019) ASUS now uses dnsmasq directive:
#    dhcp-script=/sbin/dhcpc_lease
if [ $FIRMWARE -ge 38409 ];then
    pc_replace "dhcp-script=/sbin/dhcpc_lease" "dhcp-script=/jffs/scripts/DHCP_LeaseTracker.sh   # Request my dhcpc_lease script" $CONFIG
fi
then simply call '/sbin/dhcpc_lease' at the end of the custom script.
 
Last edited:
Can you help me to fix the problem?
When the button is pressed than call with wget the "tasmota" url to activate oder deaktivate the light.

Remove the following line from 'dnsmasq.conf.add'
Code:
dhcp-script=/jffs/a/post-lease.sh
then create

/jffs/scripts/dnsmasq.postconf
Code:
pc_replace "dhcp-script=/sbin/dhcpc_lease" "dhcp-script=/jffs/scripts/post-lease.sh   # Request my dhcpc_lease script" $CONFIG
then add the call to the ASUS utility '/sbin/dhcpc_lease' to the end of your custom script

/jffs/scripts/post-lease.sh
Code:
#!/bin/sh

NowLeasedMac=$2

if [ “$NowLeasedMac” == “10:B3:32:42:55:62” ]; then
   #Do what you want here when dashbutton pressed
   #e.g. I switch on-off my squeezebox player.
   wget http://10.10.1.204/cm?user=demo&password=demo&cmnd=Power Off
   echo “Caught !”
fi

/sbin/dhcpc_lease $@
 
Last edited:
Thanks for your posts but
@Martineau:

Apr 20 17:05:02 dnsmasq-dhcp[330]: DHCPREQUEST(br0) 10.10.10.77 aL:58:bE:62:3C:L0
Apr 20 17:05:02 dnsmasq-script[330]: connect error: No such file or directory
Apr 20 17:05:02 dnsmasq-script[330]: [SEND_AMAS_NODE_EVENT:(4684)] ERROR connecting:No such file or directory.

Asus-Merlin Router Version: ASUSWRT-Merlin RT-AC88U 384.16_1-geda9010451
 
Thanks for your posts but
@Martineau:

Apr 20 17:05:02 dnsmasq-dhcp[330]: DHCPREQUEST(br0) 10.10.10.77 aL:58:bE:62:3C:L0
Apr 20 17:05:02 dnsmasq-script[330]: connect error: No such file or directory
Apr 20 17:05:02 dnsmasq-script[330]: [SEND_AMAS_NODE_EVENT:(4684)] ERROR connecting:No such file or directory.

Asus-Merlin Router Version: ASUSWRT-Merlin RT-AC88U 384.16_1-geda9010451
Thanks for reporting this, but please search the forum, first reported 4 months ago.
 
Last edited:
Thanks for reporting this, but please search the forum, first reported 4 months ago.

Sorry to you, but i found only topics with the same probem but no with the fix and in beta versions but nothing answers to this problem :(

The search give me no more related and fixed tipps.

It's not only the dash button on every wlan client this message is reapeating it in the logfile.
Can you give me a tipp or link to fix it - i found it not :(
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top