How about using a wand to trigger home automation?

I previously found a wand on YouTube that shoots fireballs.https://www.youtube.com/shorts/I_Z-b8vZ-GY
This sparked the idea of using a wand to trigger home automation, which would be really cool. Although there is a similar product available on Amazon, it can only be used to trigger infrared devices. https://www.amazon.com/HARRY-POTTER-Remote-Control-Wand/dp/B00FXMDRZK/ref=sr_1_1?crid=LONMKO2CSW5D&keywords=wand+remote&qid=1707033268&sprefix=wand+remot%2Caps%2C443&sr=8-1
So, I plan to create my own smart wand.

My basic idea is to use a gyroscope sensor to recognize gestures, and simulate the switch of a Zigbee door sensor’s Hall sensor through IO. This can be used to trigger automation scenes with open/close commands.

The gyroscope sensor (I’m using MPU6050) supports reading acceleration and angular velocity in the x, y, and z axes. This means I can use this data to design triggering gestures.

To avoid accidental triggers and achieve a cool effect, I have defined several actions:

  1. Picking up/activating the wand
  2. Ready to accept commands
  3. Casting a spell action (accumulating magic power)
  4. Shooting magic power!!!

To cast a spell, there are currently two ways: one is to cast to the left, and the other is to the right. This will make the gyroscope give two different acceleration signals. I use STM32 to process these signals and use the high and low levels of IO to send commands to a Zigbee door sensor’s Hall sensor. The door sensor will send open/close commands, triggering pre-designed scenes.

For a more visual and cooler effect, I also made an LED wand with a few LEDs and silicone. I use STM32’s PWM signal to control it. Let’s check it out! :star_struck:

2 Likes

Next, I plan to make a small PCB and power it with two AAA batteries to eliminate the influence of wires and make the wand swing more freely. At the same time, I’m thinking of more triggering actions and implementation methods. I will continue to update.

Any other suggestions or ideas? Looking forward to discussing with you guys. :smiley:

Did you get anywhere with this? Big Harry Potter fans here in the house. We recently visited London and got these wands ( https://www.kickstarter.com/projects/themagicofthings/the-wizard-smart-switch-the-magic-wand-activated-smart-plug ). Unfortunately the runestones are not available anymore and it unclear to me if/how I can build this with myself with esphome. Any ideas/suggestions?

Highly appreciated!

Found that the kickstarter project is just using a magnet, so that is relatively easy to build.

I did come across another interesting project: S-March (Sam March) · GitHub

1 Like

Maybe you could “extend” it with i.e an IR-Distance sensor

1 Like

May be control different devices via distance. Wow it’s cool! I will think about that. NICE

To expand more trigger conditions, I tried to use wires to transmit the signal to a Zigbee wireless button to imitate “click”, “double click”, and “long press”, then trigger scenes. But not every time is successful, possibly because the level signal transmission interval was not adjusted properly.

Recently, I have been considering using a Zigbee three way switche to make it. Each switch can send “on” and “off”, which means I can design 6 triggers and the hardware should be easier.

I also found this. A youtuber use a Vibration Sensor and YAML make a Similar thing.

However, YAML is not within my expertise, hahahahaha

Thanks for sharing.

This is the best project I have found so far. I have not have had the time to replicate