Ive been using an Amazon dash button to control smart led lights Via this postlease.sh script:
#!/bin/sh
logger "amazon script running"
NowLeasedMac=$2
if [ "$NowLeasedMac" == "xx:xx:xx:xx:xx:xx" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/xxxx"
logger "amazon script triggered"
fi
#
If I wanted to add another Amazon dash button to control a second light, how would I modify the script to do it? I tried the following but it didn't work.
#!/bin/sh
logger "amazon script running"
NowLeasedMac=$2
if [ "$NowLeasedMac" == "xx:xx:xx:xx:xx:xx" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/xxxx"
logger "amazon script triggered"
fi
if [ "$NowLeasedMac" == "Aa:Aa:Aa:Aa:Aa:Aa" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/Aaaa"
logger "amazon script 2 triggered"
fi
#
What am I missing? thanks
#!/bin/sh
logger "amazon script running"
NowLeasedMac=$2
if [ "$NowLeasedMac" == "xx:xx:xx:xx:xx:xx" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/xxxx"
logger "amazon script triggered"
fi
#
If I wanted to add another Amazon dash button to control a second light, how would I modify the script to do it? I tried the following but it didn't work.
#!/bin/sh
logger "amazon script running"
NowLeasedMac=$2
if [ "$NowLeasedMac" == "xx:xx:xx:xx:xx:xx" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/xxxx"
logger "amazon script triggered"
fi
if [ "$NowLeasedMac" == "Aa:Aa:Aa:Aa:Aa:Aa" ]; then
wget "https://maker.ifttt.com/trigger/xxxx/with/key/Aaaa"
logger "amazon script 2 triggered"
fi
#
What am I missing? thanks