Added optional AccessoryFlags Characteristic to AccessoryInformation Service
This optional flag does not seem to have any affect on the Home App and does not produce any messages indicating that the device needs additional setup. Was hopeful this would have prevented the "Not Supported" message on a Home App Tile that is configured as a bridge, but without any other Accessories.
This commit is contained in:
parent
635bce26c2
commit
3e88d69997
|
|
@ -32,7 +32,7 @@
|
||||||
// //
|
// //
|
||||||
// Demonstrates how to implement a Web Server alongside //
|
// Demonstrates how to implement a Web Server alongside //
|
||||||
// of HomeSpan to create a Programmable Hub serving up to //
|
// of HomeSpan to create a Programmable Hub serving up to //
|
||||||
// 24 Configurable Lights. Allows for dynamic changes //
|
// 12 Configurable Lights. Allows for dynamic changes //
|
||||||
// to Accessories without needing to reboot //
|
// to Accessories without needing to reboot //
|
||||||
// //
|
// //
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -89,6 +89,7 @@ void setup() {
|
||||||
new Service::AccessoryInformation();
|
new Service::AccessoryInformation();
|
||||||
new Characteristic::Identify();
|
new Characteristic::Identify();
|
||||||
new Characteristic::Model("HomeSpan Programmable Hub");
|
new Characteristic::Model("HomeSpan Programmable Hub");
|
||||||
|
new Characteristic::AccessoryFlags();
|
||||||
|
|
||||||
for(int i=0;i<MAX_LIGHTS;i++){ // create Light Accessories based on saved data
|
for(int i=0;i<MAX_LIGHTS;i++){ // create Light Accessories based on saved data
|
||||||
if(lightData[i].aid)
|
if(lightData[i].aid)
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ struct HapChar {
|
||||||
|
|
||||||
struct HapCharacteristics {
|
struct HapCharacteristics {
|
||||||
|
|
||||||
|
HAPCHAR( AccessoryFlags, A6, PR+EV, UINT32, true );
|
||||||
HAPCHAR( Active, B0, PW+PR+EV, UINT8, true );
|
HAPCHAR( Active, B0, PW+PR+EV, UINT8, true );
|
||||||
HAPCHAR( ActiveIdentifier, E7, PW+PR+EV, UINT32, true );
|
HAPCHAR( ActiveIdentifier, E7, PW+PR+EV, UINT32, true );
|
||||||
HAPCHAR( AirQuality, 95, PR+EV, UINT8, true );
|
HAPCHAR( AirQuality, 95, PR+EV, UINT8, true );
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ namespace Service {
|
||||||
OPT(Model);
|
OPT(Model);
|
||||||
OPT(Name);
|
OPT(Name);
|
||||||
OPT(SerialNumber);
|
OPT(SerialNumber);
|
||||||
OPT(HardwareRevision);
|
OPT(HardwareRevision);
|
||||||
|
OPT(AccessoryFlags);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
struct AirPurifier : SpanService { AirPurifier() : SpanService{"BB","AirPurifier"}{
|
struct AirPurifier : SpanService { AirPurifier() : SpanService{"BB","AirPurifier"}{
|
||||||
|
|
@ -403,6 +404,7 @@ namespace Service {
|
||||||
|
|
||||||
namespace Characteristic {
|
namespace Characteristic {
|
||||||
|
|
||||||
|
CREATE_CHAR(uint32_t,AccessoryFlags,1,1,1);
|
||||||
CREATE_CHAR(uint8_t,Active,0,0,1);
|
CREATE_CHAR(uint8_t,Active,0,0,1);
|
||||||
CREATE_CHAR(uint32_t,ActiveIdentifier,0,0,255);
|
CREATE_CHAR(uint32_t,ActiveIdentifier,0,0,255);
|
||||||
CREATE_CHAR(uint8_t,AirQuality,0,0,5);
|
CREATE_CHAR(uint8_t,AirQuality,0,0,5);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue