aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* added release scriptHEADmaindiogo4642026-01-201-0/+59
|
* updated Cargo.lockdiogo4642026-01-201-1/+1
|
* chore: release v0.3.0v0.3.0diogo4642026-01-201-1/+1
| | | | Co-Authored-By: Claude Opus 4.5 <[email protected]>
* fixed doctestdiogo4642026-01-201-3/+1
|
* cargo fmtdiogo4642026-01-205-15/+16
|
* derive default instead of manual impl for DeviceBuffersOwneddiogo4642026-01-201-15/+1
|
* added claude release commanddiogo4642026-01-201-0/+36
|
* updated dependenciesdiogo4642026-01-203-38/+57
|
* fix: prefix discovery unique_id with device iddiogo4642026-01-191-7/+31
| | | | | | | | | | | | | | | | | | 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 |
* add mqtt helper functions and refactor buffer managementdiogo4642026-01-092-273/+421
| | | | | | | | | | | | | | | | | | | | | | | | 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]>
* Merge pull request #1 from ToBinio/set-msrvdiogo4642026-01-051-0/+1
|\
| * set rust-version to 1.91.1ToBinio2026-01-021-0/+1
|/
* updated dependenciesdiogo4642025-12-201-6/+6
|
* added Justfilediogo4642025-12-161-0/+11
|
* fixed clippy warningsdiogo4642025-12-163-15/+4
|
* update Cargo.lock for version 0.2.0v0.2.0diogo4642025-12-141-1/+1
|
* bump version to 0.2.0diogo4642025-12-141-1/+1
|
* Improve documentation and replace publish_on_command with CommandPolicy enumdiogo4642025-12-147-31/+392
| | | | | | | | | | | | | - 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]>
* added category field to entity discovery payloaddiogo4642025-12-142-0/+29
|
* use 30s mqtt keepalivediogo4642025-12-134-28/+65
|
* publish values on first iteration of rundiogo4642025-12-131-5/+9
| | | | | if the connection fails its possible some value that needed to be published did not get published so this should fix that.
* added device tracker entitydiogo4642025-12-125-13/+226
|
* bump version to 0.1.1v0.1.1diogo4642025-12-092-2/+2
| | | | | | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* added dBm unit for signal strengthdiogo4642025-12-092-0/+37
| | | | | | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* small visibility fixesv0.1.0diogo4642025-12-094-16/+27
|
* fixed warnings/lintsdiogo4642025-12-096-53/+60
|
* moved embedded-mqtt crate to a modulediogo4642025-12-0916-65/+14
|
* added READMEdiogo4642025-12-091-0/+16
|
* added some documentationdiogo4642025-12-091-0/+13
|
* updated Cargo.toml for publishdiogo4642025-12-094-237/+24
|
* updated edition to 2024diogo4642025-12-091-1/+1
|
* embedded-mqtt: removed embassy-net depdiogo4642025-12-093-7/+9
|
* formatting and improved timeout handlingdiogo4642025-12-087-89/+238
|
* code style changediogo4642025-12-076-420/+427
|
* Clear socket timeout after successful connectiondiogo4642025-12-061-0/+2
| | | | | | | | 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]>
* Implement connect_and_run helper functiondiogo4642025-12-062-2/+103
| | | | | | | | | | | | | 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]>
* Fix availability handling with MQTT retain flagdiogo4642025-12-062-2/+11
| | | | | | | | | | | | | 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]>
* Complete error handling for availability publishdiogo4642025-12-061-8/+63
| | | | | | | | 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]>
* Refactor sensor API to support generic sensor types with configurable ↵diogo4642025-12-064-31/+47
| | | | | | | | | | 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]>
* added SensorClass enumdiogo4642025-12-061-0/+123
|
* added state class constants/enumdiogo4642025-12-062-0/+22
|
* added queue_publish logic to switch set methoddiogo4642025-12-051-4/+17
| | | | | | | | | | 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]>
* added publish_on_command option to numberdiogo4642025-12-053-9/+44
|
* added tracing as dev dependencydiogo4642025-12-052-0/+13
|
* reworked loggingdiogo4642025-12-059-33/+307
|
* added publish_on_command option to switchdiogo4642025-12-053-4/+28
|
* changed verbosity of some log messagesdiogo4642025-12-051-5/+5
|
* improved error handling and log messagesdiogo4642025-12-057-91/+178
|
* removed unused commentdiogo4642025-12-051-118/+0
|
* reworked entity storagediogo4642025-12-059-116/+337
|