Introduction: Internet Connected Remembrall

Any die-hard Harry Potter fan will remember Neville Longbottom's Remembrall. This object is described as a small, glass ball that fills with red smoke when its owner has forgotten something. Unfortunately, the Remembrall doesn't inform the owner about what they have forgotten, rendering the item fairly useless.

Because I seem to have a knack for creating useless things, I decided to create a Remembrall that ACTUALLY WORKS!!!!! This Internet Connected Remembrall functions alongside Todoist, which is a web and mobile to-do list application. After gathering the owner's data, the Remembrall turns red if due dates of uncompleted tasks have passed. While I will admit that my Remembrall isn't quite as useless as Neville's, it is sure to leave it's owner in a state of panic as they try to figure out what they have forgotten (or at least I hope it does!).

Step 1: Materials and Tools

You will need to collect the following items:


Electronics:

-Particle Photon

-SparkFun Photon Battery Shield

-Clear Red LEDs

-Resistors(6)

-Protoboard

-Male to Female Jumper Wires(4)

-Electrical Tape

-Micro USB Cable

-Polymer Lithium Ion Battery

Materials:

-3" Clear Fillable Ornament

-3" Shipping Tube

-Poly-Fill

-Hot Glue Sticks

-Sandpaper

-Puffy Paint

-18 Karat Gold Metals Premium Leafing Finish

-Blue Painters Tape

-Solder

-Rubber Bands

Tools:

-Saw

-Hot Glue Gun

-Wire Cutters

-Scissors

-Soldering Iron

Step 2: Todoist App and the Todoist API

Because this project works with the Todoist App, make (and start using!) an account on todoist.com. Todoist is very easy to create new 'time based' tasks on. When creating a new task, you can type in a specific date and time in the title, and Todoist will organize your tasks accordingly. For example, if I type in: "Buy Spell Books by Wednsday at 5pm", Todoist will move this Task under the "Wednesday" category.

Todoist also has a wonderfully documented API which can be found by clicking here. While logged in, click on the "Manage App", tab at the top of the page and click on the "Create New App" button. This will open up a new window where you will fill in the following information:

App Display Name: Spark Core

App Service URL: (leave blank)

Click the "Create" button and this will bring you to a new page. On this page you will find your "access token". If you scroll down the page a bit, you will also see a box asking for a "Webhook Callback URL". In this box write "https://todoist.com/API/v7/sync/" . Additionally under "Watched Events" check off the "items:uncomplted" box.

Next, visit the following URL and replace the "(your access token here)" text with your Access Token provided:

https://todoist.com/API/v7/sync/?token=(your access token here)&sync_token=%27*%27&resource_types=[%22items%22]

This URL will bring you to a page containing JSON data on all of your tasks. In the next step we will organize this data into information that our Remembrall can understand.

Step 3: Using MATLAB Code With ThingSpeak

ThingSpeak is a fantastic website that helps power some incredible IoT projects and web apps, including this one! To begin, make an account on thingspeak.com if you don't already have one. Next in the top navigation bar go to Channels > My Channels, and on this page click on the "New Channel" button. On this page, fill out the following information:

Name: Task Overdue

Field 1: taskoverdue

Then, click on the "Save Channel" button on the bottom of the page.

Next, click on the top navigation bar go to Apps. Under "Analytics" click on MATLAB Analysis. In the new window, click on the "New" button. On the new page that opens, select the "Custom (no starter code)" option, then click on the "Create" button.

For the name of the app, name it "Todoist", then insert the following code:

url = '(url from the previous step goes here)';

writeChannelID = (your write Channel ID);

writeKey = '(your write key)';

tempF = urlread(url);

expression = 'due_date_utc":"[a-zA-Z_0-9_ ]*:\w*';

x = regexp(tempF,expression,'match');

replace = {'due_date_utc":"'; 'Mon '; 'Tue '; 'Wed '; 'Thu '; 'Fri '; 'Sat '; 'Sun '};

newexpression = '';

DateStrings = regexprep(x,replace,newexpression);

t = datetime(DateStrings,'InputFormat','dd MMM yyyy HH:mm','TimeZone','UTC');

now = datetime('now','TimeZone','UTC');

dt = between(now,t);

tf = isbetween(t,now,'1-Jan-3000');

taskoverdue = any(tf == 0);

thingSpeakWrite(writeChannelID,[taskoverdue],'Fields',[1],'Writekey',writeKey);

There are three lines of the code above that you will need to edit. This is what you will have to do to get the following information:

url: Use your url determined in the previous step.

writeChannelID: Go to Channels > My Channels and click on the "Task Overdue" channel that you previously created. On this page you will find your "Channel ID".

writeKey: While still on your "Task Overdue" channel, click on the API Keys tab. The correct key to use is listed under the "Write API Key" section.

Once you have your code ready to go, click on the "Save and Run" button!

Step 4: TimeControl With ThingSpeak

Now we need to instruct our channel to run the MATLAB code periodically so we can continuously gather data. To do this, navigate to Apps tab, and under the "Actions" section, click on TimeControl. Click on the "New TimeControl" button and fill out the following information:

Name: Todoist Update

Frequency: Recurring

Recurrence: Minute

Every: 5 minutes

Action: MATLAB Analysis

Code to execute: Todoist

Then click on the "Save TimeControl" button. This TimeControl instructs the MATLAB code to run every 5 minutes, check Todoist.com for any overdue tasks, which returns a "0" if there aren't any overdue tasks, and a "1" if there are any overdue tasks. This information is then plotted to a graph under the "Task Overdue" channel where we can see a graph of our data as it updates.

Step 5: Twitter With ThingSpeak

Thingspeak provides easy integration with Twitter so it can tweet information about your data for you! Begin by creating a new account for your Remembrall. Next, go back to Thingspeak and navigate to the Apps tab and under the "Actions" section, click on ThingTweet. Click on the "Link Twitter Account" button and on the page that opens up, click on the "Authorize App" button.

Next, we have to make a new TimeControl app. Navigate back to TimeControl, click on the "New TimeControl" button and fill out the following information:

Name: Twitter

Frequency: Recurring

Recurrence: Minute

Every: 5 minutes

Action: ThingTweet

then tweet: It is currently %%datetime%% and Remembrall is #a%%channel_138352_field_1%%.

*replace the number "138352" with your channel ID*

using Twitter account: Select the name of your twitter account.

This TimeControl instructs TimeSpeak to automatically tweet a phrase to your Twitter account containing the current date and time (we do this because Twitter doesn't allow identical tweets), and the hashtag #a0 meaning that there are currently no overdue tasks, or the hashtag #a1 meaning that there are currently overdue tasks.

Step 6: Upload Code Using Particle Build

*Note*If you see in photos that I am using a Spark Core instead of a Particle Photon, don't fret! Both will work for this project!

If you haven't already, make an account on Particle Build and make sure your photon is connected. Next, under the <> (code) tab on the side navigation bar, click on the "Create New App" button and name the app "TODOIST". In this app, save and upload the following code to your Particle Photon:

int led1 = D1;
int led2 = D7;

void setup() {

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
Spark.function("led_on", led_on);
Spark.function("led_off", led_off);

}

int led_on(String cmd) {

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);

}

int led_off(String cmd) {

digitalWrite(led1, LOW);
digitalWrite(led2, LOW);

}

void loop() {

}

Step 7: IFTTT Recipies With Twitter and Particle

If you haven't visited IFTTT yet, you really should because it can do some really awesome things! For this project, we are going to use IFTTT to check for twitter updates so it can turn the red lights on our Remembrall on if we have forgotten to do something.

If you don't already have an account on IFTTT, create one. Next, click on the My Recipies tab in the top navigation bar, then click on the "Create a Recipe" button. Click on the word "this" and then search for the Twitter channel. Link your twitter account, and then click on New tweet by you with hashtag. Then, fill out the following information:

Hashtag: #a1

Click the "Create Trigger" button, then clock on the word "that". Search for the Particle channel, then click on Call a function. Then, fill out the following information:

Then call (Function Name): led_on on "(your photon's name)"

with input (Function Input): (leave blank)

Repeat this step by creating a second Recipe using "#a0" as your twitter hashtag and "led_off on "(your photon's name)"" as your function name. When you are done with this step, your Remembrall will now be able to read your tweets and update itself accordingly!


Step 8: Prepare Your Plastic Ornament

Your plastic ornament has a ring on each half of the top that will need to be removed before continuing. It's possible to break them off by hand, but I suggest getting an exacto knife and scoring them a few times to ease this process.

Next, sand the inside of the ornament to create a 'frosted' look. This will help to hide the electronics, diffuse the LEDs, and make the light look more similar to smoke. Run the inside of your ornament under water, take a small piece of sandpaper (I suggest using a finer grit), and begin sanding. Getting your ornament and sandpaper wet will help you sand smoothly.

Step 9: Create Your Ring

Take a ruler and measure 1/2" from the edge of your 3" mailing tube. I recommend creating a line around the entire circumference of your mailing tube to make cutting easier.

Use a saw to cut off this ring, making sure to follow the line you just drew as it's very easy to cut crooked! Cut a slit in the ring and hot glue it to the edge of your ornament half (the one with the lip on the outside). Leave about half of the ring exposed so the seam is hidden when the other half of the ornament snaps on.

As you will notice, 3" isn't quite enough to wrap around the entire ornament. To remedy this, measure the gap in your ring after you have hot glued it and cut a small piece of your cardboard ring to glue in place.

Step 10: Paint Your Ring

With your puffy paint, create small, evenly spaced dots around the ring. Once you've completed the entire circumference, let the puffy paint dry for several hours.

Next, cover your plastic ornament with blue painters tape. Using the gold leafing paint, paint your entire ring, making sure to get all of the edges. You will need to apply several coats of this paint (probably about 3 or 4), especially around the puffy paint.

While you are waiting for paint layers to dry, it helps placing your Remembrall in a cup so you don't get paint on any of your work surfaces.

Step 11: Solder Your Electronics

Using protoboard, solder 3 LEDs with the appropriate resistors in parallel with each other. Solder the female sides of two male to female jumper wires onto the protoboard, one on the positive(+) side of the circuit, and one on the negative(-) side. Repeat this process a second time on another piece of protoboard.

When soldering onto protoboard, leave all of the legs and pins of your electronics long until you are done with all the soldering. When complete, use wire cutters to cut everything down as short as possible (we will be a little tight on real estate in our Remembrall so this is very important!). I also recommend using a 3V battery to test your circuit to make sure it works before moving along.

When you have confirmed that everything is working as intended, take some electrical tape to wrap around the back of your protoboard to insulate your solder.

Step 12: Attach Electronics

Attach your Photon and your Lithium Ion battery to the battery shield. Next, attach your protoboards by making the following connections to the pins on your battery shield:


Protoboard #1 -

Positive(+): D1

Negative(-): GND

Protoboard #1 -
Positive(+): D7

Negative(-): GND

Finally, the most glamorous, well thought out step of all! (Can you hear the sarcasm in my voice?) Stack your electronic components on top of each other and secure them with some rubber bands or in my case, hair ties. It looks a little crude, but hey, it works!

Step 13: House Your Electronics

We are going to use some poly-fill to further hide our electronics, diffuse the LEDs and create the illusion of smoke. Begin by taking a thin piece of poly-fill and covering the inside of half of the plastic ornament. Insert your "electronic bundle" with one of the LED sides down.

Next, put poly-fill in the other half of your plastic ornament. Then, you can close up your Remembrall and admire what you've just created!

Step 14: Hooray You're Done....and Some Thoughts on Expanding This Project!

Well done! If you've come this far you have completed some thing totally awesome with unbridled potential to be almost entirely useless!

While this Remembrall only informs you when you've forgotten to do something from your Todoist app, there are so many other applications and internet connected items that you could potentially incorporate with this project!

Some ideas are as follows:

-Connect a Parrot Flower Power sensor to alert you when you've forgotten to water your plants.

-Tile, a lost item locator can alert the Remembrall when you're out or range of important objects like your keys or wallet.

-Use IFTTT to alert you when you've forgotten to respond to emails or phone notifications.

As you can see, the possibilities are endless!

Heroes and Villains Contest

Runner Up in the
Heroes and Villains Contest

Halloween Props Contest 2016

Second Prize in the
Halloween Props Contest 2016

Wizarding Contest

First Prize in the
Wizarding Contest

Maker Olympics Contest 2016

Participated in the
Maker Olympics Contest 2016