Commit Graph

136 Commits

Author SHA1 Message Date
Gregg 94cec6153b Update StepperMotorControl.ino 2023-05-31 21:21:53 -05:00
Gregg 5e1d65f436 Renamed SpanStep to StepperControl and moved into HoneSpan Extras
Also updated StepperMotorControl Example.
2023-05-30 05:05:51 -05:00
Gregg d7aca25ac9 Create StepperMotorControl.ino 2023-05-21 12:36:15 -05:00
Gregg 34be49393a Update RemoteTempSensor.ino
fixed typed in a comment
2023-04-30 09:04:56 -05:00
Gregg f466e12c7a some cleanup of LedPin comments in examples
Removed old references to "channels" which should have been deleted many versions ago
2023-04-01 12:16:15 -05:00
Gregg ce36174f93 Completed LED fading functionality; added new Fading LED example (in Other Examples) 2023-03-31 22:07:31 -05:00
Gregg 09063fb7dc Extended functionality of setValidValues() to allow INT, UINT8, UINT16, and UINT32 Characteristics 2023-02-25 15:07:02 -06:00
Gregg 03ba061b9b Added logic to hide AP SSID from broadcasting when WIFI_AP_STA used for SpanPoint
This does NOT effect the HomeSpan Access Point from being broadcast as usual when launched.
2023-01-28 18:05:59 -06:00
Gregg d04677d051 Update RemoteDevice8286.ino 2023-01-26 20:22:48 -06:00
Gregg b1bdb55d07 Update RemoteDevice8286.ino 2023-01-24 22:51:13 -06:00
Gregg 3ec999cd8d Create RemoteDevice8286.ino 2023-01-23 06:17:23 -06:00
Gregg e8a821906a Update RemoteDevice.ino 2023-01-23 05:54:46 -06:00
Gregg 7eca1e776b Add option to SpanPoint to use softAP MAC Address instead of STA
Needed to support ESP-NOW on ESP-8266 chips, which seem to only work if connecting into softAP MAC Address once HomeSpan is connected to WiFi network (prior to connection ESP-8266 will properly connect to normal STA address as well as softAP address).
2023-01-22 18:05:59 -06:00
Gregg 9ecc355c84 Moved "Other Examples" into "examples" folder
Noticed that the Arduino IDE 2.0 interface was not displaying Other Examples.

This is because Other Examples was not under the "examples" folder.  Not sure why this was the case - I should have originally put it there (?)  Regardless, once moved into the examples folder, Other Examples now properly shows up in both Arduino IDE version 1 and version 2.
2022-12-27 17:44:03 -06:00
Gregg f4698b8d59 Updated comments in Example 15 - RealPushButtons
Added description of different triggerTypes and the use of custom functions
2022-08-20 07:37:56 -05:00
Gregg 2520eed6d8 Added detailed comments to 20-AdvancedTechniques
To do:  Add Tutorial to HomeSpan Documentation
To do:  test sketch on S2 and C3 devices
To do:  add homeSpan.autoPoll() to Unit Test as well
2022-05-23 21:26:57 -05:00
Gregg f75596f3cd Changed deleteAccessory from int to boolean
Returns true on success, otherwise false
2022-05-22 13:13:34 -05:00
Gregg 6018f37b60 Added optional stackSize argument to homeSpan.autoPoll()
If not specified, default is CONFIG_ARDUINO_LOOP_STACK_SIZE which is typically defined in the Arduino-ESP32 library as 8192.
2022-05-22 11:00:40 -05:00
Gregg f9b8e2165a Added homeSpan.autoPoll() to 20-AdvancedTechniques
Deleted Arduino loop() function entirely since it no longer needed.
2022-05-21 18:24:35 -05:00
Gregg 4d6f502708 Create 20-AdvancedTechniques.ino 2022-05-21 18:19:23 -05:00
Gregg 1f89673fb7 Updated 20-DynamicBridge to use std::array<>
This allows the use of std::find(), std::remove, and iterator methods.  Code is more intuitive.
2022-05-21 17:05:23 -05:00
Gregg 7835665e60 Update 20-DynamicBridge.ino 2022-05-21 12:11:53 -05:00
Gregg 00ea4c6dd8 Changes homeSpan.getAccessory(aid) to homeSpan.deleteAccessory()
The only reason to have used getAccessory(aid) is to delete it, so the delete command is now invoked automatically.  Function returns 0 on success (matching aid found) or -1 on fail (aid not found)
2022-05-21 12:08:03 -05:00
Gregg f471e7377b Update 20-DynamicBridge.ino 2022-05-14 11:21:59 -05:00
Gregg 615d373850 Added Example 20 - Dynamic Bridge. Also created homeSpan.getAccessory(aid) 2022-05-14 10:00:30 -05:00
Gregg 78ddd8a330 Updated Examples 18 and 19
All tutorial examples now updated and confirmed working s expected in ios15.4.1 except for Example 17 (Shower).  DEV_Identify.h removed from all examples and optional AccessoryInformation() Characteristics deleted to make examples easier to use and understand.

