I cannot wait until Thanksgiving to put up my outdoor Christmas lights. I don’t care if it breaks tradition. Raspberry Pi controlled automated Christmas lights are going up this week. Winter freaking wonderland!

How to Automate your Christmas Lights with Open-Zwave:

simpleChristmas Z-wave AutomationI created a basic Z-wave zoned system so I can set and forget the lights again this year. By default the lights will come on at dusk and go off about 6 hours later. Setup is incredibly easy (I hope) and the instructions and what you need to get started are below.  For most people, you will only need to pair the devices and turn it on.  It will try to automatically figure out what timezone to use and the coordinates to figure out dawn and dusk to use.  This automation allows it to get started without accessing the web interface.  No data is sent to me during this process.  If you don’t want your Pi geo locating itself, boot it once with it disconnected from the internet and set your timezone.  I will still try to help, by using Javascript to put your computer’s timezone at the top of the list but none of this gets saved to the server.

Normal warning: Automating your Christmas lights with Z-wave does not draw in the same crowd as the musical choreographed Christmas lights. The protocol focuses on wireless mesh network reliability, stability and status reporting over speed. For me, at least at this point, that is all I want. I want to drive up and have them on and go to sleep without having to worry about shutting them off.

To Get Started, You Need:

1 x 4gb or greater SD card
1 x Aeon Labs Z-Stick Series 2 Z-wave Controller
___ x GE Outdoor Z-wave Switches (you fill in the blank)
1 x Raspberry Pi and power adapter
1 x Raspbian + Simple Automated Christmas Pre-configured image (Alternate Image – Removed some Rasbian Features to make it smaller.)
** DOWNLOAD V0.9.0**  The image didn’t come out as clean as I hoped so I ended up spending extra time tinkering with autofixes and easy upgrade features.  Please let me know if you have any bugs.

You can run the Simple Automated Christmas application on pretty much any Linux device – but I think the Raspberry Pi is one of the best low cost / low electricity options.

Instructions:

  1. Have an age appropriate holiday beverage.
  2. Copy the downloaded image on to your SD card (Here is a guide with screen shots).
  3. While you copy the image, put up your Christmas Lights and/or plug in the outdoor adapters.
  4. The Z-stick (the conroller) should come with enough power to do your pairing; but if the light does not come on when you hold the button on the Z-stick, plug it in to a usb port and repeat step 1. Now it is time to pair the Z-wave controller with the modules. This step happens with the Z-Stick unplugged from the Raspberry Pi. Pushing the button in the middle of the Z-Stick will put the Z-Stick in pairing mode. If you do not see a button, try turning the stick over. The blue light around the button should flash. With the Z-Sitck 2-4 inches from the module you want to pair, push the button on the module (GE Outdoor plug in this example). The blue light on the Z-Stick should stay solid for a few seconds and then return to flashing. At this point, you can move to the next Z-wave module and pair it by pressing the module button or you can press the button on the Z-Stick to take it out of pairing mode.
    (Alison was kind enough to make the video – I think she was bored.)
  5. With the Raspberry Pi off, plug in your Aeon Labs Z-Stick, your SD card and ethernet cord (or keyboard and monitor). Some users may need a powered hub if they are connecting multiple peripherals.
  6. You can leave the defaults and let the Pi take over with the default automation settings or you can type in ‘http://simpleChristmas.local’ and change the configuration settings (on / off schedule) and zone settings.
  7. Wow – you have automated your Christmas lights! Enjoy step one or take a moment to laugh at the inflatable Raccoons.

At any time, you can still use the switches on the GE Outdoor modules. The automated schedule will continue running.


Comments

  1. Andrew Pawelski -

    Hi Could I modify this image to do home automation for light switches, timers, dimmers etc?

    Reply
    • Thomas -

      I will include the standard client in the /var/www/simple directory. You can just copy over the /var/www files and stop the cronjobs. Can you test this link for me and turn off the Christmas tree: http://simplechristmas.thomasloughlin.com:8080/

      Reply
      • Andrew Pawelski -

        Hi Thomas – guessing you are still putting the image up? Can I ask if what I am trying to do is what I might be able to do with this image?
        I want to run a pi with the USB stick in it, and control a zwave power point controller, and one with a dimmer – ideally I would like to run my fish tank lights off of it and schedule this based on either a static timer, or looking at dwn/dusk (like the xmas lights) – would also like to see what power consumption is and ideally manage via a zwave compatible IOS app – or am i stretching it?

        Reply
        • Thomas -

          Out of the box it will not automatically handle those needs but depending on your interest you can extend open-zwave to do all those thing.

          Looks like it will be tomorrow on the img file. Sorry about that – still a few bugs to work out.

          Reply
      • Andrew Pawelski -

        hi Thomas, i did test those lights for you for some reason my reply didnt go through – I have your image but dont see a simple directory in /var/www?

        Reply
        • Thomas -

          Sorry, you can copy it from ~/simpleChristmas/Client to /var/www/Client.

          Reply
          • Andrew Pawelski -

            hi feeling a little dumb – but I have the simple christmas interface up and I can turn off my zwave compatible power point (onyl thing I have at the moment) via the toggle – yay – i I want to modify things such as the available times for zone 1 how would I do this?
            is zone 1 configured to turn on and off the three switches in the interface already?

          • Thomas -

            If you would like to remove the other two devices, type in ‘ozw’ on the command line then ‘sudo service simpleChristmas stop’, then ‘rm *.xml’ and ‘rm OZW_Log.txt’. You can then restart the service or wait for it to restart itself.

            Zone 1 is configured to the devices at the top.

            Did it detect your timezone correctly?

          • Andrew Pawelski -

            or am i better off just grabbing lights control and going with that? is there an advantage to using your image?

          • Thomas -

            Up to you. They do things a little differently and I am not up to date on Conrad’s latest release.

          • Andrew Pawelski -

            nearly detected it – got to my state but was out by 1/2 hour initially (Australia/South Australia/Adelaide) – can you tell me briefly what the differences are between yours and his?

          • Andrew Pawelski -

            i tried what you suggested but still have 3 binary switches…

        • Andrew Pawelski -

          ok My apologies – I think my stick has remembered switches from a past life – is lights control in this image?

          Reply
    • Thomas -

      You are correct – sorry about that… That typo pretty much summed up the weekend.

      Reply
      • Ryan -

        Unfortunately I can’t test it at the moment as the image is too big to fit on my 4gb cards and I don’t have any larger ones spare. Different manufacturers seemingly have a different idea of what 4gb is…it might be worth shrinking your partition size by a 100mb or so in future to make it work across the board.

        Reply
  2. Ryan -

    The live demo is fantastic! Great work.

    I’m also using dimmers. I’ve just put your previous image into production, using LightsControl. It seems to work well enough, but I’d be keen to know if you think this simpler server might be easier for me to understand and extend? If so do you have any pointers?

    You might also be interested in a new open source tool from IBM called Node-Red (http://nodered.org/) – I’m finding it really useful for rapid prototyping and protocol integration. As a test I have a bespoke android app communication with NR via HTTP GET & TCP Sockets, NR then performs some processing and actuates/replies to the commands by passing them on to relevant servers for Z-Wave, 1Wire & IR (LIRC).

    Reply
    • Thomas -

      The http://livedemo.thomasloughlin.com/Client/ has a working dimmer switch. It is in our kitchen so I might have to take it down. Over the weekend I can put one in the same room as the Christmas tree live test.

      We need to email Conrad and see if he is still working on lightscontrol. I think the server may be out of date with Open-Zwave.

      Reply
      • Soph one -

        Hi thomas, i want your email please..Thank you

        Reply

Leave a Reply