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
{{ message }}
Repository navigation
Toggle on/off with ir.json does not work very well #2231
Hi!
I added a custom ir.json to the filesystem. However on/off does not work very well. I have to press the button multiple times to get a reaction. All other buttons work fine. When I add my code with #define IRCUSTOM_ONOFF into ir_codes.h, the reaction is fine. This is the on/off part of my json file:
"0xFF02FD": { "label": "Toggle on/off", "pos": "1x4", "cmd": "T=2", "rpt": true },
I have noticed that too occasionally but have attributed this to the repeat function of buttons.
If I hold the on/off toggle button for a bit too long is starts repeating (you can see 0xFFFFFFFF sent) and that may confuse JSON code. @scottrbailey may need to take a look.
Activity
blazoncek commentedon Sep 26, 2021
I have noticed that too occasionally but have attributed this to the repeat function of buttons.
If I hold the on/off toggle button for a bit too long is starts repeating (you can see 0xFFFFFFFF sent) and that may confuse JSON code.
@scottrbailey may need to take a look.
mase76 commentedon Sep 26, 2021
I removed the rpt option, but this did not nake it better
blazoncek commentedon Sep 27, 2021
It is handling of repeatable codes that is an issue, not your JSON.
You will need to wait for Scott.
scottrbailey commentedon Sep 28, 2021
It seems to be rather an issue handling of any value of &T=[0,1,2]
Calling from HTTP request works fine as does changing to {"on": true}
scottrbailey commentedon Sep 28, 2021
Also works when routing through JSON api.
"cmd": {"win": "&T=2"}
mase76 commentedon Sep 28, 2021
But why are there no issues when defining the on/off toggle in ir_codes.h?
scottrbailey commentedon Sep 28, 2021
I tracked down the issue. It was because colorUpdated() wasn't being called for HTTP commands.
blazoncek commentedon Oct 3, 2021
Fixed in latest code.