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.

Similar projects worth following

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

The Moteino automation system is a decoupled framework of internet connected things designed to add convenience, monitoring, security and safety to a residence, living space and beyond. It is powered by a range of devices that are based on the Moteino wireless Arduino compatible development board. The small size and versatility enable you to build low power nodes that gather environmental data, or devices that control things in your home.

Overview video

Demo video

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
  • Easy to scale and hardware build with manufacturability in mind

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

Artistic diagram

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 project such as the Reactron Overdrive and PlantFriends  which used Moteinos (or clones) and RFM69 library and took...

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 and MailboxNotifier 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.

Project logs
  • New WeatherShield

    a day ago • 0 comments

    I was not happy with the performance of sensors like DS18B20 which were not only expensive for the limited functionality and accuracy they offered but also cripplingly slow (taking 1 second to read temperature, seriously Dallas?!).
    So I created a new WeatherShield to measure temp/humidity/pressure accurately while also being very low power and very fast, now available to source assembled from here. These are highly accurate I2C temperature/humidity (Si7021) and atmospheric pressure (BMP180) sensors. Credit goes where it's due – this was inspired by this forum post and its author mr. A, but it's somewhat different than the one presented there. There is a sample sketch to read the data from this shield, and I will follow up with schematics and more details as they become available.

    Some of the features:

    • –40°C to +85 °C temperature range, 0-100% humidity range(Si7021).
    • Best of all these sensors are very low power
    • The Si7021 has an active conversion consumption of 150uA and standby of 60nA, and BMP180 ranges between 3-12uA in active mode and 0.1uA in standby.
    • Fast sample times, far superior to sensors like DS18B20 which require along ridiculous sample reading time of up to 1s. By comparison Si7021 requires about 4-10ms sample conversion time depending on reading resolution (8-14bit)
    • The shield can be stacked on/under a Moteino (not a MoteinoMEGA)
    • Small prototyping area where you can add a little circuit, connect it to the Moteino pins through thin hookup wire
    • BMP180 also gives temperature readings that are pretty good but it is primarily an atmospheric pressure sensor, and Si7021 has a magnitude better accuracy for temperature
    • Onboard P-mosfet driven VIN/battery monitor. This is a VIN-4.7k+10K-GND voltage divider that can be enabled by setting A3 to OUTPUT LOW and reading the VIN voltage on A7, then disabling it to save power by setting A3 to INPUT (HighZ which disconnects any battery drain through this circuit).

    These boards come at a price and instead they are precision sensors for serious weather monitoring enthusiasts and offer a set of features which makes them very battery/remote monitoring friendly and along with Moteino they can make a very small battery operated node.


  • LaserCut Case for the Pi Gateway

    a day ago • 0 comments

    NOTE: This post is also published here on my blog (more details/photos).

    Bulk made enclosures are useful when you just want basic underwear on your Pi but what if you need to put something else in there and it won't fit? I've built a Pi enclosure for my home automation gateway before but it was just 3 layers of acrylic to hold everything together, turned out nice. In this post I will show another example enclosure for a Pi gateway.

    I am finishing up a separate project where I needed to put a Pi gateway in an elegant enclosure along with an ATXRaspi+power button, and a Moteino. This guide can be used as a guide to build a RaspberryPi+ATXRaspi+Moteino setup that can all live together in a nice box to serve as an internet gateway to your Moteino or other wireless Internet Of Things network. Here is what goes in the box:

    The ATXRaspi provides power management through an illuminated power button – really nice to have when you want to physically turn the unit ON/OFF without a need to log in, both these along with the short uUSB cable can be sourced at the LowPowerLab webshop. The Moteino acts as a wireless gateway and connects to the Pi through jumper wires. Power is provided via a 2.1mm jack from an external 5V-0.7A old phone charger.

    The size of the box was predetermined after fitting the outlines of the components in CorelDraw. I then use makercase to design the basic shape of the box with slotted fingers based on the predetermined dimensions. I then import that SVG rendering into CorelDraw X5 and add the cutouts while doing my measurements. I used a DXF drawing of the Pi to find my mounting holes positions and create the cutouts for the ethernet/USB/HDMI/power button and power jack. I use digital calipers to measure everything and determine size of new cutouts. The design files of the end result are uploaded to this github repository. Here's what the final drawing looks like:

    I then cut the outlines in thin cardboard that mimics the thickness of the acrylic and do a fitting test. Most often the sides with cutouts need some fine adjustment and I end up having to cut them 2-3 times before they come out perfect:

    When everything fits perfectly I move on to cutting real acrylic which is not really expensive at 12x24sheet@$12+S/H but I'd rather make the mistakes in cardboard which I have unlimited supply, this works well and actually the cardboard is sturdy and allows me to hold the Pi with screws and fit everything with tape as if this was the real case. You will notice in the above blueprint I have several color layers, some of which don't get sent to the laser cutter. For the acrylic I used black opaque for all sides and the bottom, and grey translucent for the top to allow seeing the LEDs.

    I first make the cuts in acrylic that has the protective lining, that gives nice clean cuts. The cuts are made with a 0.075mm laser kerf adjustment (via makercase website) which will result in a tight fit case once completed, that doesn't require screws or tape. Of course you can always reinforce it with some transparent tape or weld some of the sides with WeldON #3 acrylic cement. I then fit the electronics using plastic screws and nuts, but any metal ones should work as well. I did not use any standoffs under the PCBs. I then take off the lining and perform any engraving, in this case a nice Pi logo and some text. Engraving takes a much longer time than cutting so this is another reason to leave that for a second round. I etched the logo and text at 500mm/s speed and 30% power, that gives a nice uniform and shallow engraving. The outline of the raspberry in the logo is too thin to etch so I made it cut that outline at 50mm/s speed and 15% power so it would be a very thin shallow cut, comes out as a nice discrete outline. I added some rubber standoffs on the bottom of the unit:

    So there you have it, a simple guide to make your own case. Photos don't do it justice, I think it actually looks better in reality. You can adjust the CAD/DXF to fit your own electronics...

    Read more »

  • GarageMote R2

    a day ago • 0 comments

    There is a new revision of GarageMote. Here's what this new revision consists of, and a few photos to show it assembled/installed:

    It is mostly the same as before, but it includes the following new or changed features:

    • R2 kit comes with new unipolar hall effect magnetic sensors; the pinout is the same but these sensors can detect both north/south poles of a magnet, hence easier to install without having to orient the magnet a certain way for detection.
    • R2 kit includes magnets (rectangular ); these are better than round magnets that I've personally used before. My opener belt stopping point is a little variable so the length of the magnet helps keep the fixed sensor "in range" to avoid the sensor missing the magnet and trigger an UNKNOWN status.
    • R2 kit includes a 1×8 screw terminal for easy mating with the provided cat5 cable
    • R2 kit includes a momentary button between GND and D3 – no code released for this (yet) but this can be used to add a function to your GarageMote – like SYNC-ing with a SwitchMote so you can open/close your garage from a SwitchMote button, how cool is that!
    • new 2.1 barrel jack for optionally powering the unit from an external 2.1mm jack power supply, commonly available on ebay or at major online electronics retailers

    You can find the new kit in the online webshop. The assembly/programming/usage is published here.

