| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
| |
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
right now we use the entity id as the unique_id in the entity discovery
payload but we should have been prefixing it with the device_id like
with did for the topics to avoid generating collisions.
for example if we have devices 'relay_0' and 'relay_1' and they both
have a button entity with id 'trigger' then the topics will be
correctly generated using the id 'relay_0_trigger' and
'relay_1_trigger' but the unique id field in the discovery payload
is being set as 'trigger' for both entities which causes this type
of error to show up on the home assistant logs:
2026-01-19 19:52:07.539 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:52:07.611 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente │
│ 2026-01-19 19:56:08.013 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:56:08.067 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created helper functions to eliminate code duplication in MQTT operations:
- device_mqtt_subscribe: handles subscription with timeout and error logging
- device_mqtt_publish: handles publishing with optional retain flag
- mqtt_receive_data: handles data receiving with buffer validation and timeout
- publish_entity_discoveries: publishes all entity discoveries
- generate_entity_discovery: generates entity discovery payloads
Refactored buffer management by introducing DeviceBuffersOwned and
DeviceBuffers structures to group related buffers together, making them
easier to pass to helper functions.
Added MQTT_TIMEOUT constant at module level for consistent timeout handling.
Fixed bug where only the last entity's discovery was republished when Home
Assistant came back online. Now correctly republishes all entities by
subscribing to homeassistant/status and using publish_entity_discoveries
when the "online" status is received.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
| |\ |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Enhanced crate-level documentation with comprehensive examples and feature list
- Improved README with badges, better structure, and clearer examples
- Added README.tpl template and generate-readme.sh script for cargo-readme
- Documented run() and connect_and_run() functions with detailed behavior explanations
- Replaced publish_on_command boolean with CommandPolicy enum (PublishState/Manual)
- Added comprehensive documentation for CommandPolicy explaining both modes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
| | |
|
| | |
|
| |
|
|
|
| |
if the connection fails its possible some value that needed to be
published did not get published so this should fix that.
|
| | |
|
| |
|
|
|
|
| |
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
| |
|
|
|
|
| |
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The timeout is now only applied to the connection attempt itself, allowing MQTT communication to proceed without artificial timeouts during normal operation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added a convenience function to handle connection lifecycle with automatic reconnection. The function supports:
- Parsing addresses as IP:port, IP with default port (1883), or hostname with DNS resolution
- Filtering DNS results for IPv4 addresses only
- Automatic reconnection with 5-second delay on failures
- Comprehensive error logging for DNS, TCP, and device run failures
- TCP socket timeout of 10 seconds
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added retain flag support to MQTT messages to properly handle device availability in Home Assistant. Both the availability "online" publish and the last will "offline" message now use retain=true, ensuring HA always sees the current device status even when subscribing after the messages were sent.
Changes:
- Added will_retain field to embedded_mqtt::ConnectParams
- Set retain=true for availability publish using publish_with()
- Set will_retain=true in connect params for last will message
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| |
|
|
|
|
|
|
| |
Added proper error logging and return for availability publish failure, following the same pattern as other MQTT operations in the codebase.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
display precision
Replaced TemperatureSensor with a generic Sensor type that accepts sensor class, state class, unit, and display precision to support various sensor types. Added suggested_display_precision field to control decimal places in Home Assistant UI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Updates switch's set method to only queue publish when the state value
actually changes, matching the behavior in entity_number. This prevents
unnecessary MQTT publishes when setting the same state multiple times.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|