Basic water recirculation functionality for rinnai based water heaters
Find a file
2025-12-09 12:33:25 -08:00
src clean up output 2025-12-09 12:33:25 -08:00
.gitignore clean readCredentials 2025-12-09 11:54:42 -08:00
build.zig initial vibe coded stuff that seems to work 2025-12-09 11:39:12 -08:00
LICENSE initial vibe coded stuff that seems to work 2025-12-09 11:39:12 -08:00
README.md initial vibe coded stuff that seems to work 2025-12-09 11:39:12 -08:00

List Devices - Zig Port

This is a direct port of ../list-devices.js to Zig.

Features

  • Authenticates with AWS Cognito
  • Fetches device list via GraphQL (AppSync)
  • Displays device information
  • Checks recirculation status for the first device
  • Includes startRecirculation function (not called during testing as requested)

Building

zig build

Running

./zig-out/bin/list-devices

Testing

zig build test

Requirements

  • Zig 0.15.2
  • .credentials file in parent directory with username and password (one per line)

Implementation Notes

  • Uses Zig's standard library HTTP client
  • JSON parsing with std.json
  • Base64url decoding for JWT tokens
  • Proper memory management with allocators
  • Error handling with Zig's error unions