Open Source SwitchMote Promises Easy Home Automation

[Felix Rusu] is fast becoming a big name in home automation with his clever Moteino systems. His latest is called the SwitchMote which is a super easy way to upgrade your light switches for home automation, and he’s just released the source!

The SwitchMote is a drop in wireless light switch which lets you control a standard AC load, limited to 100W at this time. It uses a solid state relay (SSR) to perform the switching, but like any project involving mains electricity… MAKE SURE YOU KNOW WHAT YOU’RE DOING!

It makes use of a Moteino (duh) which is a wireless Arduino clone that operates over RF. We’ve seen it used before to control a Keurig coffee maker, operate a garage door over the internet, and even text you when your sump pump fails and your basement is about to flood!

Excited? Take a look at his GitHub repository, and check out how it works in the following video.

Did we mention you can program it wirelessly as well?

30 thoughts on “Open Source SwitchMote Promises Easy Home Automation

  1. Perhaps it’s only a stupid phobia I have. In my opinion it’s not good business to pay for home insurance home brew equipment or not UL listed as this.for switching line current/voltage. Even if such a device isn’t the cause for a fire, it’s presence allows the carrier to claim it was to avoid paying for the loss. Then it’s up to the insured to take the carrier into civil court. Lose the suit the insured will have to pay the insurance companies defense cost. everyone has to determine their own comfort level, but should have eyes wide open while doing so.

    1. to be fair, depending on the insurance company, they will try to fuck you no matter what. several years ago I was in a head on collision with a lady who ran a red light while I was making a left hand turn. because I didnt have collision coverage on my policy I had to file a claim against her policy (American Family Insurance). at first the insurance company said my car was totaled, and then tried to steal the wrecked car from me claiming that state law allowed them to. I looked up the law and it said they could only keep the wreck if the car was 8 years old or newer which mine wasnt. the low level customer service people were of no help, and it required me to threaten one of their managers with reporting it stolen to the police if they tried to take it, before they acknowledged I really did have a right to keep a wreck and sell it for parts/scrap. however after this they magically decided my car was no longer totaled but actually repairable, and that the accident was somehow now 10% my fault, even though the other driver admitted fault at the scene to the police, and the police stated it was entirely her fault too for running a red light and cited her. the insurance company told me that I should have either driven faster (breaking the speed limit) or slower in order to avoid being in the intersection when she decided to not stop for a red light.

      And regarding having to pay the other sides legal fees, this doesnt always happen and is dependent on the state you’re in. In Illinois this wont happen unless a statute explicitly allows for court fees.

      1. @matt
        Haha, yeah, that was my immediate thought. It’s funny, the possibility of getting screwed by insurance scares me more than the idea of a house fire. Honestly not sure whether that’s rational.

  2. I don’t like the idea of dicking with mains either, but then I trust plugs I’ve wired so dunno why a relay would be any different.

    I prefer the idea of lamps with those cheap 433mhz remote controlled sockets, with the remote replace by an [Insert dev board here]. Though I’m yet to find some with on/off buttons on the remote AND the plug, for any manual intervention.

  3. i am somewhat short on time to research it myself, but i will at least raise the issue:

    how secure is this, if it can be so easily programmed remotely?

    is there ANY encryption or anything that would prevent, say, me sitting in a parking lot programming ALL of your lights to go off?

    1. Probably not. (I must addmit, I haven’t read all of the Moteino system.) But then again, it’s possible to turn on/off lights connected to those 433MHz systems as well. I would prefer a wired home automation system. Less energy hungry, saver etc. But you have to run extra cables.

      And about safety. If you know what you do I think it’s save. Of course, an insurance company would try to *** with you but they always will. And I think a well designed circuit like this is more save to use then the average Chinese charger etc. And to be honest, saver then a normal US plug or free cables in a dry wall…

      1. You only need to run additional wires if your home is not up to the latest code or is using some old wiring tricks for 3-ways or 4-way lighting. Powerline communication standards like x10 work pretty well in home situations, and I’ve personally installed one on a fluorescent circuit which worked fine.

    2. Anything working over RF is potentially hackable and is also prone to interference, x-10 (a commercial system that uses RF) has problems turning on/off during lightening storms. Some manufactures don’t use RF but use the 120v lines as the communication system and that signal will be sent out not only to your house but also to every other house sharing the secondary side of a transformer.
      That being said, I don’t think controlling a lamp over either system is a huge security risk, however thought and care might be more necessary when thinking about using a 120v coupled data bridger.

    3. Since you have the ability to program it yourself, you can add (or leave out) as much security as you like. Compared to a COTS solution, I would say that this option is significantly better

    4. @Andrei Cociuba
      What sort of threat are you thinking of? For someone to mess with this they’d have to:
      a) Know the device is there, and what it does
      b) Have the tools and know-how to access the device
      c) Have some reason to bother
      There isn’t even really much of a prank potential. Even if you don’t figure out why your lights keep going off you’re still going to change things up to stop it happening.

      1. a)security by obscurity is not really an option. if i need to explain to you why, that is a lengthy chat.

        b) since it is OpenSource, the goal is to make that as easy as possible, right?

        c) a kid stalked a person he met on twitter by sending him dead birts in the mail. because he was bored. and the person ended up seriously mentally deranged because of that. people don’t need reasons you can necessarely think of in advance to do things…

  4. Something I didn’t see mentioned specifically anywhere is that you need both neutral and hot wires at your switch box. Well, okay, that part was alluded to, but what is not mentioned is that depending on how your house is wired you may not have both in any given switch box. In other words, this may not work for everyone without rewriting your home.

    Case in point: the mains power line is run from the circuit breaker directly to the light in the ceiling delivering both hot and neutral. Then, a two wire cable (white, black, ground) is run to the switch in the wall. However, the incoming neutral from the breaker is wired directly to the light and never gets feed to the switch. The hot from the breaker will get connected to the white wire going to the switch (and the electrician may mark it as a hot wire by wrapping some tape around it). The black wire from the switch is then connected to the light hot input. So down at the switch, all we have is a hot in and hot out, no neutral … And no way to power the SwitchMote. Even worse, we have white (usually neutral) wires which are hot and may or may not be marked as such. Sounds like a disaster waiting to happen.

    1. I wanted to do something similar, but the lack of a neutral made it impractical in the UK. Standard UK wiring just has the live in and out of the switch.

      It might be possible to have it battery powered and perhaps leech some current to recharge it when the switch is open. Not ideal though.

      1. Using a white wire as a hot in a dead end switch box is not a disaster waiting to happen if the person digging into their electrical system is smart about it. Up until the last code cycle (pre 2008) using the white wire as the full time hot in a dead end switch box was the necessary way to wire the box to meet code, now it has to be the white and it has to be identified as a hot wire by a permanent method.
        As far as potential power sources, some timer switches you place inside a switch box actually are able to use a dead end switch leg and set up a series circuit with itself and the load it is switching to power itself at a low current. One draw back is that they require a minimum load of usually 40W and require incandescent or halogen type loads to function properly

  5. I’m a bit sad that every comment so far is negative. This is an awesome project that has actual use. If you are well educated about electronics, use components within specifications, and follow the electrical code (grounding, enclosed in a box) there is no reason to fear mains-connected devices.

    For me, commercially available smart switching solutions are either not customizable enough, or are bulky and unsightly. This solves both issues, allowing you to customize the functionality and satisfying the in-wall form factor. Right on!

    1. Oh it’s great, it has very useful applications and is a clean looking result.

      The problem is that you have to consider all the caveats to working with things like this. This switch is not up to code (New York state, for example, requires UL listing for public spaces, I couldn’t install this in a hackerspace up here) and there are certain issues that crop up with that.

      Commercially available solutions can be well done, look at the x10 systems or Lutron’s wired and wireless mesh system. Both work pretty well but you pay for that testing and UL certification that is necessary. This homebrew system is neat, but discussing the downsides of that is not bad, it’s just worth noting. Security and homeowner’s insurance are rarely brought up in things like this. While it’s unlikely someone is going to hack your lightswitch what if someone puts something like this on a garage door? It’s worth considering.

      All that said this is a nice clean project that I enjoyed reading about.

      1. The moteino utilizes an encryption key – haven’t researched the algortithms, etc, but even if it is only moderately secure, it’s still much more secure than a pane of glass.

  6. Guys, thanks for all the feedback. SwitchMote started as a pretty daunting/hopeless idea/challenge that went through several revisions and it’s almost a miracle it actually works, and a wireless Arduino can be had in such a compact format to control lighting without rewiring your house. The main issue is coming up with such a compact power supply. This one is not isolated and I’m aware of all the concerns and this probably won’t pass UL, neither do I have the funds and resources to do so. So it’s a DIY open project that may be useful to some folks but certainly not all. Given its limitations I think it still has some useful features. You program it like an Arduino and then reprogram it wirelessly over the Moteino link which is AES128 encrypted using the RFM69 transceivers, or use the buttons/LEDs however you want.
    An isolated UL supply component can be used but cost will be significantly more and product will be bulkier and also less flexible. SwitchMote currently has 3 wire terminals: Neutral, and HOT1 and HOT2, where HOT1/2 are interchangeable (don’t need to know which is source and which is load).
    From all I know this project is the first of such kind in the Arduino community. It’s by far not perfect, but if someone is serious about making it better I’d love to hear.

    1. Cool device, has lots of uses.
      A little bit of modding and it could be used by people who run solar and batteries.

    2. I like it and appreciate the effort you’ve put into creating and documenting it. I like that it is programmable so it can be set to figure things out on its own (for example, scheduled on/off, power-on defaults, etc) and be both manually and remotely controlled. Maybe not something to be used to run the pool pump, but ideal for lighting needs.

  7. All my home automation switches are rated 3500 Watt. I think 100W would not be useful for consumers as they simply wouldn’t remember the 100W limit. Or visitors that do not know. The best thing that than can happen is a blown fuse.

    Bus somehow I think that the 100W is a real max and in reality it might be 60W before the whole HW overheats.

    Overall it’s definitely a very nice project. Just wanted to point out that the Watts are very low and maybe a risk.

    1. The SSR I used can do 8A and there is a 16A version. However without a huge heatsink they will only do about 100W of load while running somewhat warm to touch. That’s more than enough to run a big chandelier with CFL/LED bulbs. Again … not for people who want to run an industrial welder on it.

        1. Yes it’s still 110V and this does not matter. An SSR is rated by current so an SSR rated for 8A will fail (maybe) at 9A no matter if it is on 24V,110V or 250.

  8. I love what you have been able to do so far. I am a Home Automation fan and know how commercial offerings typically involve compromises or creative thinking to get them to do what you want in a specific location, so I love the possible DIY customization. I like your pictures of white buttons integrated into the switch plate avoiding the Decora style insert.

  9. Things might be different in the US but here in the UK it is not common practice to have the Neutral conductor within switch drops.
    I also notice that you use the Neutral in your circuit as the 0V or GND line.
    Effectively this leaves your project at mains potential, that’s ok if it’s double isolated Class II else your unlikely to get any electrical approval for this project for production.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s