View all 11 project logs

Build instructions
  • 1

    The Moteino Framework is made up of many different devices that have their own build instructions. Each device has been linked in the description and in the logs to their own page on my blog where you will find instructions, sources, guides. Most build instructions for the various projects can be found at and cab generally be accessed through the main menu.

    The Github repositories containing source code, eagle files, and any CAD/visual data are found here.

See all instructions


anthony.webb wrote 4 months ago null point
One of the real critical components to a project like this is the packet/msg design and how to identify devices and their properties on the network. This may be beyond the scope of the this HaD project, but have you given any thought on on the packet/msg protocol that the devices would use to share state, etc? I presume you have something you are using in your own project, is it something you would be willing to share?

Are you sure? [yes] / [no]

Felix Rusu wrote 4 months ago null point
That would be more of a transport/app layer, you can certainly do that. What I mainly provided was a network layer. You can implement a struct kept in EEPROM that describes the physical properties and description of a node that can then self publish. I did something like that for SwitchMote - see the SwitchMote config sketch:

Are you sure? [yes] / [no]

rileyporter wrote 4 months ago null point
The amount of work and expert documentation is amazing. I am using your boards + library for my home automation projects. I hope you and your family the best and please continue to do amazing things. For the judges or others, I have to say that as a security engineer by trade the required encryption in your code is a breath of fresh air!

Also kudos for your project being used in other HaD projects! Good luck!

Are you sure? [yes] / [no]

Felix Rusu wrote 4 months ago null point
Thank you sir, I appreciate your comments :)
My best wishes to you as well!

Are you sure? [yes] / [no]

David Cook wrote 5 months ago null point
Hey Felix,

Thanks for including LoFi in your architecture log posting (I see its distinctive yellow pigtail poking into one of your pictures). I appreciate all of the hard work you’ve put into Moteino over the years, including the many revisions, and extensive support. I hope it is selling well for you.

Even though we are competitors in this event, we obviously share the same passion. If you are ever in Chicago, drop me a line so we can meet up.

Best of luck,


Are you sure? [yes] / [no]

Felix Rusu wrote 4 months ago null point
Hey David, thanks for your thoughts. You're actually far ahead in the competition (vote wise), and you've put a fair amount of work, congrats. It's about less than 1.5 years since I started making the first Moteinos so not very long. I love Chicago but we end up driving there only when we have friends over who've never been and they want to go with us. Thanks for the invitation :)

Are you sure? [yes] / [no]

Richard Johnson wrote 5 months 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 months 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 5 months 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 5 months ago null point
Congratulations, Felix, on being a THP semifinalist - you certainly deserve it!

Are you sure? [yes] / [no]

hneiraf wrote 5 months 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 5 months ago null point
Really nice project.

Are you sure? [yes] / [no]

Don Oldridge wrote 6 months 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 6 months ago null point
Very nice, can you measure the time of flight between two sensors ?

Are you sure? [yes] / [no]

Saxx wrote 6 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 6 months ago null point
Rock star.

Are you sure? [yes] / [no]

Similar projects