Commit Graph

752 Commits

Author SHA1 Message Date
Gregg b90f173a6f Set version number to 1.2.1 in preparation for release 2021-03-13 06:31:18 -06:00
Gregg a89ddf3748 Updated Example 13 - Window Shade to show proper use of Characteristic Current Position
Also added discussion of why Characteristic Position State is not needed even though it is required.
2021-03-12 09:45:50 -06:00
Gregg 16aff0e855 Updated formatting of Accessory Database output to Serial Monitor
Used unicode arrows and symbols, and included more detailed information about each Service and Characteristic.
2021-03-10 22:44:59 -06:00
Gregg d2a7030640 Reclaimed memory from REQ and OPT vectors after they are no longer needed.
Lots more memory optimization to perform!
2021-03-09 21:47:52 -06:00
Gregg 8121146c6b Changed ERROR to WARNING when a required Characteristic is missing
Only throw a non-fatal warning instead of a fatal error if a Service is missing a required Characteristic.  This allows for user flexibility in leaving out required Characteristics for Services that don't seem to need them (contrary to the HAP docs).

Also, changed PositionState Characteristic back to Required (instead of Optional) in WindowCovering Service (as specified by HAP).  If PositionState is not included this will only throw an error instead of a warning as a result of the above change.

To Do: Update Example 13 to properly incorporate PositionState Characteristic.
2021-03-09 20:33:54 -06:00
HomeSpan da74066c70
Update Reference.md 2021-03-09 08:25:13 -06:00
HomeSpan a0e220356d
Update ServiceList.md 2021-03-09 08:08:39 -06:00
HomeSpan c6946891bb
Update Tutorials.md 2021-03-09 08:03:06 -06:00
HomeSpan c64c31f4cf
Update Reference.md 2021-03-07 17:41:41 -06:00
Gregg bcbe4c1d92 Merge branch 'dev-1.2.1' of https://github.com/HomeSpan/HomeSpan into dev-1.2.1 2021-03-07 17:39:44 -06:00
Gregg 53268127be Updated Examples to use `setRange()` instead of `new SpanRange()`
setRange() is preferred method.  SpanRange() is legacy only
2021-03-07 17:39:42 -06:00
HomeSpan 209836c170
Update Reference.md 2021-03-07 08:52:18 -06:00
HomeSpan 9e124ab771
Update Reference.md 2021-03-07 08:46:46 -06:00
HomeSpan 2f8cd511dd
Update Reference.md 2021-03-07 08:45:24 -06:00
Gregg ff0dfefc47 Added check to ensure initial value of Characteristic is in allowable Range
Check is not applied to STRING Characteristics.  Check is performed at end of each Accessory definition so will account for any changes to min/max as a result of calls to setRange().  If initial value is outside allowable range, a WARNING (not an ERROR) is thrown.
2021-03-06 09:08:57 -06:00
Gregg 3b40aeec74 Added check to throw error is setRange is called twice on same Characteristic 2021-03-06 08:30:09 -06:00
Gregg 7e3d982ee5 Added min/max Range defaults for all Characteristics
Also added new flag "staticRange" for all Characteristics that indicates whether the min/max range can be changed.  An ERROR will be thrown if setRange is attempted for a Characteristic having staticRange=true.
2021-03-05 22:34:55 -06:00
Gregg 26a38b68cc Completed full implementation of setRange() and deprecation of SpanRange()
Next TO DO:  Complete entry of default min/max into all Characteristics (except BOOL and STRING) defined Span.h so that setRange() error checking works for all Characteristics.
2021-03-04 07:18:13 -06:00
Gregg 5c5361be7b Moved UVal back into SpanCharacteristics 2021-03-03 19:53:13 -06:00
Gregg 5ca0bdc907 Added error checks to setVal()
Warning will be thrown if setVal() request is outside of mix/max range for the Characteristic, though min/max range not yet modified by SpanRange().

TO DO:  Create new Characteristic methods setRange(typename T_MIN, typename T_MAX) and setRange(typename T_MIN, typename T_MAX, typename T_STEP) that will reset min/max, or min/max/step, and trigger required output in database.  Add in checks to ensure setRange is NOT used to STRING or BOOLEAN.  Also add check to ensure STEP is always>0.  Add new UVAL for STEP that is normally zero, which indicates NO step size has been set (and does not need to be reported to database).   Then, set warnings about SpanRange being deprecated at some point in the future.
2021-03-01 09:09:24 -06:00
Gregg c8a2770253 Renamed Services.h to Span.h
Also, made it possible to use UVAL.set() for STRING Characteristic (upon initialization) but setVal() is NOT allowed.
2021-02-28 17:48:34 -06:00
Gregg 7930e3a0d9 Re-Factored SpanCharacteristic Constructor and Services.h
Added Characteristics.h file that defines all static data for HAP Characteristics.  Changed macros in Services.h to use this new HapChar structure.

Code is now more streamlined and ready for mix/max range-checking to be added.
2021-02-28 10:49:17 -06:00
Gregg 064d881e9c Refactored getVal() and getNewVal()
Functionality is identical, but template has been moved into UVal structure along with setVal, which simplifies code and allows for other uses if needed.
2021-02-27 12:54:32 -06:00
Gregg f591735deb Refactored setVal() to use a template
Ensures robustness and is fully backwards compatible.  User does NOT have to specify a template parameter, as the compiler determines this from the setVal() argument itself.  Allows for any numeric type to be properly mapped to correct HAP format for the Characteristic.

This change is also needed to prepare for the refactoring of SpanRange, the addition of UVals to store HAP min/max, and new error-checking of min/max limits within setVal.
2021-02-27 12:36:50 -06:00
Gregg 433e1cd59a Updated setVal() logic
Updated setVal() logic to ensure that every possible combination of parameter type and Characteristic type is handled properly, and without generating a compile-time error related to ambiguous parameters.
2021-02-26 07:53:33 -06:00
HomeSpan f536db83aa
Update FAQ.md 2021-02-23 19:35:38 -06:00
Gregg 6f589af43a Update DEV_Sensors.h 2021-02-23 09:56:45 -06:00
Gregg 396e3322a9 Update DEV_Sensors.h 2021-02-23 06:43:41 -06:00
Gregg 3edc30222f Updated Example 12 to demonstrate negative temperatures
Use SpanRange() to change HAP default range of 0-100 to -50 to 100.  Change starting temp +30 and have it reset to -30 after hitting +35.
2021-02-22 20:27:42 -06:00
Gregg b2790386d6 Update Services.h
HAP documentation is INCORRECT!  Actual range for ColorTemperature is 140-500.  Change default to 200.
2021-02-20 15:43:35 -06:00
HomeSpan 2be0a2cea1
Update README.md 2021-02-19 18:14:33 -06:00
HomeSpan cb677eb69d
Update FAQ.md 2021-02-19 18:13:57 -06:00
HomeSpan d16c7fe2f5
Update OTA.md 2021-02-19 18:13:30 -06:00
HomeSpan b373291dcb
Update GettingStarted.md 2021-02-19 18:11:37 -06:00
HomeSpan 05c4e81fa2
Update GettingStarted.md 2021-02-19 18:07:31 -06:00
HomeSpan 14a8848436
Update README.md 2021-02-19 18:04:59 -06:00
HomeSpan 4c632369b3
Update FAQ.md 2021-02-19 18:03:27 -06:00
HomeSpan 0d28eaa216
Update FAQ.md 2021-02-19 18:01:57 -06:00
HomeSpan bcac669b40
Update FAQ.md 2021-02-19 17:56:07 -06:00
HomeSpan e175ba1527
Update FAQ.md 2021-02-19 17:55:02 -06:00
HomeSpan a3832d5765
Update FAQ.md 2021-02-19 17:49:56 -06:00
HomeSpan f0fee53d81
Update FAQ.md 2021-02-19 17:46:46 -06:00
HomeSpan bdcc4eab6f
Update FAQ.md 2021-02-19 07:58:22 -06:00
HomeSpan e20ae3a975
Update FAQ.md 2021-02-19 07:45:52 -06:00
HomeSpan 0ff4a222ab
Create FAQ.md 2021-02-19 07:00:53 -06:00
HomeSpan 6ff15e9b9e
Merge pull request #45 from HomeSpan/release-1.2.0
Release 1.2.0
2021-02-18 21:37:00 -06:00
HomeSpan b666fe7c69
Update README.md 2021-02-18 21:34:34 -06:00
HomeSpan dd4f8f34f8
Update README.md 2021-02-18 21:31:57 -06:00
Gregg c7447b061c Set Version to 1.2.0 2021-02-18 21:09:28 -06:00
Gregg 77a4882527 Merge branch 'dev1.1.5' of https://github.com/HomeSpan/HomeSpan into dev1.1.5 2021-02-18 21:02:49 -06:00