Skip to content

2nd IR event handler doing the wrong action #1828

@wenhuazhang2018

Description

@wenhuazhang2018

in the summary, when there are more than 3 event handlers, the 2nd event handler for some reason will do the action of the last event handler instead of its own action.

  • version: Built on Oct 6 2025 07:36:23 version 1.18.189
  • Device Tuya IR blaster S18 chip CB3S
  • Chip/model: BK7231N
  • Device config?

this is the commands in startup:
"
startDriver IR
setFlag 1 1
addEventHandler2 IR_NEC 0xC7EA 0x17 backlog IRSend NEC 0x0 0xA8; IRSend NEC 0x0 0xA8; IRSend NEC 0x0 0xA8

addEventHandler2 IR_NEC 0xC7EA 0xF backlog IRSend NEC 0x0 0x8C; IRSend NEC 0x0 0x8C; IRSend NEC 0x0 0x8C;IRSend NEC 0x0 0x8C;IRSend NEC 0x0 0x8C

addEventHandler2 IR_NEC 0xC7EA 0x10 backlog IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C;IRSend NEC 0x0 0x9C
"

when the device boot this is what happened:
"
Info:MAIN:Started IR.
Info:CMD:CMD_StartScript: started @startup at the beginning
Info:MAIN:Drv IR is already loaded.
Info:EVENT:CMD_AddEventHandler: added IR_NEC with cmd backlog IRSend NEC 0x0 0xA8; IRSend NEC 0x0 0xA8; IRSend NEC 0x0 0xA8
Info:EVENT:CMD_AddEventHandler: added IR_NEC with cmd backlog IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C;IRSend NEC 0x0 0x9C
Info:EVENT:CMD_AddEventHandler: added IR_NEC with cmd backlog IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C; IRSend NEC 0x0 0x9C;IRSend NEC 0x0 0x9C
"

the 2nd event handler supposed send 0x8C when triggered, but instead it sent 0x9C (which is the action of the 3rd event handler). if there are 4 eventhandlers, the 2nd event handler will do the 4th event handler's action.

in the summary, the 2nd event handler for some reason will do the action of the last event handler instead of its own action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions