Allow overload limit of Accessories
This commit is contained in:
parent
a10f00c721
commit
7ead8d34c1
|
|
@ -270,6 +270,7 @@ Creating an instance of this **class** adds a new HAP Accessory to the HomeSpan
|
||||||
|
|
||||||
* every HomeSpan sketch requires at least one Accessory
|
* every HomeSpan sketch requires at least one Accessory
|
||||||
* a sketch can contain a maximum of 41 Accessories per sketch (if exceeded, a runtime error will the thrown and the sketch will halt)
|
* a sketch can contain a maximum of 41 Accessories per sketch (if exceeded, a runtime error will the thrown and the sketch will halt)
|
||||||
|
* extending the limit of 41 is possible by using the #define HOMESPAN_MAX_ACCESSORIES <LIMIT;>, but this is only recommended for experienced developers, as a higher limit may exceed the maximum available memory.
|
||||||
* there are no associated methods
|
* there are no associated methods
|
||||||
* the argument *aid* is optional.
|
* the argument *aid* is optional.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,18 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <WiFi.h>
|
#ifndef HOMESPAN_MAX_ACCESSORIES
|
||||||
|
#define HOMESPAN_MAX_ACCESSORIES 41 // maximum number of allowed Acessories (HAP limit=150, but not enough memory in ESP32 to run that many)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <WiFi.h>
|
||||||
#include "HomeSpan.h"
|
#include "HomeSpan.h"
|
||||||
#include "TLV.h"
|
#include "TLV.h"
|
||||||
#include "HAPConstants.h"
|
#include "HAPConstants.h"
|
||||||
#include "HKDF.h"
|
#include "HKDF.h"
|
||||||
#include "SRP.h"
|
#include "SRP.h"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
// NONCE Structure (HAP used last 64 of 96 bits)
|
// NONCE Structure (HAP used last 64 of 96 bits)
|
||||||
|
|
||||||
|
|
@ -75,7 +79,7 @@ struct HAPClient {
|
||||||
|
|
||||||
static const int MAX_HTTP=8095; // max number of bytes in HTTP message buffer
|
static const int MAX_HTTP=8095; // max number of bytes in HTTP message buffer
|
||||||
static const int MAX_CONTROLLERS=16; // maximum number of paired controllers (HAP requires at least 16)
|
static const int MAX_CONTROLLERS=16; // maximum number of paired controllers (HAP requires at least 16)
|
||||||
static const int MAX_ACCESSORIES=41; // maximum number of allowed Acessories (HAP limit=150, but not enough memory in ESP32 to run that many)
|
static const int MAX_ACCESSORIES=HOMESPAN_MAX_ACCESSORIES; // maximum number of allowed Acessories (HAP limit=150, but not enough memory in ESP32 to run that many)
|
||||||
|
|
||||||
static TLV<kTLVType,10> tlv8; // TLV8 structure (HAP Section 14.1) with space for 10 TLV records of type kTLVType (HAP Table 5-6)
|
static TLV<kTLVType,10> tlv8; // TLV8 structure (HAP Section 14.1) with space for 10 TLV records of type kTLVType (HAP Table 5-6)
|
||||||
static nvs_handle hapNVS; // handle for non-volatile-storage of HAP data
|
static nvs_handle hapNVS; // handle for non-volatile-storage of HAP data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue