HomeHome Automation"Dinner time!!" button using Amazon Dash

“Dinner time!!” button using Amazon Dash

Hey all! It's dinner time!

The AmazonDash buttons have a very niche use. I have 10 of them at home, and I’m yet to order anything from Amazon using buttons. All caused by how easy is to link the buttons to NodeRED and use it for anything you want. After reading some questions, I decided to revisit the Doorbell project and put a little spin on it. I’m going to create “Dinner time!!” button using Amazon Dash.

Whether you want a WiFi Doorbell or a “Dinner is ready” button in the kitchen, the working principle remains the same. Once the button is pressed, a notification is issued to a device (or devices). You will know that someone is at the door, or that the dinner is ready and you should stop whatever fun thing you have been working on and head back to have some food.

I’m going to use Join app, and Join Node to deliver notifications to the Android devices (sorry Apple fans, but sucks to be you this time!). If you don’t have the Join app – it’s awesome! Be sure to check how to add AmazonDash to NodeRED before you continue.

To get the Join Node ready – follow this setup guide!

NodeRED setup

If you just want a barebone notification – all you need to do is to connect the Amazon Dash and limiter node to the fully configured Join Node. I said I will put a little twist on it. I want the button to announce the correct meal times. So the notifications will be as follows:

  • 7 am – 11 pm: breakfast time
  • 12 – 4 pm: lunch time
  • 5 pm 10 pm:  dinner time

Obviously, feel free to change these times or the number of meals. You should be able to do it on your own once you complete this tutorial.

To get the formatted time in NodeRED, we need to convert the UNIX time in seconds into something easy to recognise. Turns out, there is a node for that! Install the node moment:

cd ~/.node-red
sudo npm install node-red-contrib-moment

And we will have all the tools we need for this tutorial. Thanks to this node I will be able to receive the time (hours) which I’m going to use to select the correct message and icon formatting.

To get the access to hours, I have to set the moment node to deliver object output. I’m going to save it as msg.time.

Based on this property (msg.time.hour) switch node will direct the outcome to one of the three possible outputs. Each output has a change node setting the msg.meal and msg.url as follows

  1. 7-12 Breakfast (msg.meal = breakfast| msg.url = url_to_breakfasticon)
  2. 12-17 Lunch (msg.meal = Lunch | msg.url = url_to_lunchicon)
  3. 17-22 Dinner (msg.meal = Dinner| msg.url = url_to_dinnericon)

Then, a function node will put that information together and send it using a Join node to selected devices. If you want to send the Join to devices that do not belong to your account, you will need to send the deviceId instead of the names.

var url = msg.url;
msg.title = "Kitchen Alert!"
msg.text = "Time for a " + msg.meal;
msg.devices = "Pixel,Desktop";
msg.icon = url;
return msg;

Additionally, you can add a Google Notify node to announce the call for the meal over the Google Home. To do this, just pass the msg.text as a payload(see the video):

var x = msg.text;
msg.payload = x;
return msg;

And send over it to your Google Home. You can learn more about NodeRED and Google Home Notifications here.

If you have Join added as your Chrome browser, you will be able to receive the messages on computers too.

Conclusion

As you can see, the same setup can be used for any scenario where you want a button to issue a notification  to an Android device. This includes doorbells , panic alarms and more. Additionally, you could check if the device is present on the local network before sending out the request, as the messages would reach devices that are not currently home. There is very little sense in calling someone for a dinner if they are miles away right?

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

Smart Home

Remotes aren’t done with us yet: SwitchBot Remote

0
If you hate having 20 remotes hidden in your sofa, or your parents despise talking to Alexa to turn the lights on - SwitchBot Universal Remote is here to deal with all this!

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?