Upgraded firmware for Simone Giertz's Every Day Calendar that links an ATProto-powered ESP32, for sync with goals.garden 🌱
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Jetstream and Constellation URLs configurable

Add JETSTREAM_HOST, JETSTREAM_PORT, and CONSTELLATION_API to config.h
with sensible defaults. Users can override these in config.local.h if
needed for custom deployments or testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+23 -5
+2 -1
firmware/esp32/GoalsGardenSync/atproto_client.cpp
··· 1 1 #include "atproto_client.h" 2 + #include "config.h" 2 3 #include <HTTPClient.h> 3 4 #include <WiFiClientSecure.h> 4 5 #include <ArduinoJson.h> ··· 239 240 encodedGoalUri.replace("/", "%2F"); 240 241 241 242 while (hasMore) { 242 - String url = "https://constellation.microcosm.blue/xrpc/blue.microcosm.links.getBacklinks" 243 + String url = String(CONSTELLATION_API) + 243 244 "?subject=" + encodedGoalUri + 244 245 "&source=garden.goals.completion%3AgoalUri&limit=100"; 245 246 if (cursor.length() > 0) {
+13
firmware/esp32/GoalsGardenSync/config.h
··· 17 17 #define OFFLINE_SYNC_MODE 1 18 18 #endif 19 19 20 + // Jetstream WebSocket server for real-time ATProto events 21 + #ifndef JETSTREAM_HOST 22 + #define JETSTREAM_HOST "jetstream2.us-east.bsky.network" 23 + #endif 24 + #ifndef JETSTREAM_PORT 25 + #define JETSTREAM_PORT 443 26 + #endif 27 + 28 + // Constellation API for backlink resolution 29 + #ifndef CONSTELLATION_API 30 + #define CONSTELLATION_API "https://constellation.microcosm.blue/xrpc/blue.microcosm.links.getBacklinks" 31 + #endif 32 + 20 33 // I2C pins for communication with calendar 21 34 // STEMMA QT connector to Calendar's J2 header (SDA/SCL) 22 35 #if defined(CONFIG_IDF_TARGET_ESP32S2)
+7
firmware/esp32/GoalsGardenSync/config.local.h.example
··· 34 34 // 2 = goals.garden wins - changes on goals.garden override the device on reconnect 35 35 #define OFFLINE_SYNC_MODE 1 36 36 37 + // ATProto service URLs (optional - defaults are provided) 38 + // Jetstream WebSocket server for real-time events 39 + // #define JETSTREAM_HOST "jetstream2.us-east.bsky.network" 40 + // #define JETSTREAM_PORT 443 41 + // Constellation API for backlink resolution 42 + // #define CONSTELLATION_API "https://constellation.microcosm.blue/xrpc/blue.microcosm.links.getBacklinks" 43 + 37 44 #endif
+1 -4
firmware/esp32/GoalsGardenSync/jetstream_client.cpp
··· 1 1 #include "jetstream_client.h" 2 + #include "config.h" 2 3 #include <ArduinoJson.h> 3 - 4 - // Jetstream public endpoint 5 - #define JETSTREAM_HOST "jetstream2.us-east.bsky.network" 6 - #define JETSTREAM_PORT 443 7 4 8 5 // Static instance for callback 9 6 JetstreamClient* JetstreamClient::instance = nullptr;