Onion Omega2 Dash

by Onion

An open-source touchscreen & Wi-Fi-connected Linux dev board

View all updates Jan 06, 2021

Field Report: Home automation controller using Onion Omega Dash and ESP8266 modules

by Carey C

I wanted to build a way to control both of my garage doors and the electric gate across my driveway. I had purchased a few Onion Omega products in the past, so when I got the Dash, I found I had the perfect display/control device in a single package. I had already built a simple MQTT-driven circuit using an ESP8266 SoC connected to nodeRed. This let me open or close the gate by connecting to the Node web UI. The issue with this approach was the overhead of opening the UI on my phone and triggering the action. When I was introduced to the DASH module, with its built-in graphic display, I thought I could use it to make a remote control device. Placed strategically around my home, such devices would let me control the doors and gate and see their status.

Initial prototype used for development

I had a bit of a learning curve understanding how to use MicroPython and the LVGL library to build out the graphics and display to accept commands and display status. My one issue was the time consumed figuring out how to actually use the LVGL commands. There are no good MP/LVGL examples, so I found myself translating the C examples into MicroPython through a lot of trial and error, I put together some video examples on my Youtube channel along with posting the code in GitHub just in case anyone is interested.

From past projects, I was already fluent with the use of MQTT. So I moved the MQTT broker over to my Onion Omega Pro, then reworked the code I created for the ESP8266 devices. They were already built like a commercial product where one can connect to them as an access point and then configure things like the WiFi host and MQTT broker which all gets saved in memory. So, upon reboot, they know how to connect up. The goal was to not have things hard coded, but rather allow the user to configure and go.

User-interface for the controller

Next, I changed the MQTT messaging over to a JSON string, so I could easily expand the message as I add other things to control within my home. I tied all together with a tabbed display for the DASH, where tab one displays the temperature of the refrigerator in my garage (you have to keep the beer cold) and tab two has buttons to control the gate at the end of my drive and both garage doors. One challenge was I wanted the display to move to the first tab after a brief amount of time, but if I was still controlling other things, I didn’t want the display to switch in the middle. Enter threads, which took me a bit, but let me add a timer thread that fires when you move over to another tab. After a countdown, it switches back unless you press a control, which restarts the timer. This way if I have a long action to perform, the screen I’m working on will persist until I stop and then it will eventually switch the display back to the first monitor tab.

My next step will be to add the ability to monitor the state of the garage doors and gate. Knowing if they are open and closed will allow me to add another MQTT client that can alert me at dusk that I left a door open and possibly cause the electric gate to automatically open as I approach on the road. With the ability to have fixed graphic displays around my home, the ability to control other things is only limited by my imagination.

About the Author

Carey C

 Simi Valley, CA


$39,134 raised

of $10,000 goal

391% Funded! Order Below

Product Choices

$75

Omega2 Dash

An Omega2 Dash IoT computer. Perfect for making internet-connected control panels and user interfaces.


$15

Ethernet Expansion

From the Onion Omega2 Pro project.

An Ethernet Expansion board for your Omega2 Dash

The Ethernet Expansion adds an Ethernet port to your Omega with a maximum connection speed of 100Mbps. While the Omega is all about wireless connectivity, a reliable wired network connection can be a great addition to a project, and the Ethernet Expansion is a great tool for quickly reflashing your Omega’s firmware.


$20

NFC/RFID Expansion

From the Onion Omega2 Pro project.

An NFC/RFID Expansion board for your Omega2 Dash

Bring contact-less RFID and NFC communication to your Omega2. It supports reading and writing with several NFC and RFID protocols at 13.56 MHz. Comes bundled with two programmable Mifare Ultralight tags.


$15

ADC Expansion

From the Onion Omega2 Pro project.

An ADC Expansion board for your Omega2 Dash

Omega2 can now read all types of analog voltages and sensors with the help of this ADC Expansion. Read and interpret up to 4 analog voltage or sensor inputs, each with 16 bits of precision.


$5

Proto Expansion

From the Onion Omega2 Pro project.

A Proto Expansion board for your Omega2 Dash

The Proto Expansion for the Onion Omega allows you to create your very own expansion that interfaces with your Omega. It provides a small soldering area and 30-pin header that plugs into the Expansion Dock. With it you will have full control over what kind of project you design for your Omega.


$15

Servo Expansion

From the Onion Omega2 Pro project.

A Servo Expansion board for your Omega2 Dash

The Servo Expansion adds 16 PWM (Pulse Width Modulation) outputs to your Omega. Connect standard servos directly to the Expansion since each channel has its own 3-pin connectors, making it that much easier to get started with your project! This Expansion is great in any application that requires servos, like a robotics project or anything with moving parts. Given that PWM is so useful, you can also use this Expansion to precisely control LEDs or drive a DC motor using an H-bridge. The Servo Expansion is often also called the PWM Expansion.

Credits

Onion

Onion is a team of technology enthusiasts, creators, and strivers, looking to make amazing products and even better user experiences. Onion has been in business since 2014, graduating from the TechStars Startup Accelerator in Boston that year. In 2015, we introduced the world to the Onion Omega IoT computer.


Lazar Demin

Zheng Han

See Also

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: