Skip to content

Releases: bombcheck/esp8266_milight_hub

1.10.0

01 Sep 07:40
Compare
Choose a tag to compare

sidoh is constantly improving this powerful piece of software. Merging his latest changes here.

1.10 is a meaty release that brings two major changes: asynchronous packet handling, and transitions.

Async packet handling means integrations like REST and MQTT no longer block on milight packets being sent. This means better throughput and performance under high loads.

Transitions enable moving from one state to another smoothly. You can, for example, fade from 0% to 100% brightness over a configurable duration.

Additionally, there are quite a few smaller features, improvements, and bug fixes. See release notes below for more details.

New Features

Asynchronous packet handling

  • Packets are now handled asynchronously. Sending a command to espMH via any of the supported integrations (HTTP, MQTT, UDP) will enqueue packets which are processed out-of-band. This means that espMH will perform significantly better under high loads. If the queue fills up and more packets come in, older packets will be dropped.
  • A new setting was added related to the previous point: packet_repeats_per_loop. This controls how much time is spent processing packets in the queue vs. handling background tasks.
  • New fields in the output of /about display some internal information about the state of the packet queue.
  • For REST calls, the query parameter waitOnQueue=true can be provided to make the call synchronous.

Transitions

  • Add support for smooth transitions between two values for a field. Documentation on how to use transitions is available in the README.
  • New RESTful /transitions routes are available to fully control transitions.

Labels and MQTT discovery

  • Add ability to configure aliases/labels for device configurations in the UI. You're then able to use these labels in the REST API and MQTT.
  • Add support for HomeAssistant's MQTT discovery protocol. This allows for an easy way to integrate with HASS assuming that MQTT discovery is enabled.

New remote type

  • Add support for the FUT020 remote type. Note that support for state is very limited because the remote itself is limited -- on and off use the same command, and mode switch is the same command.

Miscellaneous additions

  • WiFi mode -- allow user to specify 802.11b, g, or n mode (rather than just b or g). Default is now N (same as SDK default)
  • Add support for hex colors (e.g., #FF0000) in color fields. Also add a hex_color field type, which publishes the color in hex format.

Bug Fixes

  • Fix sniffed packets from RGB remotes
  • Fix bug where packets were improperly decoded as CCT when they were in fact RGB_CCT
  • Fix a memory leak that occurred when settings were saved and there is a non-empty state cache.
  • (Internal bug) Linked List library had a bug that prevented arbitrary nodes from being deleted
  • Fix bug where duration-only transitions would have a maximum period of 225ms, meaning transitions could not be longer than ~30s.

Improvements

  • Use PROGMEM in a couple of new places. Will marginally improve free heap.
  • Put hostname in web UI title/header if set
  • Pull string constants like "brightness" into actual constants rather than having the literals scattered throughout the codebase. Prevents typo bugs and decreases heap/flash utilization.
  • Refactor main JSON command -> milight packets handler to not use a mess of conditionals.
  • Update label for enable_automatic_mode_switching to better reflect the behavior it introduces. Add a warning that it is incompatible with color commands.

1.10.0-rc4

14 Aug 08:17
Compare
Choose a tag to compare
1.10.0-rc4 Pre-release
Pre-release

Improvements

  • Update label for enable_automatic_mode_switching to better reflect the behavior it introduces. Add a warning that it is incompatible with color commands.
  • Publish device metadata along with HomeAssistant discovery configs. This will enable better removal behavior in the future.
  • Add support for hex colors (e.g., #FF0000) in color fields. Also add a hex_color field type, which publishes the color in hex format.
  • Add top-level documentation for transitions in README.
  • Change status: ON transition behavior: will always transition from brightness = 0, rather than last known brightness. I expect this behavior to be what most people expect.

Bug Fixes

  • Fix regression where effect key was not being recognized.
  • Fix bug when handling transitions with both {"status":"ON"} and a brightness field caused multiple conflicting transitions to be generated, causing flickering.

1.10.0-dev8

29 Jul 15:28
Compare
Choose a tag to compare
1.10.0-dev8 Pre-release
Pre-release

New Features

  • Add support for on/off transitions. When transitioning from on->off, brightness will fade from present value to 0 before turning off. For off->on, brightness transitions from previous brightness to 100%.

Improvements

  • Add tests for transitions
  • Under-specified transitions which assume default values will prioritize using the default value for duration (as opposed to number of transition packets or period). This is likely more intuitive behavior.

1.10.0-dev7

25 Jul 10:56
Compare
Choose a tag to compare
1.10.0-dev7 Pre-release
Pre-release

New Features

  • Add support for transitions
  • Add support for the FUT020 remote type. Note that support for state is very limited because the remote itself is limited -- on and off use the same command, and mode switch is the same command.
  • Put hostname in title/header if set

Improvements

  • Pull string constants like "brightness" into actual constants rather than having the literals scattered throughout the codebase. Prevents typo bugs and decreases heap/flash utilization.
  • Refactor main JSON command -> milight packets handler to not use a mess of conditionals.

Bug Fixes

  • (Internal bug) Linked List library had a bug that prevented arbitrary nodes from being deleted
  • Use PROGMEM in a couple of new places. Will marginally improve free heap.
  • Fix a test that was broken in 1.10.
  • Fix a memory leak that occurred when settings were saved and there is a non-empty state cache.

1.10.0-dev6

15 Jul 17:00
Compare
Choose a tag to compare
1.10.0-dev6 Pre-release
Pre-release

Bug Fixes

  • Fix bug where packets were improperly decoded as CCT when they were in fact RGB_CCT

1.10.5-dev5

14 Jul 08:45
Compare
Choose a tag to compare
1.10.5-dev5 Pre-release
Pre-release

New Features

  • When state is deleted via the REST API, a blank MQTT message will be published to the corresponding topic, which clears retained state.
  • Add support for :hex_device_id and :dec_device_id in command topic pattern. Unnecessary given that :device_id supports both hexadecimal and decimal IDs, but created unnecessary confusion.
  • A single configurable topic is now used for MQTT client status. LWT, birth, and intentional disconnects will now result in a message being published to this topic. This simplifies the previous approach of having separate LWT and birth topics.
  • Add a warning in the update modal and a convenience link to backup settings.

Improvements

  • Added more tests to the MQTT integration test suite
  • Use upstream library to handle path variables
  • Fix memory leaks when patching or posting settings.
  • Update ArduinoJson from v5 -> v6.
  • Use upstream libraries for REST HTTP server.
  • Downgrade Arduino SDK to 2.4 for now.
  • Add support for simple MQTT client status messages
  • Fix deluge of compiler warnings
  • Add integration test suite. Read more under the Development section of the README.
  • Upgrade upstream library versions (most significantly: to ArduinoJson v6)
  • Fix Arduino SDK to 2.4.0
  • Fix library versions to prevent upstream changes from breaking the build
  • Add d1_mini_pro board to build. Will start publishing artifacts for it as of 1.9.0.
  • Use upstream libraries for REST HTTP server, path variable parsing
  • Enqueue packets to send rather than handling them synchronously for MQTT, UDP. This vastly improves behavior when many commands are sent at once. Rather that choking under pressure, it queues the packets up and sends them in the order they're received
  • Add ability to configure aliases/labels for device configurations in the UI. You're then able to use these labels in the REST API and MQTT.
  • Add support for HomeAssistant's MQTT discovery protocol. This allows for an easy way to integrate with HASS assuming that MQTT discovery is enabled.
  • Commands sent via the REST API are now non-blocking. An optional query parameter is added to make them blocking (set waitOnQueue=true).
  • Add some statistics about packet queue to the output of GET /about.
  • Add setting to force wifi into 802.11b mode. Purportedly improves stability for some APs.
  • Refactor nRF24 code that probably marginally improves performance
  • WiFi mode -- allow user to specify 802.11b, g, or n mode (rather than just b or g). Default is now N (same as SDK default)
  • Some internal radio improvements

Bug Fixes

  • Fix regression in night mode behavior
  • Fix regression in embedded state tests, edge case in internal state tracking
  • State should not get updated unless bulb is on
  • Fix night_mode handling for RGBW and CCT bulb types
  • Fix parsing for color temperature for intercepted packets
  • Fix night_mode handling for RGBW and CCT bulb types
  • Fix memory leaks when patching or posting new settings
  • Fix regression: default value was not applied for group_state_fields.
  • Boolean values for state/status field are now properly respected
  • Fix sniffed packets from RGB remotes

1.9.0-rc1

07 Apr 07:12
Compare
Choose a tag to compare
1.9.0-rc1 Pre-release
Pre-release

Bug fixes

  • Fix regression in scratch state for increment/decrement commands

Improvements

  • Fix deluge of compiler warnings
  • Add tests for more REST routes
  • Upgrade libraries, Arduinio platform to 2.5.0

1.9.0-dev2

01 Apr 12:13
Compare
Choose a tag to compare
1.9.0-dev2 Pre-release
Pre-release

New Features

  • Add support for static IP addresses in settings

Improvements

  • Improvements in group 0 behavior

1.9.0-dev1

26 Mar 13:18
Compare
Choose a tag to compare
1.9.0-dev1 Pre-release
Pre-release

New Features

  • Add oh_color field, which adds support for OpenHAB's colorRGB channel type
  • Add ability to remove entered Device IDs from UI
  • Auto-save Device IDs entered from UI
  • Add support for MQTT Last Will and Testament (LWT) messages
  • Add ability to configure hostname (changing it requires a reboot)
  • Expose setting to control power level for nRF24L01.
  • Add toggle command, which toggles on/off state
  • Add setting to select which channels packets are sent on
  • Add setting to select which channel (singular) packets are listened for on
  • Spruce up Backup/Restore and Update modals in the Web UI
  • Add support for MQTT birth messages

Improvements

  • Change default CE pin from D0/GPIO16 to D2/GPIO4. This matches external guides, and GPIO4 is a slightly better I/O pin, as it isn't low on boot.
  • Add support for controlling colors via commands like {"color":"255,0,0"}.
  • Lock upstream dependency versions. Will prevent build errors when upstream dependencies introduce breaking changes.
  • Add integration test script. Runnable under test/remote with rspec.

Bug Fixes

  • Rename /radio_configs -> /remote_configs and list all remote types
  • Group 0 updates did not affect constituent group states. This has been fixed.
  • Fix parsing for color temperature for intercepted packets

1.8.5

30 Oct 18:57
Compare
Choose a tag to compare

Bug Fixes

  • Fix bug where group 0 commands caused crashes