HomeSpan/examples
Gregg 3979498b3c Created Example 16 - Programmable Pushbutton
Modified SpanCharacteristic::sprintfAttributes to streamline logic and add special handling for the ProgrammableSwitchEvent Characteristic as required by HAP:  the value returned for the database or any read request must be set to null (i.e. "value":null).  The only time the real value should be returned is when the device sends a EV/Notify message (when the button is pressed).  Verified that the example works as expected!

TO DO:  Add functionality to allow for Service Namespace and Index label so that you can have multiple programmable pushbuttons in one service - this requires logic for HAP LINKED SERVICE functionality.
2020-10-31 09:35:42 -05:00
..
01-SimpleLightBulb Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
02-TwoSimpleLightBulbs Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
03-CeilingFanWithLight Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
04-AdvancedCeilingFan Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
05-WorkingLED Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
06-DimmableLED Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
07-IdentifyRoutines Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
08-Bridges Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
09-MessageLogging Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
10-RGB_LED Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
11-ServiceOptions Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
12-ServiceLoops Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
13-TargetStates Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
14-EmulatedPushButtons Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
15-RealPushButtons Moved Zephyr into a standalone repository; Re-organized tutorials 2020-10-04 11:00:08 -05:00
16-ProgrammableSwitches Created Example 16 - Programmable Pushbutton 2020-10-31 09:35:42 -05:00