From 92c198d01a2e0383be70dbf89ed46c4c338c3900 Mon Sep 17 00:00:00 2001 From: Gregg Date: Mon, 25 Oct 2021 22:10:44 -0500 Subject: [PATCH] Update src.ino --- src/src.ino | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/src.ino b/src/src.ino index 9f1e5c6..eb8c2a9 100644 --- a/src/src.ino +++ b/src/src.ino @@ -55,6 +55,24 @@ void setup() { (new Characteristic::Brightness(50,true))->setRange(10,100,5); 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() //////////////////////////////////////