Repository navigation
Plugin Submission Process Inquiry #2
marcogagliardi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🚀 How to Build & Submit a New Plugin to AutoSense
Welcome to the Autosense community! 🎉
Because the core AutoSense firmware repository is currently private, community contributors cannot submit direct pull requests to the main codebase. However, thanks to AutoSense’s modular self-registering plugin architecture, developing a new sensor or module plugin is completely decoupled from the rest of the firmware!
We have set up the public AutoSense Community Repository where you will find boilerplate templates, reference interfaces, and working examples.
Here is a complete step-by-step guide on how to build, package, and submit your plugin for evaluation and deployment into the official AutoSense release.
🛠️ How the Submission Process Works
[Community Developer] │ ▼
Grab Template & Example from AutoSense Community Repo
Write Plugin (PXXX.h & PXXX.cpp) + declare lib dependencies
Open a "Plugin Submission" Issue / PR in AutoSense Community │
▼ [AutoSense Team] │
Review code & verify PlatformIO build (ESP32 / ESP8266)
Hardware validation & assign official Plugin ID (if needed)
Merged into Private Core -> Deployed in next Firmware Release! 🚀
📦 What’s Available in the Community Repo
In the AutoSense Community Repository, you will find:
platformio.ini&src/main.cpp) allowing you to compile, flash, and test your plugin on a real ESP32 or ESP8266 without needing access to the private core firmware!TEMPLATE/: ContainsPXXX.handPXXX.cppwith the self-registration boilerplate.examples/: Two fully working reference plugins:P002_DHT: Single-pin digital GPIO sensor with dropdown selection (DHT11 vs DHT22).P010_BME688: I2C multi-variable sensor (Temp, Humidity, Pressure, Gas) with multi-line OLED rendering.include/: Public stub headers (PluginInterface.h,PluginRegistry.h,display_helpers.h) providing API contracts, autocomplete, and mock dispatchers.📝 Step-by-Step Development Guide
1. Reserve / Choose a Plugin Identifier
Plugins follow the naming convention
PXXX(e.g.,P012). In your draft, use your proposed name/code (e.g.,P012forSCD30). We will confirm or assign the official number during review.2. Implement the Core Plugin Methods
Every AutoSense plugin implements the
Plugininterface:init(): Hardware initialization (I2C/SPI begin, pin configuration, sensor startup).read(): Sensor reading loop (called everyuser_settings.frequencyms). Updates internal state, OLED display, MQTT topics, and Web UI metrics.registerSettings()®isterSettingsExtra(): Exposes plugin toggles (module_PXXX) and configurable parameters (GPIO pins, I2C address, thresholds).isEnabled(): Checks ifpluginSettings["module_PXXX"] == 1.createHTMLTile()&createHTMLSettingsForm(): Generates the dashboard card and configuration form for the local web UI.3. Test on Real Hardware (With the Community Test Harness)
You don't have to code blindly! You can test on your physical ESP board:
Autosense-Communityrepo and open it in VS Code with PlatformIO.src/folder.platformio.iniunderlib_deps.init(), and runs yourread()loop every 2 seconds, printing live sensor data, mock MQTT payloads, and OLED lines to the Serial Monitor!4. Display Integration (OLED Guidelines)
If your sensor displays readings on the OLED screen, follow our standard coordinate offsets:
64px OLED (3 lines available):
Y = 16Y = 32Y = 5032px OLED (2 lines available):
Y = 14📬 How to Submit Your Plugin
Once your code is ready:
📋 Submission Template (Copy & Paste)
Settings & Defaults:
module_P012:0(disabled by default)p012_i2c_addr:0x61Attached Files / PR Link:
P012.hP012.cppTesting Notes / Evidence:
(Paste serial monitor logs, screenshots of the Web UI tile, or photos of the sensor in action)
All reactions