Update Reference.md
This commit is contained in:
parent
9e229cda9a
commit
4270760c40
|
|
@ -114,7 +114,13 @@ The following **optional** `homeSpan` methods enable additional features and pro
|
|||
> :warning: SECURITY WARNING: The purpose of this function is to allow advanced users to *dynamically* set the device's WiFi Credentials using a customized Access Point function specified by `setApFunction(func)`. It it NOT recommended to use this function to hardcode your WiFi SSID and password directly into your sketch. Instead, use one of the more secure methods provided by HomeSpan, such as typing 'W' from the CLI, or launching HomeSpan's Access Point, to set your WiFi credentials without hardcoding them into your sketch
|
||||
|
||||
* `void setWifiCallback(void (*func)())`
|
||||
* Sets an optional user-defined callback function, *func*, to be called by HomeSpan upon start-up just after WiFi connectivity has been established. This one-time call to *func* is provided for users that are implementing other network-related services as part of their sketch, but that cannot be started until WiFi connectivity is established. The function *func* must be of type *void* and have no arguments
|
||||
* sets an optional user-defined callback function, *func*, to be called by HomeSpan upon start-up just after WiFi connectivity has been established. This one-time call to *func* is provided for users that are implementing other network-related services as part of their sketch, but that cannot be started until WiFi connectivity is established. The function *func* must be of type *void* and have no arguments
|
||||
|
||||
* `void setPairCallback(void (*func)(boolean status))`
|
||||
* sets an optional user-defined callback function, *func*, to be called by HomeSpan upon completion of pairing to a controller (*status=true*) or unpairing from a controller (*status=false*)
|
||||
* this one-time call to *func* is provided for users that would like to trigger additional actions when the device is first paired, or the device is later unpaired
|
||||
* note this *func* is **not** called upon start-up and should not be used to simply check whether a device is paired or unpaired. It is only called when pairing status changes
|
||||
* the function *func* must be of type *void* and have one *boolean* argument
|
||||
|
||||
* `void setPairingCode(const char *s)`
|
||||
* sets the Setup Pairing Code to *s*, which **must** be exactly eight numerical digits (no dashes)
|
||||
|
|
@ -123,6 +129,12 @@ The following **optional** `homeSpan` methods enable additional features and pro
|
|||
* if *s* contains an invalid code, an error will be reported and the code will *not* be saved. Instead, the currently-stored Pairing Code (or the HomeSpan default Pairing Code if no code has been stored) will be used
|
||||
* :exclamation: SECURTY WARNING: Hardcoding a device's Pairing Code into your sketch is considered a security risk and is **not** recommended. Instead, use one of the more secure methods provided by HomeSpan, such as typing 'S \<code\>' from the CLI, or launching HomeSpan's Access Point, to set your Pairing Code without hardcoding it into your sketch
|
||||
|
||||
* void `processSerialCommand(char *c)`
|
||||
* processes the character string *c* as if it were typed into the Arduino Serial Monitor
|
||||
* allows for programmatic calls to [HomeSpan CLI commands](.../CLI.md)
|
||||
* example: `homeSpan.processSerialCommand("V");` deletes the values of all stored Characteristics from the NVS
|
||||
* example: `homeSpan.processSerialCommand("Q id");` changes the QR Code Setup ID to *id* (this is effectively the same as using the `setQRID()` method above)
|
||||
|
||||
* `void setSketchVersion(const char *sVer)`
|
||||
* sets the version of a HomeSpan sketch to *sVer*, which can be any arbitrary character string
|
||||
* if unspecified, HomeSpan uses "n/a" as the default version text
|
||||
|
|
|
|||
Loading…
Reference in New Issue