Software apps and online services
Hand tools and fabrication machines
Disclaimer: right now my projects on Hackster.io are not 100% polished. Especially when it comes to the iOS app. For the time being I want to focus on creating two more projects before I'll sit down and nail the iOS app and the Proxy server.The Story
Because of my successful first project on Hackster.io called IoT Garage Opener, I decided to continue this Internet of Things journey.
Todays technology like Particle, cheaper parts and an insane amount of grate tutorials on-line. I decided to finally build some home automation solutions.
The purpose of this project is to collect the water used in a house or apartment while storing the usage in a database.
The data can be then read using the iOS app that I built for the IoT Garage Opener.
This is project is an extension of the original IoT Garage Opener, which means that additional information related to the iOS App, Firmware and NodeJS Proxy can be found there. The IoT Garage Opener is the hub for my Home Automation projects.Why The NodeJS Proxy?
This project is very differed from the Garage Opener. The data is being saved to Parse.com straight from Particle. Where in the IoT GarageOpener, the new entries in the database where created on the iOS device using the Parse iOS SDK.
This project on the other hand is more a data logger then an action trigger. Which means that we wait for water to flow, collect the data, and send it to Parse.com.
For this to happen we need to make RESTfull API calls.
This can be done using the Webhook feature that Particle is providing. But, as you can imagine there is an issue. For some reason people at Particle decided to add additional data to the JSON blob that you send out. Because of this, Parse is unable to process the incoming request.
You can read more about this issue in this forum post. One of the developer sed it will work to fix this issue but the time frame is known. Because of this, I decided to just write the proxy.Heroku Hosting
As described in the previous section. We have a NodeJS app that needs to be hosted somewhere. I choose Heroku, but you can use whatever you want. Even put the app on your local server at home.Liquid Flow Meter
For this project I bought two Liquid Flow Meter - Plastic 1/2" NPS Threaded. They are very cheap and grate for prototyping but you need to be aware that this sensors are not very precise. But for personal use they are perfect.
Something worth knowing
- False reads: sometimes vibrations can trigger the sensor. For example slamming the door cabinets might give you a read of 3 do 15ml.
- Locking: the built quality of this sensor is not great, and for example one of the sensors that I have, can generate a constant read of 1ml. This makes it impossible for our code to sum up the usage. As far as the code goes, it thinks that water is constantly flowing.
This are the step needed to make the project work
- Connect the water flow sensors as seen in the diagram below.
- Upload the firmware for Particle found on the Particle branch.
- Upload the Proxy app (found on the particle2parse branch) on to Heroku or another hosting place.
- Create an account at Parse.com and put the AppID and API Key in the secrets.js file of the Proxy app. Check the README file from the particle2parse branch.
- Upload the Particle Webhook (ParticleWebhook.json) found in the Particle branch. You can read more about Webhooks on in the documentation section of Particle
- Power up Particle and start logging your water consumption.
If you've enjoyed this article/project, please consider giving it a 🌟. Also check out my GitHub account, where I have other articles and apps that you might find interesting.Where to follow
You can follow me on social media 🐙😇, at the following locations:More about me
I don’t only live on GitHub, I try to do many things not to get bored 🙃. To learn more about me, you can visit the following links: