Commit Graph

145 Commits

Author SHA1 Message Date
Gregg d5ff5c506d Example 10NEW -> Example 14
Updated Example 10NEW to fully reflect the use of loop() methods instead of TimedResets to emulate a push button.  Renamed Example 10 to Example 14, since it must come after we introduce loops().  Deleted both original Example 10 and Example 10NEW
2020-08-17 07:00:47 -05:00
Gregg 6e8e11b0b1 Created modified Example 10NEW
This uses loop() method to auto-reset the blinking LED controller after 3 seconds instead of requiring the use of a TimedReset object.  To do:  eliminate all TimedReset code as it is no longer needed.  Will also need to renumber examples, since new Example 10 uses loop() which is not introduced until after current Example 13.
2020-08-16 22:00:13 -05:00
Gregg 9cecc0a31a Updated Example 13
Completed new framework for using loop() methods and deleted all code related to new SpanEvent() and event() loops.  Re-worked Example 13 to utilize new framework and validated it functions as expected.
2020-08-16 21:46:58 -05:00
Gregg 53f51cc11b Created new framework for Service loops()
Service loops() called for only those Services with over-ridden loop() methods.  TO DO: update event logic to follow new framework.  Vector should point to all CHARACTERISTICS that are updated to setVal()
2020-08-16 08:45:24 -05:00
Gregg e3d1a9b566 Added Window Shade to Example 14 2020-08-14 18:44:45 -05:00
Gregg ffb7b7ed87 Updated putCharacteristics to use Timed Writes
Must next create small routine to clean up expire PIDs - something like: clearPIDs()
2020-08-14 09:59:48 -05:00
Gregg 5da5bd31a1 Created Example 14
Ack!  Doors seem to need TIMED WRITES.  Must implement that next.
2020-08-13 18:27:43 -05:00
Gregg b529956b5f Completed Example 13
Added detailed notes section to further explain all processes related to Event Notifications.  Foreshadowed next example, which will be a Service supporting current and target state characteristics.
2020-08-13 09:41:16 -05:00
Gregg 14bf85c7a1 More updates to Example 13 2020-08-13 06:19:18 -05:00
Gregg 7028fffaaf Updating Example 13 2020-08-12 22:00:50 -05:00
Gregg 56225b1018 updated Example 13
Moved "new SpanEvent" into DEV_Sensors.h and verified it works fine.
2020-08-11 21:55:49 -05:00
Gregg 698592b7a3 Updated checkTimedResets()
converted checkedTimeResets() from two-pass logic that first computes the required size of SpanBuf to a single-pass that utilizes vector<SpanBuf> instead.  Much cleaner and easier.
2020-08-11 21:26:13 -05:00
Gregg 4f6f249357 completed update to checkEvent()
checkEvents() now allows for multiple characteristics to be updated by service->notify().  This change included the use of vector<SpanBuf> to dynamically create the the temporary storage needed.  To do:  re-work similar routines to use vector<SpanBuf> instead of needing to perform two passes each time to gauge size of SpanBuf array needed.
2020-08-11 20:57:40 -05:00
Gregg 6ad063a2b2 Added AirQualitySensor
to use for development of multi-characteristic checkEvents()
2020-08-11 07:07:53 -05:00
Gregg 8d6db796cb Reworking checkEvents()
creating code to allow for multiple characteristics to be updated within event() call.  To Do: define anogther sensor that supports multiple characteristics.  also need to check that "new SpanEvent" works as expected from within a defined service.
2020-08-10 21:59:30 -05:00
Gregg 2e3daef92a Created Example 13
Created checkEvents(), which is a simplified (better) version of checkTimedResets().  To do:  re-write checkTimedResets() to mimic checkEvents();
2020-08-09 22:15:58 -05:00
Gregg d8a8eedad4 Completed Example 12
Demonstrates how to use ServiceType to set Primary Service as well as how to name individual Services.
2020-08-07 09:38:36 -05:00
Gregg 5a271dfc81 Updated Example 12 2020-08-06 22:55:02 -05:00
Gregg fff534b7cd Updated Example 12 2020-08-06 07:31:09 -05:00
Gregg fea694bd3f Created Example 12 2020-08-04 22:43:08 -05:00
Gregg f2a5e5e4f5 Re-worked Examples 5-10
Updated to reflect use of getVal(), getNewVal(), and updated(), intead of directly accessing the underlying member variables.
2020-08-04 21:58:57 -05:00
Gregg cf91f2c265 Tweaks to Example 11 2020-08-04 17:57:34 -05:00
Gregg 1fd493aa31 Completed Example 11
Transtioned to all getter methods: getVal(), getNewVal(), updated(), using templates for all floats.

Finalized templates for getVal and getNewVal, including making <int>  default so it does not have to be set for most getVal() and getNewVal() calls.  Works for booleans as well.  TO DO:  Re-work and check ALL prior examples to ensure they use getVal, etc., and DON'T access value, newValue, isUpdated, directly.
2020-08-04 07:56:53 -05:00
Gregg 3e4ada5912 Use doubles in Examlpe 11
Updated Example 11 to use all <double> instead of <int> for RGB LED.
2020-08-03 21:49:49 -05:00
Gregg 1347e4fd5c Added getVal and getNewVal
Updated Example 11 to use getVal and getNewVal, but kept distinction between integer and double Characteristics
2020-08-03 21:23:50 -05:00
Gregg 819c6ebe0d Updated Example 11 2020-08-03 07:43:39 -05:00
Gregg 1ebce9ab92 Created Example 11
And added static HSVtoRGB method to PwmPin
2020-08-02 11:12:53 -05:00
Gregg 70c62367cd Updatd Example 10 to address HomeKit Notification Bug
Added check for newValue==true even though this should not be necessary.
2020-08-01 17:23:53 -05:00
Gregg a595fdf53f Completed Example 10 2020-07-30 22:11:01 -05:00
Gregg 861a37c7a1 Converted AutoOff to TimedResets 2020-07-29 07:26:13 -05:00
Gregg dd269ad7b3 Created Example 9
Changed DEBUG_LEVEL to VERBOSITY
2020-07-28 08:20:44 -05:00
Gregg fb0a8dacb7 Created Example 8 2020-07-26 11:36:14 -05:00
Gregg 04ad1646d3 Created Example 7
Implements DEV_Identify in it's own file DEV_Identify.h
2020-07-25 21:52:49 -05:00
Gregg 57fef4b496 Create /extras folder
Created /extras folder and moved PwmPin and RFControl files from src into src/extras.
2020-07-25 20:47:05 -05:00
Gregg ff08605b8b Create Example 6 and Add PWM Code
PwmPin added to HomeSpan library
2020-07-25 11:07:38 -05:00
Gregg 195be43f5a Completed Example 5 2020-07-25 08:47:05 -05:00
Gregg 47e7f7b6b4 Converted StatusCode to Class
Converted "statusCode Enum" to "StatusCode Class Enum" and moved from HomeSpan.h to Settings.h
2020-07-24 21:54:09 -05:00
Gregg f3f8996c8a Created Example 5 2020-07-24 16:53:53 -05:00
Gregg 182ce9ab84 Update 4-AdvancedCeilingFan.ino 2020-07-19 16:06:41 -05:00
Gregg 0cdcd488aa Completed Example 4
Also added in Fan RotationSpeed and Fan RotationDirection Characteristics.
2020-07-19 07:46:28 -05:00
Gregg 8a905c4d35 SpanRange Updated
Updated SpanRange to register itself automatically to the most recent Characteristic.  This is more consistent with the overall framework and no longer requires user to access the range variable directly.
2020-07-19 06:25:09 -05:00
Gregg 17184483ba Editing Example 4 2020-07-18 23:05:02 -05:00
Gregg e6a3fc7261 Renamed Examples 1 and 2 2020-07-18 22:10:34 -05:00
Gregg 523f460176 Create Two_LightBulbs.ino 2020-07-18 22:05:41 -05:00
Gregg cccb61f946 Initial commit 2020-07-18 21:47:39 -05:00