IR Receiver - MagiQuest Wand Schema

I recently had a trip to Great Wolf Lodge and picked up some MagiQuest wands. I was hoping to integrate them into ESPHome because at first glance it looks like the protocol was already specified in the IRReciever component.

After getting it up and running it fails to decode. After more investigation it appears that MagiQuest has recently changed the protocol of their wands that no longer follow the spec previously decoded. I have posted all over github trying to find some help.

Using both ESPHome remote reciever as well as the IRRemote Library for arduino, I have success retrieved the raw & pronto data from the wands. Each transmissions appears to be of different length and different values. The original library was some help; I am looking for some sort of wand_id as well as a magnitude (I assume accelerometer data). Im just not sure where to go from here. I am looking for the next step. I tried to go through each hex datablock and see if their is anything similar between multiple transmissions with little found other than the first 8 and the last 4. Im not super familiar with IR responses.

In case anyone is willing to help, here is some sample data from 2 of my wands. Most tranmissions are about the same length but some can be very short (20 bytes)
Wand 1:

#1: 0000 006D 0021 0000 0008 0050 0008 0050 000A 004E 0008 0024 0014 0044 0014 0071 0007 0052 0012 0046 0012 001A 0014 0071 0012 0046 0007 0052 0007 0052 0014 0044 0007 0026 0016 0016 0014 0044 0007 0052 0008 0050 0008 0024 0016 0016 0014 0044 0007 0052 000A 004E 0007 0026 0014 0018 0007 0026 0014 0018 0014 0018 0014 0071 0007 0026 0014 0018 0014 06C3
#2: 0000 006D 001E 0000 0008 0052 0008 0050 0007 0052 0007 0052 0014 0044 0014 0044 0007 0052 0007 0026 0014 0044 0014 0018 0012 0046 0007 0026 0014 0071 0007 007E 0014 0071 0014 0018 0014 0071 0007 0052 0008 0050 0014 0018 0012 0073 0007 0052 0008 0050 0014 0044 0014 0018 0014 0018 0014 0044 0007 0052 0014 0018 0014 06C3          
#3: 0000 006D 0020 0000 0008 0050 0008 0050 0007 0052 0007 0026 0014 0018 0007 0026 0014 0018 0008 0050 0008 0050 0014 0044 0014 0018 0014 0071 0014 0044 0007 0026 0008 0024 0007 0052 0016 0071 0012 0018 0014 009D 0007 0052 0008 0026 0012 0018 0014 009D 0008 0052 0007 0026 0014 0018 0007 0026 0014 0018 0012 001A 0014 009D 0014 0018 0012 06C3
#4: 0000 006D 0009 0000 000E 0048 0014 00C7 0014 004A 000C 001C 0014 0075 000C 0101 0005 00A8 0008 00FF 000E 06C3 

Wand 2:

#1: 0000 006D 0023 0000 0007 0052 0007 0052 0008 0050 0008 0050 0016 0043 000A 0024 0014 0018 0014 0018 0014 0018 0012 001A 0014 0044 0014 0018 0007 0026 0014 0018 0014 0044 0007 0026 0014 0018 0007 0052 0007 0052 0014 0018 0016 0043 0014 0071 0007 0052 0008 0050 0016 0043 0007 0052 0008 0050 0007 0028 0012 0071 0014 001A 0014 0016 0014 001A 0014 0044 0014 0044 0014 06C3
#2: 0000 006D 0022 0000 0008 0050 0007 0052 0008 0050 0008 0024 0016 006F 0014 0018 0014 0018 0014 0018 0014 0018 0014 0044 0014 0044 0014 0018 0014 0071 0014 0044 0008 0050 0007 0028 0014 0016 0014 0046 0012 0046 0008 0050 0007 0052 0007 0026 0014 0018 0007 0052 0007 0052 0008 0050 0014 0018 0012 001A 0014 0018 0014 0018 0014 0018 0014 0018 0014 0071 0014 06C3
#3: 0000 006D 0022 0000 0007 0052 0007 0052 000A 004E 0007 0026 0016 0016 0007 0052 0016 0018 0012 0018 0014 001A 0014 0016 0014 0044 0014 0046 0012 001A 0014 0071 0014 0044 0007 0052 0008 0024 0014 0018 0014 0044 0014 009D 0008 0050 000A 0022 0014 0018 0014 0044 0007 0052 0007 0052 0008 0024 0014 0046 0012 0018 0014 001A 0012 0018 0014 0044 0014 001A 0012 06C3

I don’t understand the issue.
You get codes from it.

In GitHub your response to what you expect is “some wandID”. :man_shrugging:

What do you want to do with these? Let’s start there

I do receive data however, I am not able to parse them to be useful. The built in MagiQuest decoder on the remote_receiver does not function as it supposed as the decode function needs to be updated for the a newer version of the wand.

The new wands do not transmit data in the same format as the older ones. Each transmission seems to be different from the others.

Ideally I would like to have a binary sensor that would trigger when a particular wand transmits data (similar to the way the existing library does for older wands)

binary_sensor:
  - platform: remote_receiver
    name: "Magic Wand"
    id: the_wand
    magiquest:
      wand_id: 0x00000000
    filters:
      - delayed_off: 1000ms

I guess Im just looking for advise on how to start parsing the received IR transmissions to be usable.

Why are you so focused on this wand_id? Why not just use what you get?
The codeblocks in the previous post shows seven different commands, just build binary sensors based on those codes.
I would guess that is raw codes you posted. Don’t know for sure unless you show us the full debug. Or even better the yaml you use.
But just build the binary sensor on raw code and paste the codes you have.

My apologies, I didn’t really explain that. The wand is a “magic wand” type device. I have no inputs other than “waving and pointing” there are no buttons on it.
I receive all the transmissions above for the same action and to complicate matters I have more than one wand and would like some way to be able to differentiate between them.

The 4 transmissions above for “wand 1” are seemingly the same action and the same for wand 2. In a older version of the wands, it would transmit a specific length packet that could be broken down into 2 different pieces of information. A “wand_id” that identified the specific wand transmitting the signal, and a “magnitude” which was essentially “how hard did you wave it” value. These are usually decoded by sensors for the game that allowed a server to track player progress as they “collected” and “unlocked” things.

With this new wand type, it seems as though the transmissions are variable. Im trying to analyze these codes in such a way to “bring the game home” but am having some trouble deciphering what the wands are transmitting because it changes every time.

That is quite common for all IR signals if they are read RAW, but we don’t know that yet because you have not answered that or posted the yaml.

Here is my existing yaml:

esphome:
  name: magiquestrec1
  friendly_name: magiQuestRec1

esp32:
  board: esp32dev
  framework:
    type: arduino

remote_receiver:
  pin:
    number: GPIO15
    inverted: true
  dump: all

and here is the output:

...
[C][logger:439]: Logger:
[C][logger:440]:   Level: DEBUG
[C][logger:441]:   Log Baud Rate: 115200
[C][logger:443]:   Hardware UART: UART0
[C][remote_receiver.esp32:054]: Remote Receiver:
[C][remote_receiver.esp32:055]:   Pin: GPIO15
[C][remote_receiver.esp32:060]:   Channel: 0
[C][remote_receiver.esp32:061]:   RMT memory blocks: 3
[C][remote_receiver.esp32:062]:   Clock divider: 80
[C][remote_receiver.esp32:063]:   Tolerance: 25%
[C][remote_receiver.esp32:064]:   Filter out pulses shorter than: 50 us
[C][remote_receiver.esp32:065]:   Signal is done after 10000 us of no changes
[C][captive_portal:088]: Captive Portal:
[C][mdns:115]: mDNS:
[C][mdns:116]:   Hostname: magiquestrec1
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: magiquestrec1.local:3232
[C][ota:101]:   Using Password.
[C][api:139]: API Server:
[C][api:140]:   Address: magiquestrec1.local:6053
[C][api:142]:   Using noise encryption: YES
[I][remote.pronto:233]: Received Pronto: data=
[I][remote.pronto:235]: 0000 006D 0023 0000 0005 0053 0005 0053 0005 0053 0007 0026 0013 0071 0013 001A 0012 001A 0011 001C 0012 001A 0013 0045 0013 0045 0013 001A 0012 0072 0012 0047 0005 0053 0005 0027 0013 0019 0012 0047 0012 009F 000B 004E 0005 0027 
[I][remote.pronto:235]: 0012 001A 0006 0053 0005 0053 0007 0051 0005 0027 0012 001A 0005 0028 0012 001A 0011 001C 0012 001A 0012 0047 0012 001B 0012 001A 0012 0181 06C3
[I][remote.pronto:233]: Received Pronto: data=
[I][remote.pronto:235]: 0000 006D 0021 0000 0005 0053 0005 0053 0005 0053 0005 0053 0013 0045 0005 0028 0013 0019 0012 001B 0012 001A 0013 001A 0013 0045 0012 0046 0012 001A 0012 0047 0005 0028 0012 0072 0007 0051 0013 001A 0012 0046 0013 0071 0005 0053 
[I][remote.pronto:235]: 0005 0053 0013 001A 0012 0072 0005 0053 0005 0053 0013 0046 0012 001B 0011 001B 0011 001C 0012 0046 0012 001A 0013 0181 06C3
[I][remote.pronto:233]: Received Pronto: data=
[I][remote.pronto:235]: 0000 006D 0024 0000 0005 0053 0007 0052 0005 0053 0005 0027 0013 0018 0005 0053 0013 001A 0012 001A 0013 001A 0012 001A 0012 0047 0013 0046 0013 001A 0012 0072 0013 0045 0005 0053 0005 0028 0013 0018 0012 0047 0012 0047 0005 0053 
[I][remote.pronto:235]: 0005 0053 0005 0027 0012 001A 0005 0053 0007 0051 0007 0052 0012 001B 0012 0046 0013 0019 0012 001B 0012 001A 0013 0046 0005 0028 0012 001A 0011 0181 06C3
[I][remote.pronto:233]: Received Pronto: data=
[I][remote.pronto:235]: 0000 006D 0026 0000 0005 0053 0005 0053 0005 0053 0009 0024 0012 001A 0005 0053 0013 001A 0012 001A 0011 001C 0012 001A 0013 0046 0012 0047 0013 001A 0012 001A 0005 0053 0012 0047 0005 0053 0005 0027 0013 0018 0012 0047 0012 0047 
[I][remote.pronto:235]: 0005 0028 0006 0026 0007 0052 0005 0027 0012 001A 0012 0047 0009 0050 0007 0051 0005 0027 0012 001A 0005 0028 0012 001A 0013 001A 0011 001B 0011 0048 0013 001A 0012 0181 06C3
[I][remote.pronto:233]: Received Pronto: data=
[I][remote.pronto:235]: 0000 006D 0001 0000 0009 0181 06C3

Switching the dump to [raw] I receive:

[C][captive_portal:088]: Captive Portal:
[C][mdns:115]: mDNS:
[C][mdns:116]:   Hostname: magiquestrec1
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: magiquestrec1.local:3232
[C][ota:101]:   Using Password.
[C][api:139]: API Server:
[C][api:140]:   Address: magiquestrec1.local:6053
[C][api:142]:   Using noise encryption: YES
[I][remote.raw:028]: Received Raw: 163, -2140, 212, -2092, 161, -2141, 165, -999, 495, -645, 160, -2143, 518, -646, 495, -645, 487, -678, 520, -618, 463, -1841, 487, -1815, 487, -677, 492, -647, 157, -2143, 489, -1814, 160, -2143, 207, -957, 495, -644, 488, -1815, 518, 
[I][remote.raw:041]:   -1786, 205, -2097, 203, -2098, 163, -1001, 494, -645, 159, -2143, 207, -2096, 160, -2142, 519, -1785, 157, -1005, 465, -675, 487, -677, 492, -648, 460, -1842, 518, -1785, 488
[I][remote.raw:028]: Received Raw: 165, -974, 211, -2092, 210, -2092, 208, -2095, 164, -1001, 520, -2922, 490, -673, 495, -648, 485, -677, 494, -647, 486, -1815, 487, -1816, 488, -677, 493, -2948, 518, -1786, 161, -2142, 164, -999, 496, -644, 517, -1786, 488, -1814, 160, 
[I][remote.raw:041]:   -2143, 210, -2094, 163, -1000, 521, -618, 159, -2146, 207, -2097, 208, -2093, 211, -954, 523, -617, 516, -648, 463, -679, 487, -677, 491, -648, 487, -1815, 462, -702, 493
[I][remote.raw:028]: Received Raw: 161, -2141, 211, -2092, 162, -2141, 162, -2141, 517, -1786, 207, -957, 495, -644, 463, -704, 490, -649, 459, -701, 492, -1810, 492, -1810, 493, -647, 489, -2978, 492, -2948, 160, -2141, 519, -646, 494, -1810, 492, -2951, 158, -2144, 209, 
[I][remote.raw:041]:   -2095, 516, -648, 493, -2951, 158, -2144, 162, -2143, 517, -1787, 488, -676, 492, -648, 460, -705, 489, -649, 158, -1006, 493, -647, 488
[I][remote.raw:041]: Received Raw: 140
[I][remote.raw:041]: Received Raw: 390, -5465, 204, -6900, 173, -9896, 211, -987, 246, -6581, 366
[I][remote.raw:041]: Received Raw: 300, -928, 253, -4406, 144

There it is.
So why are you using all when you want magiquest codes?

Because that only decodes older versions of the wands. They have recently updated their IR schema and that no longer works.

When switching to magiquest, I do not receive any logs at all. Switching to all allows me to see that the IR receiver is working correctly, albeit not decoding the incoming stream as a magiquest code.

OK… my bad.
But you cant use the codes from raw at all?
As I said it’s fairly common you get slightly different codes, but get a large sample of the code and get the most common.
But that might not work on that device since it seems you need to make the gesture exactly the same each time.

Im trying to isolate particular pieces of info in the transmission that would allow me to use the raw data but Im not exactly sure where to look.

I’ve compared transmissions from a singular wand and have a few hex sets that are consistant but Im not sure how to go about utilizing a particular subset of data because from the documentation it looks like that in order to trigger “on_pronto” you need to have a complete transmissions.

It does look like all the transmissions begin with 0000 006D and end with 0181 06C3 but from my research it appears those are just “start” and “end” bits.