Inspiration
Magi Home was heavily inspired by Magi Quest, an interactive Live Action Role Playing Game that uses anamatronics controlled by magic wands with IR transmitters in them. We used these wands to control IoT devices that are primarilly for homes.
What it does
Magi Home adds a little magic and a lot of fun to life by using wizard wands to control household lights, smart plugs, home speakers, TV's, garage doors, and any other IoT device you may have. Magi Home uses a unique identifier for each wand allowing for complete customization of actions. to showcase this, we assigned a favorite color, Wizard name and score to each wand. We used a multi-colored LED to display some possibilities of having a unique wand ID and wizard data by changing the color of the LED to the wizard's favorite color. We implemented 2 interactive minigames that take advantage of the uniqueness of each wand: Hot Potato, and Quick Draw. in Hot potato, wizards take turns casting their wand at the sensor when it turns their color. if a wizard casts their wand when the light is not their color, then they are eliminated from the game and all other wizards gain points. In Quick Draw, wizards face off in a heated battle do decide who is the fastest spellcaster, but cast before the light changes and doom is in your future.
How we built it
We used many languages and frameworks in designing Magi Home. we recieved signal from an infared sensor using an arduino NANO coded in C++ and the IrRemote library. we initialized multiple sensors simultaniously on different pins using the hardware interrupts on the NANO. once the data was collected, we formatted it into a 9 byte UART protocol. that included Wand ID sensor number, and magnitude/command of the wand motion. This payload was sent to a Raspberry Pi PICO 2 W which parsed the information and determined where the information would go. The Pico would initially try to send the data to a webserver formatted with a custom api we made during the Hackathon.
The Webserver handles adding user preferences and the game logic. The webserver makes contact with a smart home integration server hosted on a Raspberry Pi 3 called Home Assistant(HA) via the Home Assistant REST API. HA manages all integrations and device connectivity. If the PICO is not able to make contact with the webserver, then it will attempt to make direct contact with Home assistant via a MQTT Broker hosted on Home Assistant called Mosquitto. Home Assistant supports native automation between devices so the fallback automations used recognize the sensors as devices. We followed a similar process for a second arduino that natively supports wifi. we did not need the pico in our second signal source and we did not set this system up for MQTT.
Challenges we ran into
Getting multiple sensors to read simultaniously using interrupts was quite challenging. We did not expect that there would be a lot of trouble with this however the way multiple instances of IR recievers was drastically different between the different versions of IrRemote. We had to adapt example codes and read the documentation for the Library. The sensors themselves are also finicky and sometimes double fire or do not pick up signal. We also had to troubleshoot some faulty wires.
Accomplishments that we're proud of
this project had two distinct parts. IoT, And the Web application In the end we did managed to produce 3 IR sensors that could read simultaniously and send the data using two different frameworks and languages; convert the original signal between 6 different communication barriers to produce accurate, stable, and predicted values; differentiate between every wand and sensor; develop 2 interactive minigames; and control an IoT ecosystem with a wizard wand!!
What we learned
This project definitely streched us in its complexity. there was a lot to keep track of from using 3 different microcontrollers with different frameworks, to setting up a webserver and making a custom API, to setting up a Home Assistant server on another Pi. In total we had 5 physical systems with different ecosystems and their own unique advantages and disadvantages. This project developed our ability to compartmentalize and work with both low level and high level systems, design and implement IoT protocols and devices, and design a custom REST API.
What's next for Magi Home
We plan on implementing Magi Home in our own House. We have done the hard part of integrating and building the framework, now we plan on expanding the amount of sensors, IoT devices, and games available to play. In the near future we plan on improving the website's UI and making the wand users dynamic instead of hard coded.
Built With
- adafruit-metro-esp32-s3
- arduino
- arduino-nano
- arduinojson
- atmelavr
- c++
- custom-api
- espresif32
- google-home-mini
- home-assistant-rest-api
- home-assistantos
- irremote
- magiquest
- micropython
- mosquitto-broker
- mqtt
- nuxt.js
- philips-wiz
- raspberry-pi
- raspberry-pi-pico
- tailwindcss
- urequest
- vue.js

Log in or sign up for Devpost to join the conversation.