Shop OBEX P1 Docs P2 Docs Learn Events
Which Hardware / Software to build a Web server for Home Automation ? — Parallax Forums

Which Hardware / Software to build a Web server for Home Automation ?

MarcelloMarcello Posts: 29
edited 2010-12-04 12:02 in Propeller 1
I would like to remotely read temperature and other house parameters with a web based

Comments

  • dMajodMajo Posts: 857
    edited 2009-11-25 19:51
    This is not the cheapest but is powerful and very simple http://tibbo.com/products/?form_filter=yes&type%5B%5D=module&type%5B%5D=add-on&class%5B%5D=programmable&wclass_set=out

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • localrogerlocalroger Posts: 3,452
    edited 2009-11-25 20:03
    The cheapest is probably going to be Harrison Pham's api_telnet_serial with a ENC28J60 based card (uController.com has a kit, and I think SparkFun has a breakout board). In fact Harrison's first demo project for that code was a home weather station.
  • LeonLeon Posts: 7,620
    edited 2009-11-25 21:14
    Olimex makes a little ENC28J60 DIL module, I've got one. SFE probably sells it. It would fit nicely on a Proto Board. This TCP/IP stack should work with it:

    code.google.com/p/proptcp/

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 11/25/2009 9:20:56 PM GMT
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-11-25 21:30
    YBox2 is easily put together. I don't think there are any widgits for this yet, but Spin is very flexible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-25 22:49
    You really want to switch on a computer for reading the temperature and switch things on and off????

    I currently work on a standalone propeller solution for home automation. Maybe later it will have a web-interface so that I can check things from work. But normal usecase would be to have this device on the table in the livingroom - or at the wall ... we'll see. My current planning is to use a 3,5" touch-display with a controller. That way you can have a real nice user interface. Prototype of the UI is running and really looks great.

    For network access I'd prefere to have a module that already takes care of the TCP/IP stack. ELV has such a module with a serial interface. I'll check that tomorrow - if I remember right it costs about 30-40€. But I maybe it's worth the money because there is still enough to do and propeller is short in RAM ;o)
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2009-11-25 23:47
    @MagIO2:· Are you going with this Crystalfontz 3.5 puppy with the touch screen and the SSD2119 controller (w/GRAM)?· I haven't made the plunge yet.· Maybe let us know how that LCD module works out for your application.· Forum members could perhaps gang together (or Parallax) and purchace a thousand of them and sell them at half price (Okay, not likely to happen = In my dreams!).· Also, the next Prop chip will have even less use for LCDs with GRAM, but it would still be quite nice for 18-bit·photos (and nice interfaces).
  • Michael O'BrienMichael O'Brien Posts: 55
    edited 2009-11-26 03:55
    Marcello,
    ··· Sounds like a very interesting and usefull project.
    If you go the full PC/Server route, there are many open source web servers, enterprise app containers and databases available. Specific to JEE (java) development the following list is one scenario (Microsoft .NET ASP solutions are not listed here).

    On a Linux or Windows system all the following are free and open source and based on Java (SUN/Oracle).
    1) javax.comm library (SUN)·for propeller to java serial communication - to connect to 1 or more of your boards via USB
    2) A database like MySQL (Oracle) or Derby (apache.org) or JavaDB (SUN/Oracle) - for historical data
    3) A JPA container like EclipseLink (Oracle) or Hibernate (RedHat) for the database to java layer - IE: no SQL for 2)
    4) A Java enterprise container like GlassFish (SUN/Oracle), WebLogic (Oracle), WebSphere CE (IBM) or JBoss (RedHat) for the business logic and integration layers - to optionally serve dynamic web pages of sensor data
    5) An Apache http server (usually part of the EE container in 4) - as an optional web front end for 4)

    If you use an IDE like Eclipse or NetBeans - it will be easier to integrate all the layers - NetBeans (SUN/Oracle) happens to come out of the box with a database (Derby), a JPA container (EclipseLink), an EE container (GlassFish) - you can use a wizard to get a minimum app up and running.

    thank you
    /michael

    Post Edited (Michael O'Brien) : 11/26/2009 4:12:09 AM GMT
  • MarcelloMarcello Posts: 29
    edited 2009-11-26 06:32
    I already had a sort of PC solution to the Home Automation problem, BUT ...

    what i would like to realize now is a PC indipendent Home Automation thing (meaning hereby the remote reading and "writing" of house parameter).

    The Propeller based project I saw until now seems to me not to implement any web server ... but i am not so sure about that.

    I say it again:

    my goal is to have a look at the house from 1000 miles away (or more). ·yeah.gif



    @Michael O'Brien: my very simple solution: Power up the PC once a day with the bios alarm, read temperature values and take a couple of snapshots, upload them on a free webserver, power down PC. All done with Visual Basic 6, the joystick interface for AD conversion and a webcam.

    Post Edited (Marcello) : 11/26/2009 6:38:10 AM GMT
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-26 07:23
    Don't want to hitchhike this thread, so I try to make it short.

    @JRetSapDoog:
    Yes ... in the end I'll use the 3.5' one. But for testing these kind of displays I ordered this 2.4' display first: http://www.crystalfontz.com/product/CFAF240320K-T-TS.html

    And I really like it. You can get the look of a IPhone App with it. Well ... maybe not the feel, but the look ;o) Bottleneck is loading the images from SD-card.

    Watch out this thread: http://forums.parallax.com/forums/default.aspx?f=25&m=397206
    We should discuss about the display in that thread rather than here.

    Guess this evening I'll manage to give a report on my tests. I also recorded a video last night, but it's ~100MB. Don't want to put that version online, as it wastes a lot of time in a slideshow. I was just so thrilled in watching this display that I put tons of pictures on the SD card ;o)

    @Marcello:
    When you have the propeller running a webserver without any display you'll need to switch on a computer anytime you want to maintain your house parameters even if you are at home. That's why I suggest to have both. A display / touchscreen for the propeller for changing the parameters when you are at home, plus a web-server that runs when your not at home.
  • dMajodMajo Posts: 857
    edited 2009-11-26 10:14
    I think ENC28J60 is not the solution here. If the prop is the main brain of the home automation (controlling lights, appliances, hvac) have to run sone schedules, respond to events ... than it needs something that unloads the tcp/ip stack handling, web server, dynamic pages ... It need a "web coprocessor" (rabbit, netburner, tibbo ...). I think that here beside the additional hardware cost you have to take in account also the new development software/platform costs. Tibbo like the prop cames with all the tools free.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-26 11:58
    Here is a link to the ELV device I mentioned:
    http://www.elv.de/Ethernet-UART-Gateway-EUG-100,-Komplettbausatz/x.aspx/cid_74/detail_10/detail2_27408

    ~40€ sounds not to bad.

    In the last elektor they mentioned a lantronix module which is just a bit bigger than the LAN plug-in but runs a complete LINUX server. As usual they did not give the price.

    PS: Found it: http://www.gridconnect.com/xportpro.html
    Price is not to bad as well ... and : "XPort Pro provides a high level of security by offering data encryption and authentication options. The LINUX version supports both IPV4 and IPv6 networking stacks." Encryption and authentication is maybe a valuable feature for your purpose.

    Post Edited (MagIO2) : 11/26/2009 12:14:45 PM GMT
  • MarcelloMarcello Posts: 29
    edited 2009-11-26 13:08
    MagIO2

    i found the ELV module could really be what i need.

    The security features of the Linux one are also nice, but how does the Linux communicate with the Propeller ?

    The yBox2 has also a very simple Web server !

    Post Edited (Marcello) : 11/26/2009 5:05:08 PM GMT
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-26 16:58
    It has a serial interface. 300 - 900something kbit/s. I think that should be enough to transfer data from propeller to the server and make a nice HTML page out of it on the server.

    I think this is my favourite.
  • DynamoBenDynamoBen Posts: 366
    edited 2009-11-26 17:21
    I would check out the WizNet WIZ812MJ ($16), and combine that with info below.

    Here are some resources and if you look in "code examples" you will find some web server code:
    www.averydigital.com/products.html

    This is an improvement on the driver at the above site (currently a work in progress, but is functional):
    http://forums.parallax.com/showthread.php?p=851153

    Then for the temperature sensing check out the Dallas DS18S20 ($5). They communicate one a 1-wire network and multiples can be chained together to take readings in multiple locations. They also make 1-wire switch interfaces to control external device but it might be easier to just use the left over prop pins for that.

    Post Edited (DynamoBen) : 11/26/2009 5:31:18 PM GMT
  • obrienmobrienm Posts: 65
    edited 2010-11-23 14:04
    mshane,
    Hi, you are in luck, the software stack for the Parallax Spinneret embedded web server based around the WIZnet W5100 and the Propeller is being developed on the following forum. We have basic TCP/IP begining to work using the HTTP Server demo as well as POC's for AJAX, the SD card reader URI processing. You can join us as several projects have aspects of your use case.

    http://forums.parallax.com/forumdisplay.php?f=82
    http://obex.parallax.com/objects/615/
    http://www.parallax.com/Store/Microcontrollers/PropellerDevelopmentBoards/tabid/514/CategoryID/73/List/0/SortField/0/Level/a/ProductID/710/Default.aspx

    thank you
    / Michael O'Brien
  • wjsteelewjsteele Posts: 697
    edited 2010-12-04 03:11
    mshane, you do realize that we don't want that kind of stuff here, right? I noticed that you've dont it twice in the same thread.

    We're here to build our own stuff... and don't really want to see advertisements for stuff like that.

    Bill
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-12-04 09:51
    The user (spammer) was removed. Thanks for those who report obvious spammers by clicking the report post button. That is the fastest way to get these things handled.
  • wjsteelewjsteele Posts: 697
    edited 2010-12-04 10:46
    You know, Chris, I was actually looking for that earlier... but didn't see it. It's lot labeled like the other buttons.

    Bill
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-12-04 11:48
    As others have already suggested, at this time I think your best options are Ybox2 or Spinerette, or adding an ENC28J60 module to another Propeller board.

    I have two YBox2's, and they are a nice quick way of showing some data on a web page, and have a number of I/O pins left.

    In a month or two there will be some other choices... but they are not in production yet :)
  • T ChapT Chap Posts: 4,224
    edited 2010-12-04 12:02
    I am working on a similar home automation system using the Prop connected to a Wifly Rn134 radio. The device is pretty simple to connect to the internet. What I have done is set up on a website a MYSQL database with a table and a number of variable fields. The radio is configured to open a TCP connection and send this out upon receiving any data from the Prop:

    'www.yourserver.com 80 POST / '// connects to your site on port 80

    and the Prop then appends this string which is just a test string to send values to the file dbaccess.php which is on the root of the server.
    ser.str(2, string("dbaccess.php?A=1&B=2&C=3&D=-2500555123&E=5&F=6&G=7&H=8&I=9&J=10&K=11&L=12&M=13&N=14&O=15&P=16&Q=17&R=18&S=19&T=20&U=21&V=22&W=23&X=24&Y=25&Z=26"))
    
    

    The file dbaccess.php will receive the string, and all the variables are accessible just as if they were still in the Prop, but in ascii format. You can then easily send any or all variables to your database for storage.

    From the Prop you can update the server at a set frequency or upon some trigger.

    On the remote side, you can either design a webpage that will retrieve the info from the database and display it, or in my case I am designing a GUI in Realbasic which will semi-real time(1 per second) monitor the database, and in fact the method allows for sending info directly back to the Prop from the GUI via the database, so all info is transferable in either direction, including a method to update the Prop eeprom boot program.

    PHP is pretty simple to understand for basic programs like I just described. Real basic is pretty simple to have an application up on pc or mac. The Wifly makes for a super simple connection to the internet with only a Tx/Rx line from the Prop.

    Currently the test php program echos back each var that is received from the Prop original string, minus the var names that were sent to it, I just wanted to see the values returned. But if the var names were returned, it would be easy to parse the body of the packet and get the values back from it.
    Date: Sat, 04 Dec 2010 20:11:34 GMT
    Server: Apache
    Connection: close
    Content-Type: text/html
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <title>Test</title>
    </head>
    <body>
    <br>
    1<br />2<br />3<br />-2500555123<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />testuser1 9<br /> 9testuser2 9<br /> 9<br>
    <br>
    </body>
    </html>
    TCP_CLOSE
    
    
Sign In or Register to comment.