3 Commits

Author SHA1 Message Date
Tony 1550ab15d6 Enhance bridge operation handling and improve JSON conversion
- Added new bridge operations to the bridgeOperationToString and bridgeOperationFromString functions for better command recognition.
- Implemented a fromCjson function to convert cJSON objects to DaliValue, supporting various data types including arrays and objects.
- Introduced isKnownBridgeRequestKey function to filter out unknown keys in bridge requests.
- Refactored handleDownlink to utilize the new fromCjson function for value and metadata extraction, improving code clarity and maintainability.
- Updated response creation to use a more structured approach with DaliValue's toJson method.

Signed-off-by: Tony <tonylu@tony-cloud.com>
2026-05-04 09:45:15 +08:00
Tony 307c480aa0 Enhance DALI bridge: add BridgeOperation and BridgeDaliTarget support, refactor address resolution and provisioning methods 2026-05-02 21:33:57 +08:00
Tony 21afc6b942 Implement DALI Bridge Engine and Model Management
- Added `bridge.cpp` to handle DALI bridge operations including model management, command execution, and response formatting.
- Introduced `bridge_model.cpp` for defining bridge models, value transformations, and JSON serialization/deserialization.
- Created `bridge_provisioning.cpp` for managing bridge configuration storage and retrieval using NVS on ESP platform.
- Enhanced `gateway_cloud.cpp` to integrate DALI bridge requests and responses with cloud communication.
- Introduced `modbus_bridge.cpp` to handle Modbus-specific operations and register management.
- Implemented utility functions for converting between DaliValue and cJSON formats.
- Added error handling and metadata management in bridge responses.
2026-04-22 10:14:42 +08:00