Skip to content

Instantly share code, notes, and snippets.

@pladaria
Created December 12, 2019 11:35
Show Gist options
  • Save pladaria/f8a1ce754f1ed3022b78f8a302d463b5 to your computer and use it in GitHub Desktop.
Save pladaria/f8a1ce754f1ed3022b78f8a302d463b5 to your computer and use it in GitHub Desktop.
Logitech Speaker System Z906 remote IR codes

From:

Code:
Protocol: NEC1
Device: 2
SubDevice: 160

Func.  OBC  HEX  EFC
Power: 128  FE   189
Input: 8    EF   053
Mute:  234  A8   079
Level: 10   AF   055
Plus:  170  AA   095
Effect:14   8F   054
Minus: 106  A9   071

Input1 4    DF   180
Input2 130  BE   191
Input3 12   CF   052
Input4 140  CE   060
Input5 2    BF   183
AUX    66   BD   167
TEST   1    7F   185


Code:
Upgrade Code 0 = 34 57 (Amp/1111) Logitech Speaker System Z906 (RM v2.02 Beta)
 5A 00 F5 20 BF FA 7F DF BE CF CE BF BD 00 00 00
 AA A9 A8 AF 8F FE EF
End
@webfrea-k
Copy link

@FUF1
Copy link

FUF1 commented Jan 27, 2021

@florianfurrer, this should help you: https://github.com/webfrea-k/ir-mapper/blob/master/ir-mapper.ino

Thanks a lot for the code! This does indeed help. Did you manage to get the above codes working without the raw codes as well? Would be nice to set the input directly for example.

@webfrea-k
Copy link

webfrea-k commented Jan 27, 2021

@florianfurrer, this should help you: https://github.com/webfrea-k/ir-mapper/blob/master/ir-mapper.ino

Thanks a lot for the code! This does indeed help. Did you manage to get the above codes working without the raw codes as well? Would be nice to set the input directly for example.

Unfortunately not yet. I tried to print out the received hex code (of Logitech remote) and send that code back out using sendNEC, sendNECStandard and others, but none of it worked. I don't think I will try again as the code above covers my needs :)

@FUF1
Copy link

FUF1 commented Jan 27, 2021

@florianfurrer, this should help you: https://github.com/webfrea-k/ir-mapper/blob/master/ir-mapper.ino

Thanks a lot for the code! This does indeed help. Did you manage to get the above codes working without the raw codes as well? Would be nice to set the input directly for example.

Unfortunately not yet. I tried to print out the received hex code (of Logitech remote) and send that code back out using sendNEC, sendNECStandard and others, but none of it worked. I don't think I will try again as the code above covers my needs :)

Alright, thank you for the info. If I manage to get it to work, I will post the solution here.

@webfrea-k
Copy link

@florianfurrer, this should help you: https://github.com/webfrea-k/ir-mapper/blob/master/ir-mapper.ino

Thanks a lot for the code! This does indeed help. Did you manage to get the above codes working without the raw codes as well? Would be nice to set the input directly for example.

Unfortunately not yet. I tried to print out the received hex code (of Logitech remote) and send that code back out using sendNEC, sendNECStandard and others, but none of it worked. I don't think I will try again as the code above covers my needs :)

Alright, thank you for the info. If I manage to get it to work, I will post the solution here.

Great, looking forward to it! :)

@valentinkauf
Copy link

valentinkauf commented Apr 24, 2021

For my project : https://github.com/valentin2251/orangepi_zero_IR_Siri i used an Arduino Nano to send those codes to my Z906.
I had to convert them in RAW :

HEX VALUE BINARY REVERSED / OBC IN HEX / SubDevice in HEX / Device in HEX
POWER  7F80A002
INPUT  F708A002
Mute   15EAA002
Level  F50AA002
Plus   55AAA002
Effect F10EA002
Minus  956AA002

Input1 FB04A002
Input2 7D82A002
Input3 F30CA002
Input4 738CA002
Input5 FD02A002
AUX    BD42A002
TEST   FE01A002

@hatl
Copy link

hatl commented Jun 18, 2021

here's my lircd config:

begin remote

  name  Logitech_Z906
  bits                16
  flags SPACE_ENC|CONST_LENGTH
  eps                 30
  aeps               100
  header      8931  4457
  one          536  1681
  zero         536   552
  ptrail             533
  pre_data_bits       16
  pre_data        0x4005
  gap             107503
  toggle_bit_mask    0x0

      begin codes
         POWER         0x01FE
         INPUT         0x10EF
         INPUT_1       0x20DF
         INPUT_2       0x41BE
         INPUT_3       0x30CF
         INPUT_4       0x31CE
         INPUT_5       0x40BF
         MUTE          0x57A8
         LEVEL         0x50AF
         EFFECT        0x708F
         VOLUME_DOWN   0x56A9
         VOLUME_UP     0x55AA
         AUX           0x42BD
         TEST          0x807F
      end codes

