Sonoff-MQTT-OTA-Arduino
Sonoff-MQTT-OTA-Arduino copied to clipboard
New command: Identify
I have added a new command: Identify The command can also be executed by pressing the button 8 times
It serves two purposes:
helps you to visually find out and identify a particular device
helps you find the IP address of a device
When you execute the command "Identify" of press the button 8 times, the device's led will start to blink, showing the digits of the last octet of the IP address. You just have to count the blinks for the hundreds, tens and ones. Now you know the ip address, assigned by the dhcp server (provided you know the first 3 octets of your network) and can access the device's web server.
Moved pull request to a different branch for easier version checking
Sorry, delays of 1600 are just too much. Would need asynch protocol during 0.1 second loop.
Initially I was thinking about making it asynchronous, but then I decided that this functionality will be used in very, very rare occasions - mostly only during initial setup and when replacing / reconfiguring the device. It is almost certain that during this period the device will not be in production and this delay will not do any harm.
On the other side, making it asynchronous will increase the code size and complexity.
However, we may think of a more general solution - to create a "blink the led N-times" asynchronous procedure, which can be used for other purposes in the future (for example - to confirm a command execution, etc.)