Update src.ino

This commit is contained in:
Gregg 2021-10-25 22:10:44 -05:00
parent b6001f9418
commit 92c198d01a
1 changed files with 18 additions and 0 deletions

View File

@ -55,6 +55,24 @@ void setup() {
(new Characteristic::Brightness(50,true))->setRange(10,100,5); (new Characteristic::Brightness(50,true))->setRange(10,100,5);
new Characteristic::Name("Light 2"); new Characteristic::Name("Light 2");
new SpanAccessory(); // Begin by creating a new Accessory using SpanAccessory(), which takes no arguments
new Service::AccessoryInformation(); // HAP requires every Accessory to implement an AccessoryInformation Service, which has 6 required Characteristics
new Characteristic::Name("HomeSpan Test"); // Name of the Accessory, which shows up on the HomeKit "tiles", and should be unique across Accessories
new Characteristic::Manufacturer("HomeSpan"); // Manufacturer of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::SerialNumber("HSL-123"); // Serial Number of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::Model("HSL Test"); // Model of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::FirmwareRevision(HOMESPAN_VERSION); // Firmware of the Accessory (arbitrary text string, and can be the same for every Accessory)
new Characteristic::Identify(); // Create the required Identify
new Service::HAPProtocolInformation(); // Create the HAP Protcol Information Service
new Characteristic::Version("1.1.0"); // Set the Version Characteristic to "1.1.0" as required by HAP
new Service::LightBulb();
new Characteristic::On(0,true);
(new Characteristic::Brightness(50,true))->setRange(10,100,5);
new Characteristic::Name("Light 2");
} // end of setup() } // end of setup()
////////////////////////////////////// //////////////////////////////////////