Commit Graph

1950 Commits

Author SHA1 Message Date
Gregg ba240ea4d7 updated putPrepareURL and deleted receiveEncrypted()
Must test with Door example, which uses putPrepare
2024-01-11 06:40:54 -06:00
Gregg d179f039d1 Moved all PSRAM definitions into separate PSRAM.h file
Now allows #include "HomeSpan.h" to be removed from TLV dependencies
2024-01-10 22:05:26 -06:00
Gregg bddffab7ad refactored tlvRespond() to use hapOut instead of sendEncrypted()
To do:

1) update putPrepareURL() to use hapOut instead of sendEncrypted()
2) remove sendEncrypted() since it is no longer needed
3) try moving MAllocator template into separate file (memory.h?) so it can be called from any other module
4) remove #include "HomeSpan.h" from TLV8
2024-01-10 21:53:37 -06:00
Gregg fa5455d6f9 moved tlv streaming into tlv class 2024-01-10 20:44:16 -06:00
Gregg 73f761adc9 started work on TLV streaming with << operator
Goal - eliminate sendEncrypted() completely by using hapOut in tlvRepond().
Next up: use function call instead of << operator so logic can be moved into TLV.h
2024-01-09 22:02:28 -06:00
Gregg 96e6f55c72 Update src.ino 2024-01-08 19:46:16 -06:00
Gregg ffc4ae0cb2 Update src.ino 2024-01-08 19:45:38 -06:00
Gregg 392eac38b9 Added homeSpan.getWebLog() 2024-01-08 18:19:38 -06:00
HomeSpan 7e9e432991
Update Stepper.md 2024-01-07 12:05:36 -06:00
Gregg 39b7b54d48 Fixed CSS in weblog
Missing conversion from String to c_str() when using hapOut.
2024-01-07 10:22:21 -06:00
Gregg 0492b67b55 Changed hapOut delay back to 1ms - works fine
Identified issue with ESP32-S3 crashing when using PSRAM.  Problem was not the code, but that the sketch was using pins that are needed to run the Octal PSRAM that comes with the Espressif S3 DevKit.
2024-01-06 21:08:32 -06:00
Gregg bd474778e5 fix for PSRAM with new hapOut
Force hapOut to use internal memory only.

Tested on ESP32-S2 with/without PSRAM.  However, crashes on ESP32-S3 when using PSRAM (?!)
2024-01-06 16:55:17 -06:00
Gregg 4269eca982 Update MaxAccessories.ino 2024-01-01 17:53:46 -06:00
Gregg 12c6cf3fe1 Changed HapOut delay from 1ms to 50ms for WiFi transmits. Seems to be much more stable. 2024-01-01 17:35:02 -06:00
Gregg cc7ffb4c07 Moved prettyPrint into HapOut
This completes re-work of all JSON buffer memory management to use HAPOut.

Next up: Stress test with Max Accessories to see how many Accessories we can now handle.
2024-01-01 09:39:54 -06:00
Gregg bef151cdb1 Converted all remaining sprintfAttributes to printfAttributes
This removes last of large-sized JSON buffers - everything has now been converted to using hapOut.

Next up: Must add prettyPrint to hapOut to support 'd' command
2024-01-01 08:49:33 -06:00
Gregg 6c3df551eb Added back weblogCallback() functionality that uses hapOut 2023-12-31 17:05:22 -06:00
Gregg 00944c1f2f Converted sprintfNotify and eventNotify to use HapOut
Successfully tested with MultiTest script
2023-12-31 12:36:47 -06:00
Gregg 20fe4ab6fd Deleted sprintfAttributes for Span, SpanAccessory, and SpanService
These now use the new printfAttributes with HapOut
2023-12-31 11:24:15 -06:00
Gregg 1f13906a25 Added SHA-384 hash computation to HapOut
Hashing of entire database is now done piecemeal within HapOut, preventing the need to load the entire database into a large buffer just to obtain a unique hash.

