Sorry to ask! but it would be great if you found any of the content on my page useful to check out some of the ads to support my hosting!
So I finally got around to working on my app to control my Cinema, Lights, etc…
I used the examples in Sencha Touch to build this page / app, I am currently running it on an xampp install on my desktop (code and details below). This is the first version… so lots of it is hard coded and its using HTTP GET with the Arduino, in the future I expect to migrate everything to the Arduino / RaspberryPi MQTT… Just not had the time recently due to some personal stuff.
Below are some screenshot of the webpage in Chrome on my Galaxy S2
So check out HZ\app\view\Main.js in the webpage source below… and you can modify the buttom names and the HTTP GET Commands that point to the Arduino (Arduino Code Below)
Below is screenshot of the code with some colour grouping.
The arduino is an EtherTen From Freetronics with some IR LED’s and a 315MHZ Link kit… I am using the RCSwitch / IRremote below is a photo of what it looks like but feel free to check out the older post / schematics.
Code: HZ Webpage, Arduino
If you want more info on how all this fits together… please leave a comment and I will update the post, I suggest you look at some of my other posts as most of the details are in older updates / code / posts.
Check out some useful info here regarding the GPIO pins on the Arduino.
Here is some examples / sample code for the RaspberryPI / MQTT / Mosquitto / Ardunio.
SSH to your RaspberryPi, with mosquitto installed, if not already running execute the command “sudo mosquitto” to start the broker.
Now your mosquitto server is running, run the command “mosquitto_sub -d -t HomeZoneCH“, what does this do? it subscribes the RaspberriPi to the topic HomeZoneCH
Open a second ssh session to your Pi and run the command “mosquitto_pub -d -t HomeZoneCH -m “CellarLightOff”” you should see the message below.
On the first SSH session you have open you should see the message below appear!
Now with the code runnning on my Arduino after a reset I receive the following message on the first SSH session.
Now I know this is super simple and your asking yourself what value does this have? it’s just a simple demo of the messaging system… I will be sharing all my final code with Webserver, mosquitto interface etc… as soon as I feel it’s ready. I am moving house soon and will not have much time to focus but I hope to have a good update next month regarding my progress
Have a look at some useful links here, here and here
How to install Mosquitto on the RaspberryPi
Download the latest tar from http://mosquitto.org/download currently mosquitto-0.15.tar.gz
The following instructions are for the Debian install
- sudo apt-get install libwrap0-dev
- tar zxf mosquitto-0.15.tar.gz
- cd mosquitto-0.15
- sudo make install
- sudo ldconfig
Install Instruction Source
And while your waiting for it to install, get the MQTT Library for your Arduino!
So I have decided to build a web server and MQTT to further atuomate my house … I installed my Pi last night with Apache, PHP and now looking at Mosquito for MQTT.
Updates to come, all details, config and source will be published.
Got my Pi today!!! Super happy and I cannot wait to start poking around with it tomorrow!!!