Project tutorial
Arduino Habitica Daily Tasks Client

Arduino Habitica Daily Tasks Client © GPL3+

This device retrieves your uncompleted daily tasks from the Habitica server and lets you tell Habitica when you complete a certain task.

  • 3,027 views
  • 0 comments
  • 9 respects

Components and supplies

Apps and online services

Microsoft azure logo 7qghkhuibq
Microsoft Azure
Communication goes through my web app which is hosted on Azure.
Vs2015logo
Microsoft Visual Studio 2015
I wrote the sketch on Visual Studio, using Visual Micro extension. It's great.
10
Microsoft Windows 10

About this project

What is Habitica?

"Habitica is a free habit building and productivity app that treats your real life like a game."

You enter your to-do items, daily tasks, the habits you want to strengthen or avoid. You tell it when you do an item using the website or one of their mobile apps. You earn xp and gold which is used for your in-game character.

Your in-game character improves with xp and you can buy items for your character with the earned gold.

What does the Device Do?

The device I made connects to the Habitica server, gets the user's uncompleted daily tasks, shows them on the LCD screen and shows the count on the 7-segment digit display. The user can select the task they completed and tell the server they completed that task. Then the device shows the user their current gold amount and shows the uncompleted daily tasks again.

It automatically checks the server for uncompleted daily tasks every one minute after it is last checked. The time between checks can be easily increased by increasing the value of checkServerEveryXMilliseconds variable in the sketch.

I must inform you that all the communication goes through the web app that I made and hosted on Azure.

One reason for that is Habitica API only accepts https requests. The Arduino MKR1000 can make https requests, but it didn't work with Habitica's certificate. An Arduino representative told me that the problem is with the Atmel chip.

Even if I was able to send https requests from the Arduino to the Habitica server, I wouldn't be able to handle the response using C++. My web app greatly simplifes the response which makes it possible for me to handle it in C++.

Before you Use It

Search for "//ENTER INFO" in the sketch, fill the necessary fields and you can start using it. Maximum number of daily tasks you can have is nine. Please keep your total daily task count below ten or the device won't work properly.

SECURITY WARNING: The device sends your Habitica API credentials to my web app(without https). That means your Habitica API credentials will be visible to people who can see your network traffic and me. The code of the web app that I made is on github. I won't look at or store your info. And I don't think anyone will care about getting your Habitica API credentials.

You should also know that I hosted the middleman web app on Azure, using the free tier. It goes to sleep when it's not being used for a while. That means the first request can take up to 30 seconds to complete but after the web app wakes up, it's really fast.

The Video


Code

Middleman Web App
You don't need to do anything with this. It's already working on Azure. Your Arduino board will communicate with Habitica through this web app. This is only for you to see the code.

Custom parts and enclosures

Inkscape file for the front cover
Print and cut
drawing.svg

Schematics

Schematics
Habitica%20client%20schematics

Comments

Similar projects you might like

Azure Stream Analytics saving lives!

Project tutorial by Asad Zia

  • 6,665 views
  • 3 comments
  • 28 respects

IoT PCR: Low Cost DNA Replication Connected to the Internet.

Project showcase by kemfic

  • 8,592 views
  • 0 comments
  • 29 respects

PlantAnalyzer

Project in progress by Ryan Michaud

  • 8,444 views
  • 3 comments
  • 33 respects

Alzheimer's Assistant

Project tutorial by Abdullah Sadiq

  • 22,128 views
  • 19 comments
  • 90 respects

GPS Datalogger, Spatial Analysis, and Azure IoT Hub.

Project tutorial by Shawn Cruise

  • 18,283 views
  • 4 comments
  • 70 respects

Program MKR Over-the-Air + Goodies: Voice Control, etc.

Project tutorial by Team Flower Platform

  • 10,233 views
  • 7 comments
  • 37 respects
Add projectSign up / Login