Modified updateDatabase() to use HapOut.getHash()
2023-12-31 09:36:19 -06:00
Gregg f2cb880e4e Converted sprintfAttributes to printfAttributes and added encryption to HapOut
Success!
2023-12-30 23:07:09 -06:00
Gregg 83924a6bdf Added getSize() to HapOut and changed default behavior to NEVER output anything
Note: getSize() must be called before flush(), which resets byte counter
2023-12-30 17:52:28 -06:00
Gregg 18c74e6f17 Moved StreamBuf into HapOut as private nested class 2023-12-30 17:07:12 -06:00
Gregg 117c348708 Moved StreamBuf parameter calls into HapOut 2023-12-30 16:22:35 -06:00
Gregg fb5c9e1e29 Begin integration of hapStream into HAP.ccp 2023-12-30 11:37:56 -06:00
Gregg 7282c2a8c9 Moved Streamer from Utils.h into separate Streamer.cpp
But declared Streamer inside HomeSpan.h instead of separate Streamer.h since it  should only be used when HomeSpan.h is used.

Also, changed class structure so that it is "final" by removing virtual tags and making all protected variables private.
2023-12-30 07:48:11 -06:00
Gregg f3e98601b0 Initial test of StreamBuffer added to WebLog 2023-12-29 22:19:49 -06:00
Gregg ffe56e7261 Remove include HAP.h from SRP
SRP now only requires Utils (for TempBuffer).

Also, moved HS_ALLOC definitions into Utils so it can be re-used by others files
2023-12-28 18:11:39 -06:00
Gregg cd85cc1629 Completed refactoring of SRP6A and integration into all steps of Pair-Setup 2023-12-28 17:32:17 -06:00
Gregg 9209cb6b41 Completed Pair-Setup M3 update 2023-12-28 11:13:34 -06:00
Gregg 6979ab8080 In process of updated Pair-Setup M3...
Cleaning up code by replacing calls to mbedTLS within Pair-Setup with arguments passed to/from SRP6A.  Much better and better encapsulates SRP6A
2023-12-28 07:04:07 -06:00
Gregg c529f93646 Moved definitions of N3072 and other constants into SRP6A structure 2023-12-27 21:45:09 -06:00
Gregg b960c2fdaf Initial integration of local SRP6A into Pair Setup 2023-12-27 17:13:32 -06:00
Gregg da55b9b6b1 Start re-working SRP6A's use in Pair-Setup to make it local instead of global 2023-12-27 14:31:22 -06:00
Gregg beef66eec0 Added new initializer to TempBuffer
Allows TempBuffer to be initialized by concatenation of multiple existing buffers.

Constructor contains pairs of (T *buf), nElements, where last argument MUST BE NULL to signify end of variable argument list.

Will work with any type T, and nElements is in units of elements of type T.
2023-12-26 15:53:38 -06:00
Gregg 223107d8aa Cleaning up postverify 2023-12-26 10:38:33 -06:00
Gregg 6280c17154 Removed all old TLV code 2023-12-25 22:17:08 -06:00
Gregg 3c172da714 Completed and fully tested refactoring of TLV8
Next up: remove old TLV code and clean up
2023-12-25 22:04:02 -06:00
Gregg 76a6a2bde9 Completed postPairSetup and fully tested - also changes TLV8 from vector to forward_list
Changed TLV8 from vector to forward_list to ensure iterators are always retained after adding new elements.

Nest: refactor postPairings
2023-12-25 14:46:11 -06:00
Gregg 0e0f1dcb1c Completed initial re-factoring of postPairSetup - must test! 2023-12-24 17:35:25 -06:00
Gregg edb0cc1be0 added TLV length function
Checks that iterator exists (i.e. does not equal end()) and returns length, else returns -1.  Can be used for checking for both the presence, and length, of a TLV record
2023-12-24 15:22:00 -06:00
Gregg 66e7fc6654 Starting re-factoring of postPairSetup 2023-12-23 21:21:34 -06:00
Gregg fe3389da3b Preparing for re-factoring postPairSetup 2023-12-23 15:59:04 -06:00
Gregg 6e323976fd Completed re-factoring of postPairVerify using new TLV8
Next: re-factor postPairSetup
2023-12-23 15:44:01 -06:00
Gregg 1587f56626 Starting to integrate new TLV8 into postPairVerify 2023-12-23 14:29:53 -06:00
Gregg aa700f94f1 Added new TLV8 class
To do: Refactor HAP.cpp to use new TLV8 class
2023-12-22 12:07:26 -06:00
HomeSpan e715d670e3
Update README.md 2023-12-20 06:39:47 -06:00
HomeSpan 781250b362
Update README.md 2023-12-20 06:39:03 -06:00
HomeSpan 30152e61cf
Update README.md 2023-12-20 06:38:31 -06:00
HomeSpan 503143c355
Update NOW.md 2023-12-20 06:14:35 -06:00