You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second addEventHandler2 command executes the action from the last command instead of its own.
When using a two-digit hex code (e.g., 0x10), the associated command gets truncated if spacing is inconsistent with other commands using single-digit hex codes (0x0 – 0xF).
Improper parsing of commands occurs when the number of spaces between the hex code and the command is not adjusted based on the length of the hex code.
Expected: The command for "0x1" executes "led_enableAll 0".
Actual: It executes the command from "0x6": "led_basecolor_rgbcw #0000FF0000".
Expected: The command for "0x10" executes "led_basecolor_rgbcw #00000000FF".
Actual: It executes the command from "0x10": "ed_basecolor_rgbcw #00000000FF".
Uh oh!
There was an error while loading. Please reload this page.
Firmware:
Symptoms
addEventHandler2
command executes the action from the last command instead of its own.0x10
), the associated command gets truncated if spacing is inconsistent with other commands using single-digit hex codes (0x0
–0xF
).Example of Incorrect Behavior:
addEventHandler2 IR_NEC 0xEF00 0x0 led_enableAll 1
addEventHandler2 IR_NEC 0xEF00 0x1 led_enableAll 0
addEventHandler2 IR_NEC 0xEF00 0x10 led_basecolor_rgbcw #00000000FF
addEventHandler2 IR_NEC 0xEF00 0x4 led_basecolor_rgbcw #FF00000000
addEventHandler2 IR_NEC 0xEF00 0x5 led_basecolor_rgbcw #00FF000000
addEventHandler2 IR_NEC 0xEF00 0x6 led_basecolor_rgbcw #0000FF0000
Expected: The command for "0x1" executes "led_enableAll 0".
Actual: It executes the command from "0x6": "led_basecolor_rgbcw #0000FF0000".
Expected: The command for "0x10" executes "led_basecolor_rgbcw #00000000FF".
Actual: It executes the command from "0x10": "ed_basecolor_rgbcw #00000000FF".
Corrected Version:
addEventHandler2 IR_NEC 0xEF00 0x0 led_enableAll 1
addEventHandler2 IR_NEC 0xEF00 0x1 led_enableAll 0
addEventHandler2 IR_NEC 0xEF00 0x10 led_basecolor_rgbcw #00000000FF
addEventHandler2 IR_NEC 0xEF00 0x4 led_basecolor_rgbcw #FF00000000
addEventHandler2 IR_NEC 0xEF00 0x5 led_basecolor_rgbcw #00FF000000
addEventHandler2 IR_NEC 0xEF00 0x6 led_basecolor_rgbcw #0000FF0000
addEventHandler2 IR_NEC 0xEF00 0x1 led_enableAll 0
Key Differences:
0x0
to0xF
).0x10
).0x1
command at the end ensures correct execution.Suspected Cause
startup_command
does not account for varying lengths of hex codes, leading to misalignment and incorrect command execution.Recommendations
Tested On:
NEC IR codes received directly via remote.
OpenBeken console logs:
Info:IR:IR IR_NEC 0xEF00 0x4 (32 bits)
executing command led_basecolor_rgbcw #0000FF0000
The text was updated successfully, but these errors were encountered: