⚠️Request: TouchTunes Remote

Request to support and emulate TouchTunes remote

Website: https://www.touchtunes.com/


Comments

  • The ability to set the PIN from the Flipper Zero would be great!
  • Something similar to the IR remote layout would make using it a lot easier

Original GitHub Project: https://github.com/notpike/The-Fonz

  • Frequency: 433.92MHz
  • Modulation: ASK/OOK
  • Short: 10 µs
  • Long: 1000 µs
  • Sync: 0xFFFF00
  • Preamble: 0x5D
  • PIN 000-255: 0x00-0xFF (LSB)

FCC Links:


Manuals:


GitHub:


Commands:

  • On_Off: 0x78
  • Pause: 0x32 OR 0xB3
  • P1: 0x70 OR 0xF1
  • P2_Edit_Queue: 0x60
  • P3_Skip: 0xCA
  • F1_Restart: 0x20
  • F2_Key: 0xA0
  • F3_Mic_A_Mute: 0x30
  • F4_Mic_B_Mute: 0xB0
  • Mic_Vol_Plus_Up_Arrow: 0xF2
  • Mic_Vol_Minus_Down_Arrow: 0x80
  • A_Left_Arrow: 0x84
  • B_Right_Arrow: 0xC4
  • OK: 0x44 OR 0xDD
  • Music_Vol_Zone_1Up: 0xD0 OR 0xF4
  • Music_Vol_Zone_1Down: 0x50
  • Music_Vol_Zone_2Up: 0x90 OR 0xF6
  • Music_Vol_Zone_2Down: 0x10
  • Music_Vol_Zone_3Up: 0xC0 OR 0xFC
  • Music_Vol_Zone_3Down: 0x40
  • 1: 0xF0
  • 2: 0x08
  • 3: 0x88
  • 4: 0x48
  • 5: 0xC8
  • 6: 0x28
  • 7: 0xA8
  • 8: 0x68
  • 9: 0xE8
  • 0: 0x98
  • Music_Karaoke(*): 0x18
  • Lock_Queue(#): 0x58

Example:

  • Command: Pin 000 - On/Off
  • Literal Symbols HEX: ffff00 a2888a2 aaaa 8888aa2aa2220
  • Literal Symbols BIN: 11111111111111110000 10 1000 10 1000 1000 1000 10 1000 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 10 10 10 1000 10 10 10 10 1000 1000 1000 100000
  • Decoded Symbols: SYNC S L S L L L S L S S S S S S S S S L L L L S S S L S S S S L L L

Code from GitHub:

jimilinuxguy/flipperzero-touchtunes (MODIFIED):

def encode_touchtunes(command, pin=0x00):
    #Syncword
    frame = 0x5D

    #PIN
    for bit in range(8):
        frame <<= 1
        if pin&(1<<bit):
            frame |= 1
    #Insert button code and it's complement
    frame <<= 16
    frame |= (command << 8)
    frame |= (command ^ 0xFF)

    #Convert to raw signal
    #0 symble == 10 && 1 symble == 1000
    ook = ""
    for i in range(8+8+16):
        if (frame & 0x80000000):
            ook +="1000"
            frame <<=1
        else:
            ook += "10"
            frame <<=1
    return "1"*16 + "0"*4 + ook + "100000"
encode_touchtunes(COMMANDS['On_Off'], 0x00)

notpike/The-Fonz:

def encode(pin, command):
        #Syncword
        frame = 0x5D
        
        #PIN
        for bit in range(8):
                frame <<= 1
                if pin&(1<<bit):
                        frame |= 1
                                #Insert button code and it's complement
        frame <<= 16
        frame |= (command << 8)
        frame |= (command ^ 0xFF)

        #Convert to raw signal
        #0 symble == 10 && 1 symble == 1000
        ook = ""
        for i in range(8+8+16):
                if (frame & 0x80000000):
                        ook +="1000"
                        frame <<=1
                else:
                        ook += "10"
                        frame <<=1
        ook = "111111111111111100000000" + ook + "1000"
        ook = hex(int(ook,2))[2:-1]
        if len(ook) % 2 == 1:
                ook += '0'
        #ook = codecs.decode(ook, 'hex')  

        return ook

def decode(msg):
        #Strip tail, preamble is stripbed before passed to this function
        #msg = msg [24:-4] #Test
        msg = msg [:90] #Live
        
        #Convert ook to NEC
        msg = msg.replace("1000", "1")
        msg = msg.replace("10", "0")

        #Strip sync word
        msg = msg[8:]
        
        #Find command
        command = msg[8:16]
        command = int(command,2) #Str to bin
        for key, item in COMMANDS.items():
                if item == command:
                        command = key
        #PIN
        pin = msg[:8]
        pin = int(pin[::-1],2) #Bin to int, Little endian to Big endian 

        return pin, command, msg

I have seen this protocol. nothing complicated, but not very common and use sending and it will not be convenient, those need to send different upload. for this purpose, how much will they support downloading applications from a CD card, and the community will be motivated to make a direct application for this