Does this project spark your interest?

Become a member to follow this project and don't miss any updates

The Moteino Framework

Automation framework based on wireless Moteino nodes.

10 117 137
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 07/30/2014 and last updated 9 hours ago.

The Moteino automation system is a decoupled framework designed to add convenience, monitoring, security and safety to a residence. It is comprised of several devices that are all based on the Moteino wireless Arduino clone.

Introduction and mission statement

I have long wanted to build my own automation framework for my residence. All existing solutions were either expensive, poorly designed, underperformant, bulky or not versatile enough for what I needed. So I created the Moteino, a low power wireless Arduino compatible based on the popular Atmega328p chip, that accepts RFM69W/HW/CW or RFM12B transceivers on reverse, is of SD card size, is wirelessly programmable and can fit in very small enclosures.

Among other things, I wanted this system to be:

  • Open source
  • Easy to build/replicate by those with some Arduino experience
  • Easily extensible and customizable
  • Inexpensive compared to other systems like Z-wave and Zigbee
  • Use common parts/sensors that are easy to source
  • Main components should have a very simple design, no exotic or complex frameworks/compilers

Sample integrated devices

Once I tested a few revisions of the Moteino and I had a robust revision, I started conceptualizing several devices that would make it easy to monitor or control certain things like:

  • Mailbox via MailboxNotifier(aka MailboxAlert or MailMote). This little sensor box can run for many months on a small LiPoly battery and reports back motion detected at the mailbox, battery level, and the last time the mailbox was opened. It became one of the most loved Moteino based devices at our house, and very popular blog project. The love for this device grows more with every Michigan winter storm. Thank you MailboxAlert!
  • Garage door via GarageMote. This device can detect the garage doors position (open, closed, unknown), and trigger an open/close action. Very useful on those stressful days when you wonder if you closed the garage.
  • The sump pump mote via an ultrasonic sensor. Going on vacation? If your sump pump fails you could come home to a few feet of water, so better safe than sorry.
  • Motion via the MotionMote. Care to know when there's motion in your house when there shouldn't be any? Me too!
  • Lights via SwitchMote. Swap your current mechanical light switches with SwitchMotes and control your lights wirelessly in addition to the new push button. They work at 120-250V but are designed to fit US electrical boxes.
  • Water meter via a photo reflective sensor. Useful to monitor water usage for potential pipe breaks or water leakage.

System design

Self imposed requirements

To make it truly useful, flexible and secure, I imposed several critical requirements for my Moteino automation framework:

  • Remote SSL secured control. The RaspberryPi gateway computer can relay a SSL secured web interface to the internet allowing the owner to check status and take actions from anywhere on the internet.
  • Real time updates. Secure sockets allow the remote interface to receive real time updates from the Pi gateway. No more boring browser refreshes.
  • Wireless over-the-air programming of critical devices or those enclosed in difficult locations (especially the SwitchMote which is wired to mains and attached in electric boxes behind covers).
  • Use the RFM69's hardware AES128bit encryption for secure wireless communication
  • Allow Email/SMS/Pushover notifications
  • The central Moteino+RaspberryPi gateway computer has to survive a power outage and continue to receive critical messages from battery operated nodes such as MotionMote.
  • Components have to be easy to source, manufacture and system easy to scale. The network can be extended with new Moteino based devices at any time without changing the topology or disturbing existing devices.

RFM69 library

I've spent several weeks developing the RFM69 library which I made free and open source, is now widely used in RFM69 based projects, and now also used in several other THP entries. I'm very happy others found my work useful and I applaud the Reactron Overdrive and PlantFriends THP projects who used Moteinos (or clones) and RFM69 library and took the time to give credit, I wish them all the best as co-entrants. Some of the components of this system have been in the...

Read more »

  • 2 × Moteino The heart of the "Moteino Framework". A little SD-card sized breadboard friendly, wireless equipped, atmega328p based development board. Would need at least 2 to make a framework of things. Also a USB version is available and the new MoteinoMEGA for larger more memory intense projects.
  • 1 × RaspberryPi This is my choice for this framework and was used to develop the central gateway that communicates with the rest of the Moteino Framework and also delivers secure websockets and live updates to internet clients.
  • 1 × MotionMote Kit Itself a kit of several components, makes up a truly wireless low power motion sensor.
  • 1 × SwitchMote Kit Use a few of these to replace your traditional light switches and sync your lights or control them from the internet.
  • 1 × GarageMote Kit Install one on your garage door, add a Moteino and your garage is on the internet!
  • 1 × PowerShield and HC-SR04 ultrasonic sensor The HC-SR04 needs 5V so I used a PowerShield to provide that from a LiPo battery. This is for the sump pump sensor and a parking assist project that I may also add details later. and
  • 1 × EE-SY310 photoreflective sensor This is for reading the water meter, might also work for analog electric meters.
  • 1 × ATXRaspi or MightyBoost PSU for RaspberryPi Added a true power button to shutdown the Pi cleanly and not require logon. Or do the same and add Lipo battery backup in case of power outage and control it via Moteino with MightyBoost instead. and

Project logs
  • Pi gateway upgraded to battery backup

    14 hours ago • 0 comments

    The gateway that drives the Moteino Framework relies on power from the utility. If there is an outage, even a short one, the RaspberryPi will shutoff and SD card file system could be corrupted. So I upgraded the gateway from ATXRaspi to MightyBoost which supports the same nice shutoff button interface but adds the ability to switch to battery backup in case of an outage, and monitor the battery voltage in case power is out for a long time. The goal is to always shutoff the Pi gracefully to avoid SD corruption.

    I had to lasercut a new mid layer for my existing Pi Gateway lasercut case. I have posted the changes (corel and DXF files) in the github repo so you can customize &/or lasercut your own if you’d like. As usual, I like to cut the new template in cardboard and do a fitting test, measure any adjustments, re-cut if needed, then finally when it’s perfect cut it in the more expensive translucent acrylic.

    I have used one of my OSHPark prototypes and an old Moteino R1 to drive the MightyBoost using the provided sketch. This allows me to use a power button as before, monitor backup battery voltage through Moteino A7, control the standalone i2c LCD via Moteino to display status and messages from the Moteino Framework. And yes, there are 2 Moteinos in this setup. I could have used a single Moteino for everything, but that would mean combining the MightyBoost control sketch with my main RFM69 receiving sketch, and I wanted to avoid that.

    Also, the MightyBoost sketch will hardly ever need changes. But the gateway sketch is tweaked quite often, and I like to wirelessly program the gateway Moteino without loosing control of the MightyBoost power (ie a wireless programming sequence involves a hardware reset which would shut power off on the MightyBoost Moteino). I hope that makes sense. For an end user, in terms of cost, the extra transceiver-less Moteino that drives MightyBoost is a mere $12.95 at time of writing, hardly something to argue about as far as savings. I think it’s a good tradeoff for modularity and separation of concerns, and allows maximum flexibility. If changes are required on the MBoost Moteino, just power it off, plug in your FTDI, upload the sketch, then power back on. As simple as that. Here is the final install of this upgrade:

    The full writeup is on my blog and the laser cut plans are on github along with source code for the gateway firmware. See the previous blog entry that goes into more detail about the laser cutting.

  • New MotionMote and OLED Moteino receiver

    a month ago • 0 comments

    Over the past year and since I published my initial mailbox notifier project, I've been asked by various people if I could build a standalone receiver for the Moteino network of things. Some people wanted just an LED to light up when a certain packet is received (like the mailbox was opened), others wanted an LCD to see the entire message and battery level, or other things like that. I kept wanting to get to this, however I was always too busy but kept juggling the idea in my mind.

    At the same time I wanted to have a better MotionMote solution (also featured on HAD). One that would be chargeable and programmable through USB. This could be used as mailbox notifier, or as motion detector.

    So the past few weeks I've been working on revisions of a combination of the above: a motion detector and standalone Moteino receiver with LED and OLED screen. The result is below (I will need to make a nice case for the receiver):

    This combined PCB can accept a standard PIR sensor, or a typical I2C

    SSD1306 OLED screen to create dual functionality. It can be a motion detector (or mailbox notifier), or a receiver for the motion/mailbox message, or of course a receiver for any of your Moteino framework(s). Just charge and program it over USB. It will take a 1000mAh battery which should fit nicely under the PCB and into the lasercut acrylic case, and should provide many months of runtime as a motion sensor, and probably a day or two as an OLED receiver.

  • Solution for RaspberryPi battery backup

    a month ago • 0 comments

    To solve the battery backup issue I designed a board that would run like an ATXRaspi (when paired with a Moteino), but in addition also have backup power from a LiPo battery. It acts as a charger/5V booster and can provide up to 2A for 5V loads. This is perfect for the RaspberryPi computer running the Moteino Framework.

    I was able to get past the prototype stage and get a batch of these MightyBoost boards assembled. Here is a diagram of the various functions/pins on the board:

    It has many uses (like charging your phone, or just act as a standalone supply for other 5V embedded systems). But mainly I designed it to be used with things like the RaspberryPi, providing a power button interface for easy shutdowns, automatic switching to battery backup when power is lost (battery is also charged while plugged in externally), battery monitoring and clean shutdowns when the battery runs dry.

    Here is the MightyBoost details page and more will be added later. I need to upgrade the gateway computer to a newer Pi and also upgrade from ATXRaspi to MightyBoost. Stay tuned for more updates.

View all 5 project logs

Build instructions
  • 1

    Build instructions for the various projects can be found at and cab generally be accessed through the main menu.


Richard Johnson wrote 5 days ago null point

Nice project.
How open is the network of the devices?
Is it possible to be hacked? I don't like RF control systems for this reason.

Are you sure? [yes] / [no]

Felix Rusu wrote 5 days ago null point

You have a choice of AES128bit hardware encryption on the wireless transmissions. Then you can implement your own algorithms to avoid any potential replay attacks (which BTW would require a fairly high tech attacker).

Are you sure? [yes] / [no]

Eric Tsai wrote 15 days ago null point

Hi Felix. I'm a fan of your RFM69 library, and use it in my own Hackaday project. Glad to see you on here! I've been using your RFM library to integrate wireless sensors into another home automation platform called OpenHAB, and it's been really great.

Are you sure? [yes] / [no]

Kenji Larsen wrote 24 days ago null point

Congratulations, Felix, on being a THP semifinalist - you certainly deserve it!

Are you sure? [yes] / [no]

hneiraf wrote 25 days ago 1 point

Moteino is definitively the best RF integrated Arduino clone.
I've tried others, but moteino is far the best option.

Are you sure? [yes] / [no]

Fernando Faria wrote a month ago null point

Really nice project.

Are you sure? [yes] / [no]

Don Oldridge wrote a month ago null point

Great project, it looks like it will address a number of problems, and make it easy to add new types of sensors and automation. Kudos on a well-documented project that looks great.

Are you sure? [yes] / [no]

Jasurbek wrote a month ago null point

Very nice, can you measure the time of flight between two sensors ?

Are you sure? [yes] / [no]

Saxx wrote 2 months ago null point

I have bought about 8 Moteinos and now use them as temperature and mumidity sensors around the house. I have connected one as a gateway to my server that logs temperature, humidity, uptime (Moteino battery life), RSSI and battery voltage. The data is uploaded to a MySQL database using my own API.

You can read about my projects on my (Not updated in a while tho...)

Now I'm making v3 of the logging system with display and barometric pressure in addition to the above mentioned.

Thanks for the Moteino and expect more orders from me :-)

Are you sure? [yes] / [no]

dickson wrote 2 months ago null point

Rock star.

Are you sure? [yes] / [no]