end remote

@tomaszkoc
Copy link

Could anybody post a base64 codes for this remote to use with Home Assistant Broadlink integration?

The ones below I was able to "learn" by pressing physical buttons on the remote, but I am not able to figure out the codes for INPPUT1-INPUT5 because the remote does not have those physical buttons...

"logitech_z906_speakers": {
    "power": "JgBYAAABJpEUERQ1FBEUEBQRFBEUERQQFBEUERISFBEUERQ1FBEUNRQRFBAUERQRFBEUEBMSFDUUNRQ1FDUUNhQ1FDUUNRQQFAAF3AABJ0gUAAxMAAEoRxIADQU=",
    "input": "JgBQAAABJJMTEhI3EhMSExISExISExITEhITEhITEhITEhI3ExISNxMSEhMSEhM3EhISExITEhITNxI3EjcSEhM3EjcSNxI3EgAF3QABJkkSAA0F",
    "mute": "JgBQAAABJJMTEhI3ExISExITEhISExITEhITEhITEhMSEhM2ExISNxMSEjcSExI3EhMSNxI3EjcSNxITEjcSExI3EhMSEhMSEgAF3QABJkkSAA0F",
    "level": "JgBQAAABJZMSEhM3EhITEhITEhMSEhITEhMSEhMSEhMSEhM3EhITNxISEzYTEhI3EhMSExISExISNxITEjcSExI3EjcSNxI3EgAF3QABJkkTAA0F",
    "volume_down": "JgBQAAABJZMSExI3EhITEhITEhMSEhMSEhMSExISExISExI5EBMSNxISEzcSExI2ExISNxM2ExISNxITEjcSExI3EhMSEhM2EwAF3AABJkoSAA0F",
    "volume_up": "JgBQAAABJZMSEhM3EhISExITEhITEhITEhMSEhMSEhMSEhM3EhMSNxISEzYTEhI3EhMSNxITEjcSNxITEjcSExI3EhITNxISEgAF3QABJkkTAA0F",
    "effect": "JgBQAAABJJMSExQ1FBESExMRFBEUERISFBEUERQRFBAUERI3EhMUNRITFDUUNRQ1EhMSExQQFBEUNRITFBESEhQ1FDYUNRQ1FAAF2gABKEgUAA0F"
}

@tomaszkoc
Copy link

no need for help anymore, I managed to convert codes available here https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/logitech/
using this tool https://github.com/molexx/irdb2broadlinkha
(installed Ubuntu under WSL especially for this)

here is the output in case anybody needs that - it works:

'z906key_power':
  friendly_name: "z906KEY_POWER"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESERIREhESERIREjQSNBI0EjQSNBI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input':
  friendly_name: "z906INPUT"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESERI0EhESERIREhESNBI0EjQSERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_mute':
  friendly_name: "z906KEY_MUTE"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBI0EjQSNBIREjQSERI0EhESERIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906level':
  friendly_name: "z906LEVEL"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESERIREhESNBIREjQSERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906effect':
  friendly_name: "z906EFFECT"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSNBI0EhESERIREhESNBIREhESERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_kpplus':
  friendly_name: "z906KEY_KPPLUS"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBI0EhESNBIREjQSERI0EhESERI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_kpminus':
  friendly_name: "z906KEY_KPMINUS"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBIREjQSNBIREjQSERI0EhESNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input1':
  friendly_name: "z906INPUT1"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBIREhESERIREhESNBI0EhESNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input2':
  friendly_name: "z906INPUT2"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERIREjQSNBIREjQSNBI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input3':
  friendly_name: "z906INPUT3"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBI0EhESERIREhESNBI0EhESERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input4':
  friendly_name: "z906INPUT4"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBI0EhESERIREjQSNBI0EhESERI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input5':
  friendly_name: "z906INPUT5"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERIREhESNBIREjQSNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_aux':
  friendly_name: "z906KEY_AUX"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERI0EhESNBIREjQSNBI0EjQSERI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906test':
  friendly_name: "z906TEST"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBI0EhESERIREhESERIREhESERI0EjQSNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

@pladaria
Copy link
Author

Nice! Thank you!

@Dillton
Copy link

Dillton commented May 26, 2022

no need for help anymore, I managed to convert codes available here https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/logitech/ using this tool https://github.com/molexx/irdb2broadlinkha (installed Ubuntu under WSL especially for this)

here is the output in case anybody needs that - it works:

'z906key_power':
  friendly_name: "z906KEY_POWER"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESERIREhESERIREjQSNBI0EjQSNBI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input':
  friendly_name: "z906INPUT"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESERI0EhESERIREhESNBI0EjQSERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_mute':
  friendly_name: "z906KEY_MUTE"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBI0EjQSNBIREjQSERI0EhESERIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906level':
  friendly_name: "z906LEVEL"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESERIREhESNBIREjQSERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906effect':
  friendly_name: "z906EFFECT"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSNBI0EhESERIREhESNBIREhESERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_kpplus':
  friendly_name: "z906KEY_KPPLUS"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBI0EhESNBIREjQSERI0EhESERI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_kpminus':
  friendly_name: "z906KEY_KPMINUS"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERI0EhESNBIREjQSNBIREjQSERI0EhESNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input1':
  friendly_name: "z906INPUT1"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBIREhESERIREhESNBI0EhESNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input2':
  friendly_name: "z906INPUT2"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERIREjQSNBIREjQSNBI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input3':
  friendly_name: "z906INPUT3"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBI0EhESERIREhESNBI0EhESERI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input4':
  friendly_name: "z906INPUT4"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREhESNBI0EhESERIREjQSNBI0EhESERI0EjQSNBIREwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906input5':
  friendly_name: "z906INPUT5"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERIREhESNBIREjQSNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906key_aux':
  friendly_name: "z906KEY_AUX"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBIREjQSERIREhESERI0EhESNBIREjQSNBI0EjQSERI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

'z906test':
  friendly_name: "z906TEST"
  command_on: 'JgBQAAABJpASERI0EhESERIREhESERIREhESERIREhESERI0EhESNBI0EhESERIREhESERIREhESERI0EjQSNBI0EjQSNBI0EwAGDQABJkYTAAxHDQUAAAAAAAA='

Hi, very nice thank you very much. I am just working on the exact same thing.
One question, can you tell me where are the codes stored for Broadlink integration in Home Assistant please? I could not find the file.
Thanks in advance :)

@tomaszkoc
Copy link

on my RaspberryPi the Broadlink config file is here:
/config/.storage/broadlink_remote_24dfa7f0e29c_codes

@Dillton
Copy link

Dillton commented May 26, 2022

Yeah I know already. I missed the "." in storage folder name so did not realized its hidden folder and cant be seen in file editor xD
One more thing. Did you just modified and saved the file with codes? Or is there some different approach to learn the codes correctly?
I am asking mostly because of the Input1-5 codes which does not have physical buttons on remote.

@tomaszkoc
Copy link

i only edited this file by adding new codes wrapped by the same syntax as others previously learned, it worked immediately after edits

@Dillton
Copy link

Dillton commented May 26, 2022

Thank you very much, finally I can use one remote for Xiaomi box, TV and Z906 plus some automations for switching inputs based on active devices :)

@FourtyNos
Copy link

Hi, anybode who made it work with esphome? could use some help. it took the codes from @hatl in translated it in binary format but it won't work.

@hatl
Copy link

hatl commented Aug 11, 2024

hi

here's the relevant part of my esphome config:

remote_transmitter:
  pin: GPIO0
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%

button: !include common/z906_ir.yaml

and the content of z906_ir.yaml

  - platform: template
    name: "Z906 Power Toggle"
    id: z906_power_toggle
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400501FE
          nbits: 32
  - platform: template
    name: "Z906 Next Input"
    id: z906_next_input
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400510EF
          nbits: 32
  - platform: template
    name: "Z906 Input 1"
    id: z906_input_1
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400520DF
          nbits: 32
  - platform: template
    name: "Z906 Input 2"
    id: z906_input_2
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400541BE
          nbits: 32
  - platform: template
    name: "Z906 Input 3"
    id: z906_input_3
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400530CF
          nbits: 32
  - platform: template
    name: "Z906 Input 4"
    id: z906_input_4
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400531CE
          nbits: 32
  - platform: template
    name: "Z906 Input 5"
    id: z906_input_5
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400540BF
          nbits: 32
  - platform: template
    name: "Z906 Mute"
    id: z906_mute
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400557A8
          nbits: 32
  - platform: template
    name: "Z906 Level"
    id: z906_level
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400550AF
          nbits: 32
  - platform: template
    name: "Z906 Effect"
    id: z906_effect
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x4005708F
          nbits: 32
  - platform: template
    name: "Z906 Volume Down"
    id: z906_volume_down
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400556A9
          nbits: 32
  - platform: template
    name: "Z906 Volume Up"
    id: z906_volume_up
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400555AA
          nbits: 32
  - platform: template
    name: "Z906 AUX"
    id: z906_aux
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x400542BD
          nbits: 32
  - platform: template
    name: "Z906 Test"
    id: z906_test
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x4005807F
          nbits: 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment