From 49d4e73a649c59d1b48e778c03624af9ae7fa10a Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:07:24 -0600 Subject: [PATCH 01/23] Update Reference.md --- docs/Reference.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index bbed105..a6c42b4 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -1,3 +1,18 @@ # HomeSpan Library Reference -*(coming soon)* +The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch as follows: + +```C++ +#include "HomeSpan.h"; +``` + +At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: + +* `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` + * begin() initializes homeSpan and **must** be called at the beginning of each sketch before any other HomeSpan functions. + * all arguments are **optional** + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) + * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" + * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" + * modelName - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" + From 9a6ee8fd8e22a5c0f0e65664aaaf9d407004ff8d Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:08:40 -0600 Subject: [PATCH 02/23] Update Reference.md --- docs/Reference.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index a6c42b4..18935a6 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -9,10 +9,9 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` - * begin() initializes homeSpan and **must** be called at the beginning of each sketch before any other HomeSpan functions. - * all arguments are **optional** - * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) - * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" - * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" - * modelName - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" + * begin() initializes homeSpan and **must** be called at the beginning of each sketch before any other HomeSpan functions. All arguments are **optional**. + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) + * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" + * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" + * modelName - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" From b4ab09c3e8d1ad1b50ea6fb38af8b2df1db9ff10 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:10:03 -0600 Subject: [PATCH 03/23] Update Reference.md --- docs/Reference.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index 18935a6..5d4e595 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -9,7 +9,9 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` - * begin() initializes homeSpan and **must** be called at the beginning of each sketch before any other HomeSpan functions. All arguments are **optional**. + * Initializes HomeSpan + * **Must** be called at the beginning of each sketch before any other HomeSpan functions. + * All arguments are **optional**. * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" From 67bd52e7b25f96c6682be0d525cf8abb5dc906a5 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:11:08 -0600 Subject: [PATCH 04/23] Update Reference.md --- docs/Reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 5d4e595..5597a19 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -10,10 +10,10 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` * Initializes HomeSpan - * **Must** be called at the beginning of each sketch before any other HomeSpan functions. - * All arguments are **optional**. + * **Must** be called at the beginning of each sketch before any other HomeSpan functions + * All arguments are **optional** * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" - * modelName - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" + * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" From 61546178e85345a869fc8679ffe8f51400aa9a54 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:16:48 -0600 Subject: [PATCH 05/23] Update Reference.md --- docs/Reference.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 5597a19..44b2d64 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -10,10 +10,13 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` * Initializes HomeSpan - * **Must** be called at the beginning of each sketch before any other HomeSpan functions + * **Must** be called at the beginning of each sketch (typically in `setup()`) before any other HomeSpan functions * All arguments are **optional** * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" - + + * `void poll()` + * Checks for HAP requests, local commands, and device activity + * **Must** be called repeatedly in each sketch (typically placed at the top of `loop()`) From eb40abefa1ec50c9b2626699e952fec0656479e6 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:21:04 -0600 Subject: [PATCH 06/23] Update Reference.md --- docs/Reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 44b2d64..65f8c87 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -10,7 +10,7 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` * Initializes HomeSpan - * **Must** be called at the beginning of each sketch (typically in `setup()`) before any other HomeSpan functions + * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. * All arguments are **optional** * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" @@ -19,4 +19,4 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * `void poll()` * Checks for HAP requests, local commands, and device activity - * **Must** be called repeatedly in each sketch (typically placed at the top of `loop()`) + * **Must** be called repeatedly in each sketch and typically placed at the top of the Arduino `loop()` method From 820b9f69a406752cf13fa267e81144bc387b0a94 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:27:27 -0600 Subject: [PATCH 07/23] Update Reference.md --- docs/Reference.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 65f8c87..9083fc4 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -9,14 +9,16 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` - * Initializes HomeSpan + * Initializes HomeSpan. * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. - * All arguments are **optional** - * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) - * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" - * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" - * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" + * All arguments are **optional**. + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md). + * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server". + * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan". + * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32". * `void poll()` - * Checks for HAP requests, local commands, and device activity - * **Must** be called repeatedly in each sketch and typically placed at the top of the Arduino `loop()` method + * Checks for HAP requests, local commands, and device activity. + * **Must** be called repeatedly in each sketch and typically placed at the top of the Arduino `loop()` method. + +The following **optional** `homeSpan` methods override various HomeSpan initialization parameters used in `begin()`, and therefore **should** be called before `begin()` to take effect. If not called, HomeSpan uses the default parameter indicated. From 580c74c5c91c128c81b9eecd380c25b4184b0927 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:55:48 -0600 Subject: [PATCH 08/23] Update Reference.md --- docs/Reference.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 9083fc4..ed4e73e 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -3,12 +3,12 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch as follows: ```C++ -#include "HomeSpan.h"; +#include "HomeSpan.h" ``` At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: -* `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` +* `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName)` * Initializes HomeSpan. * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. * All arguments are **optional**. @@ -19,6 +19,28 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * `void poll()` * Checks for HAP requests, local commands, and device activity. - * **Must** be called repeatedly in each sketch and typically placed at the top of the Arduino `loop()` method. + * **Must** be called repeatedly in each sketch and is typically placed at the top of the Arduino `loop()` method. -The following **optional** `homeSpan` methods override various HomeSpan initialization parameters used in `begin()`, and therefore **should** be called before `begin()` to take effect. If not called, HomeSpan uses the default parameter indicated. +The following **optional** `homeSpan` methods override various HomeSpan initialization parameters used in `begin()`, and therefore **should** be called before `begin()` to take effect. If a method is *not* called, HomeSpan uses the default parameter indicated below: + +* `void setControlPin(uint8_t pin)` + * Sets the ESP32 pin to use for the HomeSpan Control Button (default=21). +* `void setStatusPin(uint8_t pin)` + * Sets the ESP32 pin to use for the HomeSpan Status LED (default=LED_BUILTIN). +* `void setApSSID(char *ssid)` + * Sets the SSID (network name) of the HomeSpan Setup Access Point (default="HomeSpan-Setup"). +* `void setApPassword(char *pwd) + * Sets the password of the HomeSpan Setup Access Point (default="homespan"). +* `void setApTimeout(uint16_t nSec)` + * Sets the duration (in seconds) that the HomeSpan Setup Access Point, once activated, stays alive before timing out (default=300 seconds). +* `void setCommandTimeout(uint16_t nSec)` + * Sets the duration (in seconds) that the HomeSpan End-User Command Mode, once activated, stays alive before timing out (default=120 seconds). + +* `void setLogLevel(uint8_t level)` + * Sets the logging level for diagnostic messages, where: + * 0 = top-level status messages only (default), + * 1 = all status messages, and + * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device. + * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md). +* `void setMaxConnections(uint8_t nCon)` + * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). From 79fb8c45027251ea451acc280e37f6fbffa094aa Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:58:02 -0600 Subject: [PATCH 09/23] Update Reference.md --- docs/Reference.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index ed4e73e..fff3f1e 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -25,14 +25,19 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * `void setControlPin(uint8_t pin)` * Sets the ESP32 pin to use for the HomeSpan Control Button (default=21). + * `void setStatusPin(uint8_t pin)` * Sets the ESP32 pin to use for the HomeSpan Status LED (default=LED_BUILTIN). + * `void setApSSID(char *ssid)` * Sets the SSID (network name) of the HomeSpan Setup Access Point (default="HomeSpan-Setup"). -* `void setApPassword(char *pwd) + +* `void setApPassword(char *pwd)` * Sets the password of the HomeSpan Setup Access Point (default="homespan"). + * `void setApTimeout(uint16_t nSec)` * Sets the duration (in seconds) that the HomeSpan Setup Access Point, once activated, stays alive before timing out (default=300 seconds). + * `void setCommandTimeout(uint16_t nSec)` * Sets the duration (in seconds) that the HomeSpan End-User Command Mode, once activated, stays alive before timing out (default=120 seconds). @@ -42,5 +47,6 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * 1 = all status messages, and * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device. * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md). + * `void setMaxConnections(uint8_t nCon)` * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). From 56b20cf244aede44dd0a0887edfbdd6f9be26a60 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:59:03 -0600 Subject: [PATCH 10/23] Update Reference.md --- docs/Reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index fff3f1e..d312cd2 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -46,7 +46,7 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * 0 = top-level status messages only (default), * 1 = all status messages, and * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device. - * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md). + * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md#log-levels). * `void setMaxConnections(uint8_t nCon)` * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). From 3cf9c5c9c78bda81865afc4b28ab6bb8881ec345 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:59:37 -0600 Subject: [PATCH 11/23] Update Reference.md --- docs/Reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index d312cd2..fff3f1e 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -46,7 +46,7 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * 0 = top-level status messages only (default), * 1 = all status messages, and * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device. - * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md#log-levels). + * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md). * `void setMaxConnections(uint8_t nCon)` * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). From fb03c4a7f6804e5eda79f3aab1fd5294100c613b Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 14:01:37 -0600 Subject: [PATCH 12/23] Update Reference.md --- docs/Reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index fff3f1e..b2a424a 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -12,7 +12,7 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * Initializes HomeSpan. * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. * All arguments are **optional**. - * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md). + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is Category::Lighting. See [HomeSpan Categories](Categories.md) for a complete list. * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server". * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan". * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32". From 4acddaa7ab4669684550f9f9d20b6e9173cbe16a Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 15:18:31 -0600 Subject: [PATCH 13/23] Update Reference.md --- docs/Reference.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index b2a424a..8234ebd 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -12,7 +12,7 @@ At runtime this HomeSpan will create a global object named `homeSpan` that suppo * Initializes HomeSpan. * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. * All arguments are **optional**. - * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is Category::Lighting. See [HomeSpan Categories](Categories.md) for a complete list. + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is Category::Lighting. See [HomeSpan Accessory Categories](Categories.md) for a complete list. * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server". * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan". * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32". @@ -50,3 +50,16 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * `void setMaxConnections(uint8_t nCon)` * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). + +## Creating the HAP Accessory Attributes Database - Primary Classes + +The HAP Accessory Attributes Database is constructed by instantiating (using `new`) a combinaton of the following HomeSpan Classes: + +* `SpanAccessory()` + * This creates a new HAP Accessory to hold HAP Services. + * There are no arguments or methods. + * You must call `homeSpan.begin()` before instantiating any Accessories. + * Every HomeSpan sketch requires at least one Accessory. + +* `SpanService()` + * This is the base class for creating new HAP Services. It should From aed2936b112a2261287d8447524342b1dc418beb Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 19:27:38 -0600 Subject: [PATCH 14/23] Update Reference.md --- docs/Reference.md | 59 ++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 8234ebd..8d07dc7 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -6,60 +6,67 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch #include "HomeSpan.h" ``` +## *homeSpan* (object) + At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName)` - * Initializes HomeSpan. - * **Must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor. - * All arguments are **optional**. - * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is Category::Lighting. See [HomeSpan Accessory Categories](Categories.md) for a complete list. - * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server". - * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan". - * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32". + * initializes HomeSpan + * **must** be called at the beginning of each sketch before any other HomeSpan functions and is typically placed near the top of the Arduino `setup()` method, but **after** `Serial.begin()` so that initialization diagnostics can be output to the Serial Monitor + * all arguments are **optional** + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is Category::Lighting. See [HomeSpan Accessory Categories](Categories.md) for a complete list + * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" + * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" + * *modelName* - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" + * example: `homeSpan.begin(Category::Fans, "Living Room Ceiling Fan");` * `void poll()` - * Checks for HAP requests, local commands, and device activity. - * **Must** be called repeatedly in each sketch and is typically placed at the top of the Arduino `loop()` method. + * checks for HAP requests, local commands, and device activity + * **must** be called repeatedly in each sketch and is typically placed at the top of the Arduino `loop()` method The following **optional** `homeSpan` methods override various HomeSpan initialization parameters used in `begin()`, and therefore **should** be called before `begin()` to take effect. If a method is *not* called, HomeSpan uses the default parameter indicated below: * `void setControlPin(uint8_t pin)` - * Sets the ESP32 pin to use for the HomeSpan Control Button (default=21). + * sets the ESP32 pin to use for the HomeSpan Control Button (default=21) * `void setStatusPin(uint8_t pin)` - * Sets the ESP32 pin to use for the HomeSpan Status LED (default=LED_BUILTIN). + * sets the ESP32 pin to use for the HomeSpan Status LED (default=LED_BUILTIN) * `void setApSSID(char *ssid)` - * Sets the SSID (network name) of the HomeSpan Setup Access Point (default="HomeSpan-Setup"). + * sets the SSID (network name) of the HomeSpan Setup Access Point (default="HomeSpan-Setup") * `void setApPassword(char *pwd)` - * Sets the password of the HomeSpan Setup Access Point (default="homespan"). + * sets the password of the HomeSpan Setup Access Point (default="homespan") * `void setApTimeout(uint16_t nSec)` - * Sets the duration (in seconds) that the HomeSpan Setup Access Point, once activated, stays alive before timing out (default=300 seconds). + * sets the duration (in seconds) that the HomeSpan Setup Access Point, once activated, stays alive before timing out (default=300 seconds) * `void setCommandTimeout(uint16_t nSec)` - * Sets the duration (in seconds) that the HomeSpan End-User Command Mode, once activated, stays alive before timing out (default=120 seconds). + * sets the duration (in seconds) that the HomeSpan End-User Command Mode, once activated, stays alive before timing out (default=120 seconds) * `void setLogLevel(uint8_t level)` - * Sets the logging level for diagnostic messages, where: + * sets the logging level for diagnostic messages, where: * 0 = top-level status messages only (default), * 1 = all status messages, and - * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device. - * This parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md). + * 2 = all status messages plus all HAP communication packets to and from the HomeSpan device + * this parameter can also be changed at runtime via the [HomeSpan CLI](CLI.md) * `void setMaxConnections(uint8_t nCon)` - * Sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8). + * sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8) -## Creating the HAP Accessory Attributes Database - Primary Classes +## *SpanAccessory()* (class) -The HAP Accessory Attributes Database is constructed by instantiating (using `new`) a combinaton of the following HomeSpan Classes: +Creating an instance of this class add a new HAP Accessory to the HomeSpan HAP Database. + + * every HomeSpan sketch requires at least one Accessory + * there are no arguments or associated methods + * you must call `homeSpan.begin()` before instantiating any Accessories + * example: `new SpanAccessory();` + +## *SpanService()* (base class) + +This is a **base class** from which all HomeSpan Services are derived. To create a new Service, instantiate one of HomeSpan Services defined in the Service namespace -* `SpanAccessory()` - * This creates a new HAP Accessory to hold HAP Services. - * There are no arguments or methods. - * You must call `homeSpan.begin()` before instantiating any Accessories. - * Every HomeSpan sketch requires at least one Accessory. * `SpanService()` * This is the base class for creating new HAP Services. It should From 16636f0ec3c7aa5ba527d5437c77ab1d6200232b Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 19:30:37 -0600 Subject: [PATCH 15/23] Update Reference.md --- docs/Reference.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 8d07dc7..3fdc074 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -6,9 +6,9 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch #include "HomeSpan.h" ``` -## *homeSpan* (object) +## *homeSpan* -At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: +At runtime this HomeSpan will create a global **object** named `homeSpan` that supports the following methods: * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName)` * initializes HomeSpan @@ -54,18 +54,18 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * `void setMaxConnections(uint8_t nCon)` * sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8) -## *SpanAccessory()* (class) +## *SpanAccessory()* -Creating an instance of this class add a new HAP Accessory to the HomeSpan HAP Database. +Creating an instance of this **class** add a new HAP Accessory to the HomeSpan HAP Database. * every HomeSpan sketch requires at least one Accessory * there are no arguments or associated methods * you must call `homeSpan.begin()` before instantiating any Accessories * example: `new SpanAccessory();` -## *SpanService()* (base class) +## *SpanService()* -This is a **base class** from which all HomeSpan Services are derived. To create a new Service, instantiate one of HomeSpan Services defined in the Service namespace +This is a **base class** from which all HomeSpan Services are derived, and should not be directly instantiated. Rather, to create a new Service, instantiate one of HomeSpan Services defined in the [Service](ServiceList.md) namespace. * `SpanService()` From 99de108f6a20881785003e807eafbb4af27478fe Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 19:31:57 -0600 Subject: [PATCH 16/23] Update Reference.md --- docs/Reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index 3fdc074..4ea96f9 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -65,7 +65,7 @@ Creating an instance of this **class** add a new HAP Accessory to the HomeSpan H ## *SpanService()* -This is a **base class** from which all HomeSpan Services are derived, and should not be directly instantiated. Rather, to create a new Service, instantiate one of HomeSpan Services defined in the [Service](ServiceList.md) namespace. +This is a **base class** from which all HomeSpan Services are derived, and should not be directly instantiated. Rather, to create a new Service instantiate one of the HomeSpan Services defined in the [Service](ServiceList.md) namespace. * `SpanService()` From 0268f125f914c97c0e488377c0644403fd81c18c Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 22:52:39 -0600 Subject: [PATCH 17/23] Update Reference.md --- docs/Reference.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index 4ea96f9..b6110d2 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -56,7 +56,7 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali ## *SpanAccessory()* -Creating an instance of this **class** add a new HAP Accessory to the HomeSpan HAP Database. +Creating an instance of this **class** adds a new HAP Accessory to the HomeSpan HAP Database. * every HomeSpan sketch requires at least one Accessory * there are no arguments or associated methods @@ -65,8 +65,24 @@ Creating an instance of this **class** add a new HAP Accessory to the HomeSpan H ## *SpanService()* -This is a **base class** from which all HomeSpan Services are derived, and should not be directly instantiated. Rather, to create a new Service instantiate one of the HomeSpan Services defined in the [Service](ServiceList.md) namespace. +This is a **base class** from which all HomeSpan Services are derived, and should **not** be directly instantiated. Rather, to create a new Service instantiate one of the HomeSpan Services defined in the [Service](ServiceList.md) namespace. No arguments are needed. +* instantiated Services are added to the HomeSpan HAP Database and associated with the last Accessory instantiated +* instantiating a Service without first instantiating an Accessory throws an error during initialization +* example: `new Service::MotionSensor();` + +The following methods are supported: + +* `SpanService *setPrimary()` + * specifies that this is the primary Service for the Accessory. Returns a pointer to the Service itself so that the method can be chained during instantiation. Example: `new Service::Fan->setPrimary();` +* `SpanService *setHidden()` + * specifies that this is hidden Service for the Accessory. Returns a pointer to the Service itself so that the method can be chained during instantiation. +* `virtual boolean update()` + * HomeSpan calls this method upon receiving a request from a HomeKit Controller to update one or more Characteristics associated with the Service. Users should override this method with code that implements that requested updates and returns *true* of *false* if the update succeeds or fails +* `virtual void loop()` + * HomeSpan calls this method every time `homeSpan.poll()` is executed. Users should override this method with code that monitors for state changes in Characteristics that require HomeKit Controllers to be notified. +* `virtual void button(int pin, int pressType)` + * HomeSpan calls this method whenever a SpanButton() object associated with the Service is triggered. Users should override this method with code that implements any actions that should be taken in response to the SpanButton() trigger + * *pin* - the ESP32 pin associated with the SpanButton() object + * *pressType* - 0=single press, 1=double press, 2=long press -* `SpanService()` - * This is the base class for creating new HAP Services. It should From 5fac6f7752c77b56dcf0528b570d7c7e689dadc9 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 23:09:28 -0600 Subject: [PATCH 18/23] Update Reference.md --- docs/Reference.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index b6110d2..f8c489b 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -78,11 +78,20 @@ The following methods are supported: * `SpanService *setHidden()` * specifies that this is hidden Service for the Accessory. Returns a pointer to the Service itself so that the method can be chained during instantiation. * `virtual boolean update()` - * HomeSpan calls this method upon receiving a request from a HomeKit Controller to update one or more Characteristics associated with the Service. Users should override this method with code that implements that requested updates and returns *true* of *false* if the update succeeds or fails + * HomeSpan calls this method upon receiving a request from a HomeKit Controller to update one or more Characteristics associated with the Service. Users should override this method with code that implements that requested updates and returns *true* or *false* if the update succeeds or fails * `virtual void loop()` * HomeSpan calls this method every time `homeSpan.poll()` is executed. Users should override this method with code that monitors for state changes in Characteristics that require HomeKit Controllers to be notified. * `virtual void button(int pin, int pressType)` * HomeSpan calls this method whenever a SpanButton() object associated with the Service is triggered. Users should override this method with code that implements any actions that should be taken in response to the SpanButton() trigger * *pin* - the ESP32 pin associated with the SpanButton() object * *pressType* - 0=single press, 1=double press, 2=long press + +## *SpanCharacteristic()* +This is a **base class** from which all HomeSpan Characteristics are derived, and should **not** be directly instantiated. Rather, to create a new Characteristic instantiate one of the HomeSpan Characteristics defined in the [Characteristic](ServiceList.md) namespace. + +* instantiated Characteristics are added to the HomeSpan HAP Database and associated with the last Service instantiated +* instantiating a Characteristic without first instantiating a Service throws an error during initialization +* a single, optional argument is used to set the initial value of the Characteristic at startup. +* example: `new Characteristic::Brightness(50);` + From c0221846f9ad7c8a0bfee13b00c451842c76cae3 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Thu, 26 Nov 2020 07:26:53 -0600 Subject: [PATCH 19/23] Update Reference.md --- docs/Reference.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Reference.md b/docs/Reference.md index f8c489b..b011507 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -82,9 +82,12 @@ The following methods are supported: * `virtual void loop()` * HomeSpan calls this method every time `homeSpan.poll()` is executed. Users should override this method with code that monitors for state changes in Characteristics that require HomeKit Controllers to be notified. * `virtual void button(int pin, int pressType)` - * HomeSpan calls this method whenever a SpanButton() object associated with the Service is triggered. Users should override this method with code that implements any actions that should be taken in response to the SpanButton() trigger + * HomeSpan calls this method whenever a SpanButton() object associated with the Service is triggered. Users should override this method with code that implements any actions to be taken in response to the SpanButton() trigger * *pin* - the ESP32 pin associated with the SpanButton() object - * *pressType* - 0=single press, 1=double press, 2=long press + * *pressType* - + * 0=single press (SpanButton::SINGLE) + * 1=double press (SpanButton::DOUBLE) + * 2=long press (SpanButton::LONG) ## *SpanCharacteristic()* From ae4d7836e7bcea59be546c9a3261480c8e3507fe Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Thu, 26 Nov 2020 07:30:45 -0600 Subject: [PATCH 20/23] Update ServiceList.md --- docs/ServiceList.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ServiceList.md b/docs/ServiceList.md index 25c7562..d41692e 100644 --- a/docs/ServiceList.md +++ b/docs/ServiceList.md @@ -4,7 +4,7 @@ HomeSpan implements all [HAP-R2](https://developer.apple.com/support/homekit-acc HomeSpan Services and Characteristics are implemented as C++ Classes with names that exactly match the spelling and capitalization specified by Apple in Sections 8 and 9 of [HAP-R2](https://developer.apple.com/support/homekit-accessory-protocol/), but without any spaces. HomeSpan Services are defined in HomeSpan's `Service` namespace. HomeSpan Characteristics are defined in HomeSpan's `Characteristic` namespace. For example, HomeSpan defines the *Carbon Dioxide Sensor* Service (HAP Service 8.7) as `Service::CarbonDioxideSensor`, and the *Carbon Dioxide Detected* Characteristic (HAP Characteristic 9.16) as `Characteristic::CarbonDioxideDetected`. -HomeSpan Services and Characteristics are instantiated with a C++ `new` command. Services do not take any arguments, whereas Characteristics take a single, optional argument that is used to initialize the value of the Characteristic at startup. If this argument is not specified, HomeSpan will apply a reasonable default value based on the Characteristic's type and allowed range. +HomeSpan Services and Characteristics are instantiated with a C++ `new` command. Services do not take any arguments, whereas Characteristics take a single, optional argument that is used to initialize the value of the Characteristic at startup. If this argument is not specified, HomeSpan will apply a reasonable [default value](#characteristic-types-and-defaults) based on the Characteristic's type and allowed range. A list of all HomeSpan Services is provided in the table below. For each Service the table also indicates which Characteristics are required and which are optional. For example, a dimmable light bulb could be configured in HomeSpan as such: @@ -62,6 +62,8 @@ Additionally, when first starting up, HomeSpan begins by validating the device's | Window | CurrentPosition
TargetPosition
PositionState | Name
HoldPosition
ObstructionDetected | | WindowCovering | CurrentPosition
TargetPosition
PositionState | Name
HoldPosition
CurrentHorizontalTiltAngle
TargetHorizontalTiltAngle
CurrentVerticalTiltAngle
TargetVerticalTiltAngle
ObstructionDetected | + +### Characteristic Types and Defaults --- [↩️](README.md) Back to the Welcome page From 90c633356ccde81715a22e1eff7ee59005de91ff Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Thu, 26 Nov 2020 07:35:40 -0600 Subject: [PATCH 21/23] Update ServiceList.md --- docs/ServiceList.md | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/docs/ServiceList.md b/docs/ServiceList.md index d41692e..3006a73 100644 --- a/docs/ServiceList.md +++ b/docs/ServiceList.md @@ -64,6 +64,107 @@ Additionally, when first starting up, HomeSpan begins by validating the device's ### Characteristic Types and Defaults + +|Characteristic|Type|Default +|Active|uint8_t|0| +|AirQuality|uint8_t|0| +|BatteryLevel|uint8_t|0| +|Brightness|int|0| +|CarbonMonoxideLevel|double|0| +|CarbonMonoxidePeakLevel|double|0| +|CarbonMonoxideDetected|uint8_t|0| +|CarbonDioxideLevel|double|0| +|CarbonDioxidePeakLevel|double|0| +|CarbonDioxideDetected|uint8_t|0| +|ChargingState|uint8_t|0| +|CoolingThresholdTemperature|double|10| +|ColorTemperature|uint32_t|50| +|ContactSensorState|uint8_t|1| +|CurrentAmbientLightLevel|double|1| +|CurrentHorizontalTiltAngle|int|0| +|CurrentAirPurifierState|uint8_t|1| +|CurrentSlatState|uint8_t|0| +|CurrentPosition|uint8_t|0| +|CurrentVerticalTiltAngle|int|0| +|CurrentHumidifierDehumidifierState|uint8_t|1| +|CurrentDoorState|uint8_t|1| +|CurrentFanState|uint8_t|1| +|CurrentHeatingCoolingState|uint8_t|0| +|CurrentHeaterCoolerState|uint8_t|1| +|CurrentRelativeHumidity|double|0| +|CurrentTemperature|double|0| +|CurrentTiltAngle|int|0| +|FilterLifeLevel|double|0| +|FilterChangeIndication|uint8_t|0| +|FirmwareRevision|char \*|""| +|HardwareRevision|char \*|""| +|HeatingThresholdTemperature|double|16| +|HoldPosition|boolean|false| +|Hue|double|0| +|Identify|boolean|false| +|InUse|uint8_t|0| +|IsConfigured|uint8_t|0| +|LeakDetected|uint8_t|0| +|LockCurrentState|uint8_t|0| +|LockPhysicalControls|uint8_t|0| +|LockTargetState|uint8_t|0| +|Manufacturer|char \*|""| +|Model|char \*|""| +|MotionDetected|boolean|false| +|Mute|boolean|false| +|Name|char \*|""| +|NitrogenDioxideDensity|double|0| +|ObstructionDetected|boolean|false| +|PM25Density|double|0| +|OccupancyDetected|uint8_t|0| +|OutletInUse|boolean|false| +|On|boolean|false| +|OzoneDensity|double|0| +|PM10Density|double|0| +|PositionState|uint8_t|2| +|ProgramMode|uint8_t|0| +|ProgrammableSwitchEvent|uint8_t|0| +|RelativeHumidityDehumidifierThreshold|double|50| +|RelativeHumidityHumidifierThreshold|double|50| +|RemainingDuration|uint32_t|60| +|ResetFilterIndication|uint8_t|0| +|RotationDirection|int|0| +|RotationSpeed|double|0| +|Saturation|double|0| +|SecuritySystemAlarmType|uint8_t|0| +|SecuritySystemCurrentState|uint8_t|3| +|SecuritySystemTargetState|uint8_t|3| +|SerialNumber|char \*|""| +|ServiceLabelIndex|uint8_t|1| +|ServiceLabelNamespace|uint8_t|1| +|SlatType|uint8_t|0| +|SmokeDetected|uint8_t|0| +|StatusActive|boolean|true| +|StatusFault|uint8_t|0| +|StatusJammed|uint8_t|0| +|StatusLowBattery|uint8_t|0| +|StatusTampered|uint8_t|0| +|SulphurDioxideDensity|double|0| +|SwingMode|uint8_t|0| +|TargetAirPurifierState|uint8_t|1| +|TargetFanState|uint8_t|1| +|TargetTiltAngle|int|0| +|SetDuration|uint32_t|60| +|TargetHorizontalTiltAngle|int|0| +|TargetHumidifierDehumidifierState|uint8_t|0| +|TargetPosition|uint8_t|0| +|TargetDoorState|uint8_t|1| +|TargetHeatingCoolingState|uint8_t|0| +|TargetRelativeHumidity|double|0| +|TargetTemperature|double|16| +|TemperatureDisplayUnits|uint8_t|0| +|TargetVerticalTiltAngle|int|0| +|ValveType|uint8_t|0| +|Version|char \*|""| +|VOCDensity|double|0| +|Volume|uint8_t|0| +|WaterLevel|double|0| + --- [↩️](README.md) Back to the Welcome page From 89a7a1d026ca09d37b5089adaabfbc6d62fc1e72 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Thu, 26 Nov 2020 07:36:18 -0600 Subject: [PATCH 22/23] Update ServiceList.md --- docs/ServiceList.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ServiceList.md b/docs/ServiceList.md index 3006a73..3c4cd7c 100644 --- a/docs/ServiceList.md +++ b/docs/ServiceList.md @@ -66,6 +66,7 @@ Additionally, when first starting up, HomeSpan begins by validating the device's ### Characteristic Types and Defaults |Characteristic|Type|Default +|---|---|---| |Active|uint8_t|0| |AirQuality|uint8_t|0| |BatteryLevel|uint8_t|0| From e6393fe66aa8fc838f926e39769deb3b8284f7ed Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Thu, 26 Nov 2020 07:48:11 -0600 Subject: [PATCH 23/23] Update ServiceList.md --- docs/ServiceList.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ServiceList.md b/docs/ServiceList.md index 3c4cd7c..bf4706d 100644 --- a/docs/ServiceList.md +++ b/docs/ServiceList.md @@ -97,8 +97,8 @@ Additionally, when first starting up, HomeSpan begins by validating the device's |CurrentTiltAngle|int|0| |FilterLifeLevel|double|0| |FilterChangeIndication|uint8_t|0| -|FirmwareRevision|char \*|""| -|HardwareRevision|char \*|""| +|FirmwareRevision|char \*|"1.0.0"| +|HardwareRevision|char \*|"1.0.0"| |HeatingThresholdTemperature|double|16| |HoldPosition|boolean|false| |Hue|double|0| @@ -109,11 +109,11 @@ Additionally, when first starting up, HomeSpan begins by validating the device's |LockCurrentState|uint8_t|0| |LockPhysicalControls|uint8_t|0| |LockTargetState|uint8_t|0| -|Manufacturer|char \*|""| -|Model|char \*|""| +|Manufacturer|char \*|"HomeSpan"| +|Model|char \*|"HomeSpan-ESP32"| |MotionDetected|boolean|false| |Mute|boolean|false| -|Name|char \*|""| +|Name|char \*|"unnamed"| |NitrogenDioxideDensity|double|0| |ObstructionDetected|boolean|false| |PM25Density|double|0| @@ -135,7 +135,7 @@ Additionally, when first starting up, HomeSpan begins by validating the device's |SecuritySystemAlarmType|uint8_t|0| |SecuritySystemCurrentState|uint8_t|3| |SecuritySystemTargetState|uint8_t|3| -|SerialNumber|char \*|""| +|SerialNumber|char \*|"HS-12345"| |ServiceLabelIndex|uint8_t|1| |ServiceLabelNamespace|uint8_t|1| |SlatType|uint8_t|0| @@ -161,7 +161,7 @@ Additionally, when first starting up, HomeSpan begins by validating the device's |TemperatureDisplayUnits|uint8_t|0| |TargetVerticalTiltAngle|int|0| |ValveType|uint8_t|0| -|Version|char \*|""| +|Version|char \*|"1.0.0"| |VOCDensity|double|0| |Volume|uint8_t|0| |WaterLevel|double|0|