Software apps and online services
This is my submission for the Are you an IoT jedi? competition and my first Hackster/Arduino project.What Han needs it for
Han Solo is constantly running around the galaxy, helping out friends on missions of galactic importance, or just ripping off criminals at their own game. Sometimes both at the same time. He scrapes by on his good looks and skills with a blaster, but he's hardly rich (He was for a time after saving Princess Leia, but that didn't last long with his gambling habits). To save every penny the Millennium Falcon needs an upgrade, as the heating costs a fortune. He and Chewie managed to scrap together a simple heating saver, and I got my hands on the blueprints.What I need it for
I'm an Android developer living in an small house in Denmark. The winters get damn cold here, and last a good two thirds of the year. It annoys me greatly to have to leave the heating on all day when I'm at work, wasting energy. If I don't however the house is freezing by the time I get home, and takes a long while to heat back up again. I'm not going to pay out for an expensive smart heating system as I'm only renting, so I thought I'd hack my own solution.What does it actually do?
With this project I can check the temperature with both the LCD screen in the house and from the Android app anywhere else, and control a servo from the app to flip the switch on my boiler to cut off the heating in my place. This lets me switch off the heating from the app as I leave the house, and switch it back on again an hour or two before I get home so it's nice and toasty by the time I get back.
In more technical terms I have a Particle Photon reading the temperature from a DHT22 sensor, publishing the data to Particle's cloud to be read and exposing a method/function to control a Servo to toggle the knob on my boiler. The Android app simply sends HTTP requests to the Particle backend to get the data and call the method in the Photon firmware.How to get started
To get started download everything from the linked "Arduino code" folder in the Github repository. Inside you'll find .ino, .cpp and .h files which make up the the projects I've made so far. For this specific project you want the files inside HardwareHacks/Photon/CloudTemp/v5 and HardwareHacks/Photon/Home Android App. Unfortunately any link to a Github repo redirects to the root, so I can't link the specific directories.
The image attached below details the circuit you'll need to make to get hardware all hooked up.
I personally used Particle's Dev IDE based on Githubs Atom IDE to compile and run the Arduino code. You can instead copy paste the code into files with the same name in Particle's online editor, though you will need to find and link the libraries used in the .ino file using the online library helper (I'll look into the changes needed and update the file with directions as soon as I can).
When you get the Arduino code up and running you'll have a pretty sweet home thermometer with humidity reading on an LCD display.The Android app
The Android app is found in the HardwareHacks/Photon/Home Android App/releases/ directory of the linked Github repository. To install it, first go into Settings on your Android phone, the Security > Allow Unknown Sources and turn it on. This is to allow you to install an app that doesn't come from the Google Play Store. I may upload it to the Store eventually, but for now I'll keep it here as it's under development and limited to a very small audience.
(There is no security risk with the app I've made, you can go through the entire source code in the linked repository. But if that isn't enough to convince you you can just build it yourself from the code if you know how.)
Once you've enabled Unknown Sources in your settings, simply download and install the app.
The first time the app runs it will ask for your Particle account details. These details are only ever stored on your phone, and never shared with anyone. I've added a menu item to be able to change them at a later date as well.
Feel free to comment with any issues you have or things that need clarifying and I'll do my best to help as I can.