SONOFF
-
- Posts: 82
- Joined: Mon May 08, 2017 9:49 am
I am sorry but I am unable to understand which config?
BTW I was trying to achieve the Switch input on Sonoff basic. So I changed "supla_input_cfg[0].type = INPUT_TYPE_BUTTON;" to "supla_input_cfg[0].type = INPUT_TYPE_SWITCH;" and Switch input was achieved but now I am stucked at enabling the config mode in 5 presses.
Let me know if it is done right or is there anything that I need to change in order to achieve Switch input and config mode(5 press).
Thank you.
BTW I was trying to achieve the Switch input on Sonoff basic. So I changed "supla_input_cfg[0].type = INPUT_TYPE_BUTTON;" to "supla_input_cfg[0].type = INPUT_TYPE_SWITCH;" and Switch input was achieved but now I am stucked at enabling the config mode in 5 presses.
Let me know if it is done right or is there anything that I need to change in order to achieve Switch input and config mode(5 press).
Thank you.
-
- Posts: 18356
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;
-
- Posts: 82
- Joined: Mon May 08, 2017 9:49 am
It is showing error
error: 'INPUT_TYPE_BTN_BISTABLE' undeclared(first use in this function)
supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;
error: 'INPUT_TYPE_BTN_BISTABLE' undeclared(first use in this function)
supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;
-
- Posts: 18356
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
-
- Posts: 82
- Joined: Mon May 08, 2017 9:49 am
I updated to "supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;" and "#define CFG_BTN_PRESS_COUNT 5".Still it takes 10 presses to enter config mode.
On fifth press the indication led blink slowly for two to three time if I press continuously then on tenth press it enters enter the config mode
On fifth press the indication led blink slowly for two to three time if I press continuously then on tenth press it enters enter the config mode