Web Server for Home Automation/Control

Showing 1-17 of 17 messages
Web Server for Home Automation/Control chiques 12/4/11 10:19 AM
Hello Fellow Beagleboard Community Members,

I am writing this post on the basis I have limited knowledge to C/C++
programming and very limited knowledge of creating webservers.

My goal is to design my own DIY home automation using the Beagleboard
and any applicable modules (e.g. AtTinyXX controller).


This is what I "THINK" I need to set up:

1. Load Apache Web Server on my BB

2. Write some QT Code to interface a browser with the I/O ports on the
BB which will in turn send signals to my AtTiny controller.


I am a hardware EE so the latter (#2) is what I expect to be the
challenge.

The reason I am posting this is because I'd like to input on my
choices to load Apache on the BB. Is this the wisest decision or is
there something more practical.

Any advice or comments is greatly appreciated.

Re: Web Server for Home Automation/Control Giorgionetg 12/6/11 3:14 AM
I'm still waiting my BeagleBone to do the same your thing.. :) and also to support my website (hosted, not dedicated server) to make a spider web, and manage the processing about large images files (to resize)..

Let me know if u find some problems.. :)
I'm tuned!! ^^
Re: [beagleboard] Web Server for Home Automation/Control Mustafa Aldemir 12/6/11 6:54 AM


2011/12/4 chiques <bajag...@gmail.com>
Hi,

I don't really have any experience with home automation but I can give you a few starting ideas.

- You can control your system remotely through the browser. You don't need QT or similar interface.
- You can run an Apache web server on the BB
- You can call system commands from PHP. http://php.net/manual/en/function.system.php
- You can control the GPIO on BB with a C/C++ program.

To sum up, write and compile a program in C/C++ to interface your BB with ATTiny (or anything). Make a webpage in PHP which simply calls this program.

I hope it gives you an idea.
Re: [beagleboard] Web Server for Home Automation/Control mark hubrich 12/6/11 8:36 AM

I'm kinda doing the same thing but sending serial strings out the usb to an arduino running firmata. Since I haven't figured out the gpio on my beagle yet.

On Dec 6, 2011 8:54 AM, "Mustafa Aldemir" <mus...@aldemir.net> wrote:



2011/12/4 chiques <bajag...@gmail.com> > > Hello Fellow Beagleboard Community Members, > > I am wr...

Hi,

I don't really have any experience with home automation but I can give you a few starting ideas.

- You can control your system remotely through the browser. You don't need QT or similar interface.
- You can run an Apache web server on the BB
- You can call system commands from PHP. http://php.net/manual/en/function.system.php
- You can control the GPIO on BB with a C/C++ program.

To sum up, write and compile a program in C/C++ to interface your BB with ATTiny (or anything). Make a webpage in PHP which simply calls this program.

I hope it gives you an idea.

-- You received this message because you are subscribed to the Google Groups "Beagle Board" group...

Re: Web Server for Home Automation/Control MarioACIC 1/5/12 11:09 AM
might give you a look at the following link for a similar project

http://proyectotea.wordpress.com/about-tea/

I hope to be helpful in your purposes,
Re: Web Server for Home Automation/Control vitoracmm 1/5/12 11:28 AM
Hi, why to use Apache Web Server , u could code everything in nodeJS
nodejs is really powerfull and scalable and easy to code, u have full
control of everything on web responses and requests

a simple example of a server would be

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(80, "127.0.0.1");

This would serve a webpage containing Hello World basic example... U
could do everything u want served by the way u want,web pages,files,
data streams..
Instead of wello world u could serve a web page with the IO's status
on beagle bone.

I recommended u  to play arround nodeJS (go to nodejs homepage they
have all well documented with lots of examples) and u won't be
disappointed

Regrads







Re: [beagleboard] Re: Web Server for Home Automation/Control mark hubrich 1/5/12 12:41 PM

The NPM also makes it even more simple.

-- You received this message because you are subscribed to the Google Groups "Beagle Board" ...

Re: [beagleboard] Re: Web Server for Home Automation/Control Dave Hylands 1/5/12 1:17 PM
On Thu, Jan 5, 2012 at 11:09 AM, MarioACIC <mquint...@gmail.com> wrote:
> might give you a look at the following link for a similar project
>
> http://proyectotea.wordpress.com/about-tea/

This is another weather based project using BeagleBoard:
http://oww.sourceforge.net/

I would expect that a much smaller web server like Mongoose would be
appropriate:
http://code.google.com/p/mongoose/

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

Re: Web Server for Home Automation/Control Giorgionetg 1/23/12 11:35 PM
Hi chiques, have you solve the problem with BB??
I worked just a little bit on node.js, but I'd like so much to feel at home (ubuntu, apache, mysql)...

Let me know... :)
Re: Web Server for Home Automation/Control Con 1/24/12 9:48 AM
Hi there,
   a couple of us here in Dublin are doing similar work. I have a
heating controller, based on an Arduino, and a an XBee modem.
Currently, I control this using a small windows Netbook, also with an
XBee modem attached, and running Apache.

The plan is to use the Beaglebone in place of the Windows box, Node.js
in place of apache. Functions on the Node.js server will be exposed as
RESTfull Web Services, consumed by an iPhone App.

All is going well so far. If there is anything specific I can help you
with, let me know.

Cheers,
Con
Re: Web Server for Home Automation/Control Jake 1/24/12 8:28 PM
Con,

Thanks for your offer to help.  I am starting to learn nodejs and javascript, and have some basic questions:

I would like to create a webpage (hosted on the beagleboard) with a button, that when clicked, sends a message over the beagleboard UART.  I am having trouble understanding how the button on the webpage would be linked to the nodejs SerialPort function.  I think the button on the webpage would be written in client-side javascript, but how does this notify the server-side nodejs script of the button click action?

Also, I have read the standard Hello World nodejs example.  But how do you replace the overly-simple Hello World string with an HTML file (e.g. index.html) that has links to client-side javascript files?  Then, as I mentioned above, like a button back to the nodejs serialport?

Thanks!
Jake
Re: Web Server for Home Automation/Control pezman 1/25/12 3:47 AM
My $0.02 is that node-xmpp in combination with a cloud service like
Nimbits or Pachube is the cleanest way to make an automation server.
In particular, it lets the bb push information   readily.  For
example, if someone turns a light on, the bb will send an IM to
Nimbits or Pachube.  Conversely, if you want to turn a light on
remotely, you can just send the bb an IM.

At any rate, xmpp is inherently more interactive, since it's a p2p
protocol, and as a result it seems to make for a more natural proxy
for physical computing.
Re: Web Server for Home Automation/Control Con 1/25/12 6:02 AM
Hi Jake,
  I've taken a slightly different approach - I expose functions on the
BB (written in Node.js) as Web Services. Have a look at
http://mobile.rdacorp.com/2011/10/creating-nodejs-web-service.html for
some sample code. Then I call the web services from Javascript on the
client side. You use a thing called XMLHTTPRequest.... google for that
and you will get plenty of examples.

HTH.

Keep at it!

Cheers,
Con
Re: Web Server for Home Automation/Control Jake 1/25/12 3:16 PM
Thanks so much for the advice. I will look into those.

Thanks again,
Jake
Re: Web Server for Home Automation/Control Jesse 1/26/12 4:50 PM
I too have been interested in using the BeagleBone for home automation
use. I recently released a simple project named webLightSwitch which
implements a web server in node.js and runs on the BeagleBone to serve
up a jQuery Mobile web interface. The interface provides a means to
turn the registered lights on or off. The lights have INSTEON lighting
controllers attached. The web server code communicates through a
serial interface, using node-serialport, to a USB INSTEON PowerLinc
Modem to control the lights. You can more information at the project
page here: http://beagleboard.org/project/webLightSwitch/

 - Jesse
Re: Web Server for Home Automation/Control Jake 1/29/12 3:09 PM
Thanks for all the links, advice and pointers.  They we crucial.  

I was able to implement two way communication with nodejs and socket.io
Re: Web Server for Home Automation/Control bbx10node 1/30/12 9:24 PM
I wrote node.js code for a Beaglebone and socket.io to send
commands to an X10 CM15A controller with USB interface. All clients
see the same control panel with on/off status indicators. The
indicators change in real-time as lights are turned on and off.
https://github.com/bbx10/bbx10node

The hard work of talking to the CM15A controller is done by another
program named mochad from http://sourceforge.net/projects/mochad.
mochad builds without problems using gcc pre-installed on the
Beaglebone. See the following for details.
http://sf.net/apps/mediawiki/mochad/index.php?title=BeagleBone_running_Angstrom_Linux