Utilizing a Raspberry Pi and some cheap components to create a $150 home automation system.
Using Flask and JQuery, a friend helped me out with automating capturing the 433mhz signal from remotes so you don't have to manually add them in the code.
Basically the Flask starts a webserver when you click n the add button, the code executes the RFSniffer.cpp binary and receives the data when a signal is received, then displays it to the webpage. Still have to finish the code for adding the data to the MySQL db , but thats the easy part.
So I received an official 7" touch display for xmas. Even though it's $60, it brings my total cost over 200$ for the project. But I thought it would be an awesome addition to the project because you don't have to whip out your phone just to control everything. I's a pretty sweet 800 x 480 10 point capacitive touchscreen display all you need to do is connect the DSI ribbon cable and feed ground/5v from the Pi's GPIO pins. Im thinking starting the browser in kiosk mode should suffice once I finish the node.js interface. The only issue I havent resolved was to power down the screen fully when the Pi shutdowns. If anyone knows how to let me know.
Forgot to add the video of the web interface. My project is currently on hold, been working on a few other projects at the same time, but hope to get back to it in the next month
stalled due to vacation and other stuff i'm building. I did manage to recreate some old code.
This is based off a webpage i found around 2003-ish that had pseudo nutritional facts of the server specs. Only problem is I had just the html output saved. So I finally got around to doing the backend code to give realtime outputs of hdd space,memory,network stats,users,& uptime. Tested on a Rapsberry Pi running Raspian. Result may vary on your system due to system calls, adjust accordingly.
As part of the cheap home automation project I am currently working on, I needed to get some temperature sensor info to my webserver. For the brain of my project I'll be using a Raspberry Pi.
I had ordered a 5pk of DS18B20 temperature sensors so i can visualize monthly temperatures and eventually control my thermostat. In order to get the sensors working on the Pi, I needed to do a few things:
First I had to setup the pi to add OneWire support. I started by editing the boot config file with nano by running
sudo nano /boot/config.txtI scrolled to the bottom and added the following line:
then pressed ctrl+x and y to confirm, then
sudo nano /etc/modulesadd the following 2 lines to the bottom:
I again press ctrl+x and y to confirm , then shutdown my pi.
I then hooked my sensors up to a 4.7k pullup resistor using the following diagram:
I booted my Pi back up and tested to see that my sensors were detected by typing the following command into the terminal:
cd /sys/bus/w1/devices ls cd 28-xxxx (change this to match what serial number pops up) cat w1_slave
if all goes well you shouldn't have seen any errors and it should have outputted some gibberish like this:
The temperature is shown in the last five digits on the second line. (You need to divide this number by 1000 to get the temperature in degrees Celcius).
You finally need to have Apache2 and PHP5 installed on your Pi.
I had looked online for php code that had outputted the temperature from sensors and found that everyone had hardcoded the sensor ID's in their code , since I wanted my automation to be as painless as possible, I wrote my own php script to automatically get all the sensor ID's and then convert the output to Celsius and Fahrenheit. I have this on https://github.com/xillwillx/DS18B20
Add temp.php to /var/www/ then visit http://127.0.0.1/temp.php
Page output should look similar to this:
Sensor ID#: 28-0214640d18ff = 26 °C / 79 °F Sensor ID#: 28-02146409b9ff = 25 °C / 77 °F
And that's it! I will be added more posts as i finish each portion of my home automation project. My goal is trying to get it all done for less than $150.