Repository navigation
feat: switch HA transport to MQTT and move fan PWM to GPIO 16 - #11
Merged
Merged
Conversation
Two hardware-driven changes, both verified on the assembled rig during the first USB flash (2026-06-26): - Home Assistant integration moved from the native encrypted ESPHome api: to mqtt:. The api: block is commented out; mqtt: is enabled with broker auto-discovery, the fancontrol topic prefix, and online/offline birth & will messages. mqtt_host/mqtt_user/mqtt_password come from secrets.yaml (mqtt_host is a bare IP — the port is the separate port: key). - Fan PWM output moved GPIO 25 -> GPIO 16 to match the wiring. GPIO 16 is free on the plain LOLIN D32 (WROOM-32, no PSRAM); only the D32 Pro (WROVER) reserves 16/17 for PSRAM. Pin map updated in CLAUDE.md, PROJECT_PLAN.md, and docs/wiring_diagram.md. Verified: device boots, joins WiFi, connects to the broker, and publishes live temperature/humidity/fan-speed plus diagnostics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The MQTT transport switch added mqtt_host/mqtt_user/mqtt_password !secret references. CI/release generate a throwaway secrets.yaml inline and didn't include these, so `esphome config` failed with "Secret 'mqtt_host' not defined". Seed dummy values (192.0.2.1, RFC 5737 documentation IP) in both ci.yml and release.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
basmeerman
added a commit
that referenced
this pull request
Jun 28, 2026
Two leftover native-API references in README.md after the api: -> mqtt: switch (PR #11): - Quick start: replaced "generate an API encryption key" with the MQTT broker host/user/password setup (mqtt_host is a bare IP, no port). The api_encryption_key is unused now that the api: block is commented out. - Home Assistant integration: rewrote the auto-discovery paragraph to describe MQTT broker auto-discovery instead of the native ESPHome integration. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two hardware-driven changes, both verified on the assembled rig during the first USB flash (2026-06-26):
api:block is commented out;mqtt:is enabled (broker auto-discovery,fancontroltopic prefix, online/offline birth & will messages).mqtt_host/mqtt_user/mqtt_passwordcome fromsecrets.yaml— notemqtt_hostis a bare IP (the port is the separateport:key). Revert by swapping the two blocks back.CLAUDE.md,PROJECT_PLAN.md, anddocs/wiring_diagram.md.Verification
esphome config fancontrol.yaml✅esphome compile fancontrol.yaml✅ (RAM 13.2%, Flash 53.4%)temperature(25.5 °C),humidity(75.1 %),fan_speed(52 %), plus diagnostics.restart_counterincrements on each boot.🤖 Generated with Claude Code