Skip to content

v1.2.0 - EventBus Orchestration System

Choose a tag to compare

@JN0V JN0V released this 16 Aug 15:07
· 535 commits to main since this release

πŸš€ Major Features

Event-Driven Architecture

Comprehensive EventBus integration across all major components with intelligent orchestration in System.h.

Orchestration Flow

WiFi Connected β†’ MQTT Connect β†’ Home Assistant Discovery β†’ NTP Sync

✨ What's New

Component Events

MQTT Component:

  • mqtt/connected - Broker connection established
  • mqtt/disconnected - Broker connection lost

NTP Component:

  • ntp/synced - Time synchronized successfully
  • ntp/sync_failed - Time synchronization failed

Home Assistant Component:

  • ha/discovery_published - Discovery messages sent (entity count)
  • ha/entity_added - New entity registered

WiFi Component (existing):

  • wifi/sta/connected - Station mode connected/disconnected
  • wifi/ap/enabled - Access Point enabled/disabled

System.h Enhancements

  • Reactive Orchestration: Replaced MQTT callbacks with EventBus for consistency
  • WiFi β†’ MQTT: Automatic connection when network available
  • MQTT β†’ HomeAssistant: Automatic discovery publication on MQTT connect
  • NTP Monitoring: Event logging for time synchronization status
  • No Timing Issues: Proper sequencing ensures Home Assistant discovery works after WebUI configuration

πŸ“¦ Component Versions

  • DomoticsCore-HomeAssistant: 1.0.2
  • DomoticsCore-System: 1.0.2
  • DomoticsCore-MQTT: 1.0.1
  • DomoticsCore-NTP: 1.0.1
  • DomoticsCore-Storage: 1.0.1
  • DomoticsCore-LED: 1.0.1

πŸ“š Documentation

  • Enhanced CUSTOM_COMPONENTS.md with complete EventBus documentation
  • System events reference with subscription examples
  • User code examples for custom event handling

πŸ”§ Fixes

  • Fixed Storage and LED WebUI providers to use metadata consistently
  • Removed System.h references from component comments (independence maintained)
  • Fixed NamespaceDemo example
  • Removed obsolete GitHubInstallation example

βœ… Testing

  • All 28 examples compile successfully
  • Component independence verified
  • Standalone usage preserved

πŸ’₯ Breaking Changes

None - All existing code remains fully compatible.

🎯 Benefits

βœ… Proper timing for Home Assistant discovery
βœ… No more initialization race conditions
βœ… Components remain independent and reusable
βœ… Clean reactive architecture
βœ… Easier debugging with event tracing