Skip to content

HomeSpan 2.0.0

Choose a tag to compare

@HomeSpan HomeSpan released this 21 Oct 02:59
· 457 commits to master since this release
c65cae3

Re-factored for compatibility with Arduino-ESP32 Board Manager version 3

  • requires Arduino-ESP32 Board Manager 3.0.2 or later
    • Espressif did not include the Sodium cryptography library in versions 3.0.0 and 3.0.1, which is required by HomeSpan
  • all user-sketches written under HomeSpan 1.9.1 should work without modification under HomeSpan 2.0.0, with the exception of sketches in which the user directly accessed IDF-4 functionality, which may or may not be compatible with IDF-5
  • supports use of the ESP32-C6 chip
    • though the Arduino-ESP32 Board Manager also supports the ESP-H2, HomeSpan does not since the H2 does not have WiFi capabilities, as currently required

New API Functions

  • Complete re-write of the HomeSpan Pixel and RFControl libraries

    • you can now instantiate both Pixel and RFControl objects in the same sketch (previously these classes were incompatible with each other and could not be used in the same sketch)
  • Expanded Pixel class functionality

    • adds support for 5-color RGBWC (red, green, blue, warm-white, and cool-white) LEDs
    • adds new method Pixel::Color::WC() to support setting warm-white / cool-white color values
    • adds new methods Pixel::Color::CCT() and Pixel::setTemperatures() to automatically set the warm-white / cool-white colors of a Pixel device based on whatever correlated color temperature (CCT) the user specifies (e.g. 3000K)
    • adds new constructor Pixel(int pin, const char *pixelType) that provides the ability to both select the colors and specify their transmission order (pixelType) to match a very wide variety of Pixel devices (ranging from pure-white LEDs to 5-color RGBWC LEDs)
      • deprecates constructor Pixel(int pin, pixelType_t pixelType) that limited pixelType to a pre-defined set of values. This constructor will be removed in future versions of HomeSpan
    • adds new method boolean Pixel::hasColor(char c) to determine whether an existing Pixel object supports any particular color
      • deprecates boolean Pixel::isRGBW() which only distinguished RGB from RGBW devices. This method will be removed in future versions of HomeSpan
    • upgraded the PixelTester sketch to interactively step users through selecting and testing the correct pixelType for their device
    • added new Pixel-RGBWC example demonstrating how to implement an RGBWC Pixel light-strip with separate Home App controls for the RGB and WC LED
    • see the Pixels.md page for full details

❗ IMPORTANT SIZE CONSIDERATIONS ❗

  • version 3 of the Arduino-ESP32 Board Manager has a much larger footprint than version 2
  • the same HomeSpan sketch compiled under 1.9.1 will be approximately 200K larger when compiled under HomeSpan 2.0.0-rc.1
  • as a result, HomeSpan sketches will no longer fit into the Default partition scheme which only allocates 1.3MB to an App partition
  • HomeSpan sketches must instead be compiled under a larger partition scheme (such as Minimal SPIFFS, which provides for 1.9MB partitions)
  • HOWEVER - Espressif does not support changing partition tables via OTA!
    • changes to the partition table are ignored if a sketch is updated via OTA
    • you can only update the partition table on a device if you load the sketch via the Serial port when connected to a computer
    • this means that if you have remote device running a HomeSpan sketch using the Default partition scheme, you will not be able to migrate to HomeSpan 2.0.0 using OTA
      • you must first connect the device directly to your computer, change the partition scheme to Minimal SPIFFS, and then update the sketch via the Serial port
    • once HomeSpan has been successfully updated via the Serial Port using the new partition scheme, OTA can be used for any further updates (provided you don't need to subsequently change the partition scheme again for some other reason).