diff --git a/Configuration-Procedure-for-New-Devices.md b/Configuration-Procedure-for-New-Devices.md index bfd2a059..cd4bcb2d 100644 --- a/Configuration-Procedure-for-New-Devices.md +++ b/Configuration-Procedure-for-New-Devices.md @@ -4,27 +4,27 @@ Some smart devices have additional functionality which may be handled by codes s If your device is similar to the existing built-in module (e.g., a particular MCU or power monitoring algorithm) it is best to use that as a starting point. When you are not sure which module is suitable for your device, use `Generic module (18)`. Once you have selected the module type and saved the configuration, return to the module type configuration dialog. -1. Assign every available GPIO (excluding, at first, "dedicated" GPIO such as Tx/Rx & GPIO0/GPIO2, etc.) to one of the `Relay` relays. +1. Assign every available GPIO (excluding, at first, "dedicated" GPIO such as Tx/Rx & GPIO0/GPIO2, etc.) to successive `Relay` components. _a._ Save the configuration. Once the device reboots, use the web GUI virtual buttons to find which of the buttons assigned to GPIO actually control relays and LEDs on the device. - If you are unable to control some of the relays or LEDs on the device, they may be attached to the "dedicated" GPIO. Assign those GPIO to an unused `Relay` and repeat step _1a_. - _b._ Once you have found which GPIO control which relays and LEDs, set these "active" GPIO to associate them with the corresponding `Relay`, `LED`, or `LEDLink`. Proper operation may dictate the use regular or inverted (`Relayi`/`LEDi`/`LEDLinki`) settings. + _b._ Once you have found which GPIO control which relays and LEDs, set these "active" GPIO to associate them with the corresponding `Relay`, `LED`, or `LEDLink`. Proper operation may dictate the use regular or inverted (i.e., `Relayi`/`LEDi`/`LEDLinki`) settings. -2. Now, assign every remaining GPIO (excluding, once again, remaining "dedicated" like Tx/Rx & GPIO0/GPIO2, etc.) to `Switch`es. +2. Now, assign every remaining GPIO (excluding, once again, remaining "dedicated" like Tx/Rx & GPIO0/GPIO2, etc.) to successive `Switch` components. _a._ Save the configuration. Once the device reboots, use the web GUI Console to run the `Status 8` (sensors) command. This will display the current state of each GPIO. - _b._ Then, while pressing each button, display `Status 8` again. Whichever GPIO changes state from what was shown in step _2a_ is the GPIO connected to the button. + _b._ Then, while either holding down the button or having flipped the position of the switch, display `Status 8` again. Whichever GPIO changes state from what was shown in step _2a_ is the GPIO connected to the input. - If none of the GPIO change state, then assign the "dedicated" GPIO and retry step _2a_. - _c._ Once you have found which GPIO are connected to each button, change the GPIO setting in the configuration to a `Button`. You may need to determine whether the internal pull-up is used or not. If so, select `Button`_**n**_. _**n**_ indicates no pull-up or normally-closed. + _c._ Once you have found which GPIO are connected to each input, change the GPIO setting in the configuration to a `Button` or `Switch` according to your input component or use case. Proper operation may dictate the use regular or inverted (i.e., `Switchi`/`Buttoni`) settings. For buttons, you may need to determine whether the internal pull-up is used or not. If so, select `Button`_**n**_, where _**n**_ indicates no pull-up. - See [Using a physical pushbutton with single press, double press, and hold](https://github.com/arendst/Sonoff-Tasmota/wiki/Rule-cookbook#16-using-an-external-button-with-single-press---double-press-and-hold) to control multiple devices with one button. -3. Once you have determined which pins your device uses, set any remaining pins to `None`. +3. Once you have determined which GPIO your device uses, set any remaining GPIO to `None`. - Save the configuration.