{"id":19414208,"url":"https://github.com/chl33/og3","last_synced_at":"2026-05-09T07:01:47.889Z","repository":{"id":221614539,"uuid":"754873411","full_name":"chl33/og3","owner":"chl33","description":"A C++ framework for ESP applications, especially for Home Assistant integration.","archived":false,"fork":false,"pushed_at":"2026-05-02T17:51:48.000Z","size":443,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-02T19:27:31.409Z","etag":null,"topics":["esp32","home-assistant","mqtt","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chl33.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-08T23:22:38.000Z","updated_at":"2026-04-04T16:02:54.000Z","dependencies_parsed_at":"2024-02-09T02:13:08.049Z","dependency_job_id":"87cf01d2-d699-4c63-9709-933c89b04a0e","html_url":"https://github.com/chl33/og3","commit_stats":null,"previous_names":["chl33/og3"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/chl33/og3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl33%2Fog3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl33%2Fog3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl33%2Fog3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl33%2Fog3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chl33","download_url":"https://codeload.github.com/chl33/og3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chl33%2Fog3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32810381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","home-assistant","mqtt","platformio"],"created_at":"2024-11-10T12:36:53.596Z","updated_at":"2026-05-09T07:01:47.882Z","avatar_url":"https://github.com/chl33.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# og3 library\n\nThe **og3** library is a robust C++ application framework for ESP32 and ESP8266 microprocessors. It is designed to simplify the development of MQTT-based IoT applications, particularly those integrating with [Home Assistant](https://www.home-assistant.io/).\n\nApplications can be organized into separate modules, and modules can use one another. Modules provided include support for WiFi configuration, connections to MQTT brokers, a web interface, OTA updates, simple logging, and support for Home Assistant device discovery using MQTT.\n\nThis library is built for the [PlatformIO](https://platformio.org/) development environment.\n\n## What's New in v0.6.0\n\n*   **Declarative Dependencies**: New `require\u003cT\u003e(name, \u0026ptr)` API for automatic, type-safe module linking.\n*   **Boilerplate Reduction**: Removal of legacy linking lambdas and manual dependency declarations.\n*   **Svelte Alignment**: Core JSON keys and APIs now use `camelCase` for seamless frontend integration.\n*   **Memory Efficiency**: Optimized boot-time dependency resolution to minimize heap fragmentation on ESP8266.\n\n## What's New in v0.5.0\n\n## Key Features\n\n*   **Module System**: Break your application into reusable, independent [`Module`s](docs/modules.md) with managed life-cycles and dependencies.\n*   **Home Assistant Integration**: Native support for MQTT discovery, making it easy to expose sensors, switches, and other entities to Home Assistant.\n*   **Configuration Management**: Built-in support for saving/loading variables from flash storage and configuring them via a web interface.\n*   **Task Scheduling**: Efficient [scheduler](docs/scheduled-tasks.md) for running timed tasks without blocking the main loop.\n*   **Web Interface**: Automatic generation of configuration web pages.\n*   **Logging**: Simple [logging system](docs/logging.md) supporting Serial and UDP logging.\n\n## Getting Started\n\nTo use og3 in your PlatformIO project, add it to your `platformio.ini` `lib_deps`:\n\n```ini\nlib_deps =\n    chl33/og3\n    # Add other dependencies as needed\n```\n\n### Minimal Example\n\nHere is a snippet showing how to define a simple module. See the [examples](examples/) folder for complete projects.\n\n```cpp\n#include \u003cog3/app.h\u003e\n#include \u003cog3/module.h\u003e\n\nclass MyModule : public og3::Module {\npublic:\n  MyModule(og3::App* app) : og3::Module(\"my_module\", \u0026app-\u003emodule_system()) {\n    // Declaratively require other modules\n    require(og3::WifiManager::kName, \u0026m_wifi);\n\n    add_init_fn([this]() {\n        // Initialization code (e.g., pinMode)\n        if (m_wifi) {\n          log()-\u003elog(\"MyModule Initialized with WiFi\");\n        }\n    });\n  }\nprivate:\n  og3::WifiManager* m_wifi = nullptr;\n};\n\nog3::App app(og3::App::Options().withLogType(og3::App::LogType::kSerial));\nMyModule myModule(\u0026app);\n\nvoid setup() { app.setup(); }\nvoid loop() { app.loop(); }\n```\n\n## Documentation\n\nDetailed documentation for core components:\n\n- [Modules and the ModuleSystem](docs/modules.md)\n- [Application Framework (App)](docs/apps.md)\n- [Variables](docs/variables.md)\n- [Scheduled Tasks](docs/scheduled-tasks.md)\n- [Logging](docs/logging.md)\n\n## Examples\n\nCheck the `examples/` directory for ready-to-run projects:\n\n- **[Blink](examples/blink/blink.cpp)**: A simple module that blinks an LED.\n- **[Wifi-app](examples/wifi-app/wifi-app.cpp)**: Adds configurable WiFi and flash storage.\n- **[Web-app](examples/web-app/web-app.cpp)**: Adds a web interface for WiFi configuration.\n- **[HA-app](examples/ha-app/ha-app.cpp)**: A complete MQTT application for Home Assistant.\n\n## Projects using og3\n\n- **[Plant133](https://github.com/chl33/Plant133)**: Plant monitoring and watering system.\n- **[Dough133](https://github.com/chl33/Dough133)**: Temperature-controlled sourdough proofing box.\n- **[Garage133](https://github.com/chl33/Garage133)**: Garage door automation.\n- **[Room133](https://github.com/chl33/Room133)**: Room monitoring sensor node.\n    - [Boiler](https://github.com/chl33/Boiler): Specialized boiler water level monitor.\n- **[Garden133](https://github.com/chl33/Garden133)**: Soil moisture monitoring for gardens.\n- **[LoRa133](https://github.com/chl33/LoRa133)**: LoRa base station for Garden133.\n\n## Ecosystem\n\nSpecial-purpose libraries designed to work with og3:\n\n- **[og3x-shtc3](https://github.com/chl33/og3x-shtc3)**: SHTC3 temperature/humidity sensors.\n- **[og3x-bme280](https://github.com/chl33/og3x-bme280)**: BME280 environmental sensors.\n- **[og3x-lora](https://github.com/chl33/og3x-lora)**: LoRa radio modules.\n- **[og3x-oled](https://github.com/chl33/og3x-oled)**: 0.91\" OLED displays.\n- **[og3x-satellite](https://github.com/chl33/og3x-satellite)**: Base-station/satellite protocol support.\n\n## Author\n\n**chl33** (https://selectiveappeal.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchl33%2Fog3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchl33%2Fog3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchl33%2Fog3/lists"}