To Do: Review and update "Other Examples" and add link to Example 19 in Tutorials.md
2022-04-12 22:14:29 -05:00
Gregg 2b669022ec Updated Example 17 with note to indicate it is not functioning correctly
This appears to be a Home App problem.  The problem cannot be fixed by adding in ServiceLabel and ServiceIndex (no impact), nor adding in isConfigured(), nor adding Name() Characteristics.  The Home App refuses to render the valves regardless of what valve type.  They will sometimes appear, and then disappear from the interface for no reason.

Testing with the Apple's HomeKit Simulator yields the same symptoms.
2022-04-12 21:36:00 -05:00
Gregg f322f2b0f1 Updated Examples 14-17 2022-04-10 16:04:36 -05:00
Gregg c2a43eca55 Updated Examples 12-14 2022-04-09 18:51:22 -05:00
Gregg 9241398f9b Updated Examples 1-11
Completely replaced Example 11, which showed how to use setPrimary() since this no longer seems to have any impact on HomeKit.  Changed sketch name from ServiceOptions to ServiceNames.
2022-04-09 18:17:59 -05:00
Gregg ac0344ebb2 Updated Examples 9 and 10 2022-04-08 18:06:46 -05:00
Gregg d20df43a58 Eliminated HAP Protocol Service and updated Examples 1-8
Experimentation reveals that the HAP Protocol Information Service no longer seems to be required by HomeKit.  Examples work fine without it.
2022-04-08 17:46:33 -05:00
Gregg 4ada3542cd Update 07-AccessoryNames.ino 2022-04-06 06:21:42 -05:00
Gregg 98f812ba0c Updating examples 1-7 to conform with latest iOS changes 2022-04-04 06:13:30 -05:00
Gregg 91f6ecb958 Updated Message Logging Example 9
Added LOG0() and variadic LOG1() messages.

Also needed to rename Accessory from "On/Off" to "On-Off" since HomeKit no longer allows "/" characters!
2022-04-03 07:21:43 -05:00
Gregg db3bea3b5c Completed Example 19 - Web Logs
Also updated SpanWebLog::addLog() so that the log message is also output to the Serial Monitor if the HomeSpan Log Level is set to 1 or greater.

To do: DOCUMENT ALL THIS!
2022-03-06 09:25:17 -06:00
Gregg 1be40ad6fc Converted LOG1() and LOG2() to variadic macros!
If LOG1() or LOG2() is only provided with a SINGLE argument, then Serial.print() is called.  This allows you to continue using LOG1() and LOG2() to directly print any variable or object that is handled by Serial.print(), such as an int, double, or even an IPAddress.

If LOG1() or LOG2() is provided with multiple arguments, the first is considered the format and Serial.printf(format...) is called.  This allows you to use printf-like functionality within LOG1() and LOG2().
2022-03-06 07:48:12 -06:00
Gregg 682e65129d Added new Example #19 showing Web Logging
Based on Example 5 (Two Working LEDs)
2022-03-05 23:08:14 -06:00
Gregg f37889f8da Added ClientIP as permanent part of Web Log ; DELETED homeSpan.getClientIP()
ClientIP will show as "0.0.0.0" if log message is not related to client request
2022-03-05 22:24:23 -06:00
Gregg cf22ff1a92 Added homeSpan.getClientIP()
Gets IP address (as char *) of last client to send a request.  Useful as part of web log messages.  Will return 0.0.0.0 if used outside of any code that is responding to a client request.
2022-03-05 22:06:34 -06:00
Gregg ad11016b28 Completed Example 18 2021-06-13 21:56:39 -05:00
Gregg e94a9bba04 Updating Example 18; and set HomeSpan version to 1.3.0 2021-06-13 18:40:54 -05:00
Gregg c7d82f74c6 Logic added to save setVal() status changes in NVS
Also created new Example 18 demonstrating NVS storage for an LED.
To do: Create CLI command to erase stored characteristics.
2021-06-13 10:55:06 -05:00
Gregg 54f7928204 Fixed bug in Example 13
WindowShade was incorrectly sending repeated event notifications to HomeKit!
2021-03-21 12:37:12 -05:00
Gregg 451a2885b1 Changed PwmPin to LedPin in all Tutorial Examples
Greatly simplifies use interface.  No need to specify or save channels.  And no need to even save pin number since that can be found using LedPin->getPin() method whenever needed.
2021-03-21 09:54:57 -05: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 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
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 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