<feed xmlns='http://www.w3.org/2005/Atom'>
<title>embassy-ha, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/'/>
<entry>
<title>added release script</title>
<updated>2026-01-20T15:06:22+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:06:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=8466e8720856786833099580931e7cc77d89d122'/>
<id>8466e8720856786833099580931e7cc77d89d122</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Cargo.lock</title>
<updated>2026-01-20T15:06:11+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:06:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=71f6b71cbce82c398bfacb515cd61e32476232c1'/>
<id>71f6b71cbce82c398bfacb515cd61e32476232c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: release v0.3.0</title>
<updated>2026-01-20T15:04:16+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:04:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=b36a14b1d43dd6b84a296e078d6369e277605b9d'/>
<id>b36a14b1d43dd6b84a296e078d6369e277605b9d</id>
<content type='text'>
Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed doctest</title>
<updated>2026-01-20T15:03:02+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:03:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=d5fa72f84b3469844b636c5dd0cb0105e8d93bf8'/>
<id>d5fa72f84b3469844b636c5dd0cb0105e8d93bf8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cargo fmt</title>
<updated>2026-01-20T15:00:53+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:00:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=4402ce6478027d48435eb937087690ae41f152c1'/>
<id>4402ce6478027d48435eb937087690ae41f152c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>derive default instead of manual impl for DeviceBuffersOwned</title>
<updated>2026-01-20T15:00:25+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T14:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=fde795c093c0392988cae4690b8ef85483d30162'/>
<id>fde795c093c0392988cae4690b8ef85483d30162</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>added claude release command</title>
<updated>2026-01-20T15:00:21+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T14:56:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=0c38558cb794785053dda594dd07c81746b3949d'/>
<id>0c38558cb794785053dda594dd07c81746b3949d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>updated dependencies</title>
<updated>2026-01-20T14:48:51+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T14:48:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=77c1d2e8739c433fd82e9d61c5e5b216c1f2513c'/>
<id>77c1d2e8739c433fd82e9d61c5e5b216c1f2513c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: prefix discovery unique_id with device id</title>
<updated>2026-01-19T20:10:36+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-19T20:10:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=aa47d88882d9bd6c7753315c8fe1b9b2e9b21fa7'/>
<id>aa47d88882d9bd6c7753315c8fe1b9b2e9b21fa7</id>
<content type='text'>
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 |
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 |
</pre>
</div>
</content>
</entry>
<entry>
<title>add mqtt helper functions and refactor buffer management</title>
<updated>2026-01-09T11:30:08+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-09T11:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=27779ecf0d7c00ae0acb650c0d75d28edcc3aa89'/>
<id>27779ecf0d7c00ae0acb650c0d75d28edcc3aa89</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
