SONOFF

gaurav
Posts: 82
Joined: Mon May 08, 2017 9:49 am

Re: SONOFF

Post by gaurav » Thu Jul 12, 2018 9:09 am

How do I check it if BTN is BISTABLE?

User avatar
pzygmunt
Posts: 4148
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Re: SONOFF

Post by pzygmunt » Thu Jul 12, 2018 9:13 am

Check your config

gaurav
Posts: 82
Joined: Mon May 08, 2017 9:49 am

Re: SONOFF

Post by gaurav » Thu Jul 12, 2018 10:45 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.

User avatar
pzygmunt
Posts: 4148
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Re: SONOFF

Post by pzygmunt » Thu Jul 12, 2018 10:47 am

supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;

gaurav
Posts: 82
Joined: Mon May 08, 2017 9:49 am

Re: SONOFF

Post by gaurav » Thu Jul 12, 2018 11:15 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;

User avatar
pzygmunt
Posts: 4148
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Re: SONOFF

Post by pzygmunt » Thu Jul 12, 2018 11:17 am


gaurav
Posts: 82
Joined: Mon May 08, 2017 9:49 am

Re: SONOFF

Post by gaurav » Fri Jul 13, 2018 7:07 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

Post Reply