Shop OBEX P1 Docs P2 Docs Learn Events
[SUGGESTION] Open Source Home Automation — Parallax Forums

[SUGGESTION] Open Source Home Automation

DmashekDmashek Posts: 49
edited 2013-12-08 09:25 in General Discussion
First off let me state that I know that there is a "suggestions" forum, but I felt this was more appropriate for the General Discussion to get more feedback.

I have always had a passing interest in home automation, but have never actually gotten to the practical application phase. After finding out about the Propellor about 2 years ago it dawned on me that the Propellor might be an excellent starting point for an open source home automation solution.

If you are currently, have in the past, or plan to in the future build home automation solutions based on the Propeller -- please give some feedback. I feel that this niche market could turn in to a nice product demand source for both Parallax and for third-party hardware developers while still retaining the open source vibe.

Thoughts?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2013-07-20 17:59
    I'm all for it! Let's hear your thoughts, please.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-07-20 21:53
    I have actually been toying with this myself. Although I do not have anything built yet, I have been experimenting using the Spinnernet, a PINK, Smart Card Reader, RFID Reader and Jeff (Oldbitcollector's) wifi device. I have gotten as far as being able to turn on lights via the Internet. I install CCTV equipment for a living and would eventually like to add my own version of Home Automation to the list. Being able to actually see what is going on at home coupled with automation could go hand in hand together. That said, I'm in for testing the waters, so to speak.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-20 23:28
    Dmashek wrote: »
    . . . or plan to in the future build home automation solutions based on the Propeller -- please give some feedback.

    The introduction to chapter 11 of Programming and Customizing the Multicore Propeller says "we will explore a Propeller-powered HVAC (heating, ventilation, air conditioning) energy-saving 'green' house model." The chapter explains how to use the Propeller to open and close air duct opening to control the temperature of individual rooms within a building (it uses a model for illustration purposes).

    I've been thinking of doing something similar in our home. As it is now, there is just a single thermostat to control the heat pump. Often one area of the house is colder than desired while other areas are warmer than desired. I figure if I add a temperature sensor to each room in the house and motorize the louvers of the air vents, I could better control the temperature of the rooms and even personalize the temperature based on the primary occupant's preference. I think having control of the temperature of each room could save money on the power bill since I could leave infrequently occupied rooms a bit warmer than the rooms which are frequently used.

    I'm planning on using Nordic nRF24L01+ transceivers for communication between the various Propeller boards. These transceivers are so inexpensive ($1.30 each when you buy ten at a time) they don't add much to cost of a control boards.

    I experimented with multiple Nordic transceivers in my panic button project. I gave each Propeller board its own ID number. The boards used this ID number to determine when it was their turn to transmit information. This kept the boards from interfering with each other when it came time to transmit data.

    I recently replaced our original sprinkler control box with my own Propeller-powered version. I figure I'll add a transceiver to it so I can monitor room temperature and sprinkler system settings from some sort of base station. I'll probably have control stations in several rooms in the house (bedroom, kitchen and living room)
    .
    I made my own control board for our kitchen oven (the original stopped working) so I could add a transceiver to it. With the oven included in the system, I could start preheating the oven without getting up from the couch. Think of how many more ways it would be possible to be lazy with such a system.

    I also have plans to add a burglar alarm, and water leak detector (in the basement) to this system (this system is currently vaporware). I haven't done much with the Spinneret yet but I'd want to be able to access this system from the internet so I'll need to join NWCCTV in exploring the internet options.

    If/when I ever join the smartphone crowd, I'll want to add some sort of interface for the phone. If I continue using my dumbphone, I could still use a cell phone to interface with the system by using one of Tubular's Telit boards.

    I'd also like to include other "normal" home automation tasks (like lighting) to this (presently vaporware) system.

    I'll need to figure out a way to include our cloths iron in this system so I'll never need to worry about the question "Did we leave the iron on?" as we are just getting on the freeway for a weekend trip.:smile:

    I second Franklin's request:
    Franklin wrote: »
    Let's hear your thoughts. . .
  • kwinnkwinn Posts: 8,697
    edited 2013-07-20 23:31
    I am also interested. I think the Propeller is an excellent choice for this. I am currently involved in building automation and gathering information and ideas for using the propeller as the heart of a home or small building automation system.

    The current categories are:

    Access - cards, fobs, car remotes, finger print scanners, electric strikes for entry.

    Security - Door contacts, window contacts, pir sensors, glass break monitors, dual mode (pir/microwave, pir/sound).

    Lighting - Motion sensors, switches, schedules.

    HVAC - Max comfort for min energy use. Multiple temp settings based on time & occupancy. Multiple zones. Automated blinds and shutters.
  • DmashekDmashek Posts: 49
    edited 2013-07-20 23:34
    @Franklin -

    I am a programmer by trade, and a green novice when it comes to building electronics. So far my skills are limited to working with the PEK and PPDB. Along the way I have assisted some LEDs and capacitors in releasing the magic smoke. It is amazing how much longer LEDs run when you grasp the concept of a current-limiting resistor! ;)

    So I am hoping to tap in to the vast amount of knowledge that I have seen on these forum over the last 2+ years. I have that I learn best when I have a project that grabs my interest. I am hoping that home automation can be that project.
  • Heater.Heater. Posts: 21,230
    edited 2013-07-20 23:34
    I hope someone is thinking about security in all this. Especially when you are connecting systems in your home to the internet or using wireless devices.
  • kwinnkwinn Posts: 8,697
    edited 2013-07-20 23:59
    Heater. wrote: »
    I hope someone is thinking about security in all this. Especially when you are connecting systems in your home to the internet or using wireless devices.

    Oh yes, part of the "Internet access" category (which I forgot in the previous post). Password protection, encryption, VPN, antivirus.

    Not sure antivirus is necessary if a prop is used. Any propeller viruses (viri?) out there?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-21 00:00
    Heater. wrote: »
    I hope someone is thinking about security in all this. Especially when you are connecting systems in your home to the internet or using wireless devices.

    The OpenBeacon project uses Nordic nRF24L01+ transceivers. They use XXTEA for the encryption algorithm since it doesn't require much RAM. I don't know enough about XXTEA and other encryption techniques to know if RAM usage should be a major concern when using encryption on the Propeller.

    I'm planning on using some sort of encryption myself but I (presently) don't know enough about the various encryption techniques to make an informed decision about which technique to use.

    Edit: Obviously I was thinking about the security of the wireless component of the system.
  • StefanL38StefanL38 Posts: 2,292
    edited 2013-12-08 08:12
    Hi everybody,

    I want to give a heads up to OpenHAB http://openhab.org/index.php/start/

    This is a java based open source automation server with "binding"-components to interface with almost any
    house automation protocol like knx, asterisk, z-wave and 38 others including TCP/IP, UDP, serial etc.
    There is also a rasperry pi version.

    I know your main target is to do it all with the propeller. But if there are components you just pull from the shelf
    and are very flexible to configure why spending time on developing something on your own?

    Here is a demo-server
    http://demo.openhab.org:8080/openhab.app?sitemap=demo

    you can control in your browser

    or with this android-app
    https://play.google.com/store/apps/details?id=org.openhab.habdroid


    download runtime-modul
    https://openhab.googlecode.com/files/openhab-runtime-1.3.1.zip

    Zip-file containing the binding modules
    https://openhab.googlecode.com/files/openhab-addons-1.3.1.zip

    Editor for configuration files
    https://openhab.googlecode.com/files/openhab-designer-win-1.3.1.zip


    configuration files for a local demo
    https://openhab.googlecode.com/files/openhab-demo-configuration-1.3.1.zip


    documentation is still quite rudimentary but there are several support offers

    attached the configuration files I used for a small test demo
    the difference to the standard demo is just an item

    String Propeller                  "Propeller"      { serial="COM5" }
    

    and some additional rules
    rule "Propeller on update"
    	when 
    		Item Propeller received update
    	then
    	    PropellerUpdate = PropellerUpdate + Propeller.state.toString.trim
    	    println("PropellerUpdate: " + PropellerUpdate)
    	    if (PropellerUpdate.contains(";")) {
    			if (PropellerUpdate.contains("item=B1")) {
    				postUpdate(Light_GF_Kitchen_Ceiling, if(PropellerUpdate.contains("value=ON")) ON else OFF)
    			}
    			if (PropellerUpdate.contains("item=B2")) {
    				postUpdate(Light_GF_Kitchen_Table, if(PropellerUpdate.contains("value=ON")) ON else OFF)
    			}
    			if (PropellerUpdate.contains("item=B3")) {
    				postUpdate(Shutter_GF_Kitchen, 50)
    			}
    			if (PropellerUpdate.contains("item=temperature")) {
    				var int valueStartsOn = PropellerUpdate.indexOf("value=") + "value=".length
    				var String myTemperatureAsString = PropellerUpdate.mid(valueStartsOn, PropellerUpdate.indexOf(';')-valueStartsOn)
    				println(myTemperatureAsString);
    				var Number myTemperature = 0.0f
    				myTemperature = Float::parseFloat(myTemperatureAsString)
    				postUpdate(Temperature_GF_Kitchen, myTemperature)
    			}
    			PropellerUpdate = ""
    		}
    end
    
    
    rule "Propeller LED red"
    	when
    		Item Heating_GF_Kitchen received update
    	then
    		sendCommand(Propeller, "set led red " + (if(Heating_GF_Kitchen.state==ON) "on;" else "off;"))
    		PropellerUpdate = ""
    end
    
    
    rule "Propeller Temperature"
    	when
    		Time cron "1 * * * * ?"
    	then	
    		sendCommand(Propeller, "get temperature;")
    end
    [URL="https://play.google.com/store/apps/details?id=org.openhab.habdroid"]
    

    [/URL]
    best regards
    Stefan
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-12-08 08:30
    Stefan,

    Thank you for sharing this! I don't have any problems with a mixed technology solution. Your proof of concept with the Propeller as a component is certainly enough to show that it can be done and the Propeller can be a part of the solution.
  • xanaduxanadu Posts: 3,347
    edited 2013-12-08 09:25
    I have been dreaming up a system that doesn't need a remote. I would like to rely on motion sensors and timers for everything. It doesn't make sense to me to use a remote to do anything at this point.
Sign In or Register to comment.