How To Make Custom Wia Notification
A nifty trick that can be done if you have a smartphone and Wia account is a notification system. You have a lot of control to customise when you receive notifications on your devices.
- Account on Wia
- Smartphone and Computer or Tablet
- Account at Wia
You will need to be registered and /or logged in to your Wia account at https://www.wia.io/.
- Set up your Dot One
You will need to have a set up Dot One and you can find the tutorial on how to do that Here.
- Set up your code project
Now you will need to create a space and then a block project on your Wia Dashboard
Setting up your flow
- Now that you have an account and the app on your smartphone or tablet you need to make the flow that will trigger a notification to be sent to selected devices.
- Create a flow and drag a Timer node, found in the Trigger tab under Wia into the workspace
- Then in the settings of the Timer node you can select when you would like to receive the notification as seen in figure 2.
Now if you want to choose day of the week drag a Run Function node, found in the Logic tab under Wia, into the workspace and paste the following code into the run function.
var d = new Date();
var sunday = 0;
var monday = 1;
var tuesday = 2;
var wednesday = 3;
var thursday = 4;
var friday = 5;
var saturday = 6;
if (d.getDay() == friday)
output.process = true;
output.process = false;
Next drag a Notification node, found in the Action tab under Wia, into the workspace and select who from your space you would like to receive the notification and what it says as seen in figure 3.
Note: you have to make sure that notifications on your device are enabled in your settings otherwise you will not see these notifications
If you would rather receive a text or some other form of message feel free to use any of the other nodes.
* Now connect the nodes as seen in figure 4 and you're all set!.