Skip to content

Add GET /all bulk read endpoint + build fixes for newer esp-idf#10

Open
Superheld wants to merge 1 commit into
supergreenlab:masterfrom
Superheld:feature/bulk-read-endpoint
Open

Add GET /all bulk read endpoint + build fixes for newer esp-idf#10
Superheld wants to merge 1 commit into
supergreenlab:masterfrom
Superheld:feature/bulk-read-endpoint

Conversation

@Superheld

Copy link
Copy Markdown

What

  • GET /all — a new HTTP handler that returns every readable key as a single JSON object, streamed via chunked responses. Clients can read the full controller state in one request instead of one HTTP call per key (helpful for polling integrations, e.g. Home Assistant).
  • mqtt: add a default: case to the event switch so the firmware builds warning-clean under -Werror=switch on newer esp-idf, which adds events such as MQTT_EVENT_DELETED.
  • kv_mapping.h: fix a typo in the kvui32_mappings extern declaration (was kviui32_mappings) so the array can actually be referenced.

Notes

  • All changes are additive — existing endpoints and behaviour are unchanged.
  • main/core/mqtt/mqtt.c is the regenerated output of the .template change (kept in sync).
  • Built against espressif/idf:release-v3.3; firmware.elf links and contains the new handler.

Example:

$ curl http://<controller>/all
{"TIME":0,"WIFI_STATUS":3,"BOX_0_TEMP":27,"BOX_0_HUMI":48,...,"DEVICE_NAME":"Dings"}

🤖 Generated with Claude Code

- httpd: add a `GET /all` handler returning every readable key as a single
  JSON object, streamed via chunked responses. Lets clients read the whole
  state in one request instead of one HTTP call per key.
- mqtt: add a `default:` case to the event switch so the build stays
  warning-clean under -Werror=switch on newer esp-idf (which adds events
  such as MQTT_EVENT_DELETED).
- kv_mapping: fix a typo in the `kvui32_mappings` extern declaration
  (was `kviui32_mappings`), so the array can actually be referenced.

All additive; existing endpoints and behaviour are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant