The AndrOBD Home Assistant plugin was not appearing in AndrOBD's Plugin Manager, making it impossible to enable and use the plugin.
The PluginInfo object in HomeAssistantPlugin.java was configured with incorrect parameters. The PluginInfo constructor expects:
PluginInfo(String name, Class class, String description, String copyright, String license, String url)However, the plugin was passing:
- Copyright field:
"1.0"(should be copyright notice) - URL field:
"Ian Morgan"(should be repository URL)
This malformed metadata prevented AndrOBD's plugin discovery mechanism from properly identifying and listing the plugin.
File: src/main/java/com/fr3ts0n/androbd/plugin/homeassistant/HomeAssistantPlugin.java
Before:
static final PluginInfo myInfo = new PluginInfo(
"Home Assistant",
HomeAssistantPlugin.class,
"Send OBD data to Home Assistant",
"1.0", // ❌ Wrong: This should be copyright
"GPL-3.0",
"Ian Morgan" // ❌ Wrong: This should be URL
);After:
static final PluginInfo myInfo = new PluginInfo(
"Home Assistant",
HomeAssistantPlugin.class,
"Send OBD data to Home Assistant",
"Copyright (C) 2024 Ian Morgan", // ✅ Fixed
"GPL-3.0",
"https://github.com/ian-morgan99/AndrOBD-Plugin-Home-Assistant" // ✅ Fixed
);-
TESTING_WITHOUT_OBD.md (11KB)
- Comprehensive guide for testing without physical OBD hardware
- Documents 4 different emulation options:
- AndrOBD built-in demo mode (recommended)
- Python ELM327-emulator
- ECU Engine Sim Android app
- Hardware emulators
- Includes testing procedures and debugging tips
-
TROUBLESHOOTING_PLUGIN_DISCOVERY.md (11KB)
- Step-by-step diagnostic procedures
- ADB commands for testing plugin discovery
- Common issues and solutions
- Android version-specific guidance
- Advanced debugging techniques
-
Updated README.md
- Added "Testing Without a Vehicle" section
- Links to testing documentation
-
Updated CHANGELOG.md
- Documented the plugin discovery fix
- Listed all new documentation
The AndrOBD plugin discovery system:
- Broadcasts an
IDENTIFYintent to all registered plugin receivers - Each plugin service responds with a
PluginInfoobject containing metadata - AndrOBD uses this metadata to display the plugin in the Plugin Manager
With incorrect copyright and URL fields, the plugin metadata was malformed, potentially causing:
- Parsing errors in AndrOBD's plugin handler
- Invalid plugin registration
- Silent failures in the plugin listing process
The fix ensures the plugin provides properly formatted metadata that AndrOBD can correctly process and display.
To verify the fix works:
cd /home/runner/work/AndrOBD-Plugin-Home-Assistant/AndrOBD-Plugin-Home-Assistant
./gradlew assembleDebugadb install -r build/outputs/apk/debug/*.apkadb shell pm list packages | grep homeassistantExpected output:
package:com.fr3ts0n.androbd.plugin.homeassistant
# Clear logs
adb logcat -c
# Send IDENTIFY broadcast
adb shell am broadcast \
-a com.fr3ts0n.androbd.plugin.IDENTIFY \
-n com.fr3ts0n.androbd.plugin.homeassistant/.HomeAssistantPluginReceiver
# Check response
adb logcat -d | grep -i identifyExpected to see:
- Receiver receiving the broadcast
- Service starting
- IDENTIFY response being sent with correct metadata
- Open AndrOBD app
- Go to Settings → Plugin extensions (or Plugin Manager)
- Look for "Home Assistant" in the plugin list
- It should now be visible and show:
- Name: "Home Assistant"
- Description: "Send OBD data to Home Assistant"
- Can be enabled/disabled
Once visible in Plugin Manager:
- Enable the Plugin in AndrOBD
- Configure the Plugin:
- Open the "AndrOBD Home Assistant" standalone app
- Set Home Assistant URL
- Set Bearer Token
- Choose transmission mode
- Test with Demo Mode:
- In AndrOBD, enable Demo Mode (Settings)
- Start data collection
- Verify data flows to Home Assistant
- Check Home Assistant:
- Go to Developer Tools → States
- Search for
sensor.androbd_ - Verify sensors are created and updating
See TESTING_WITHOUT_OBD.md for detailed testing procedures.
If the plugin still doesn't appear after applying this fix:
-
Uninstall and reinstall both apps:
adb uninstall com.fr3ts0n.androbd.plugin.homeassistant adb uninstall com.fr3ts0n.ecu.gui.androbd adb reboot # After reboot, reinstall both -
Check Android version compatibility:
- Android 11+ requires AndrOBD to have
<queries>element - Update AndrOBD to latest version
- Android 11+ requires AndrOBD to have
-
Follow detailed troubleshooting guide:
- ✅ Plugin now appears in AndrOBD Plugin Manager
- ✅ Plugin can be enabled/disabled by users
- ✅ Plugin metadata is correctly displayed
- ✅ Plugin discovery mechanism works properly
- ✅ No changes to plugin functionality (data transmission, settings, etc.)
- ✅ No changes to Android manifest configuration
- ✅ No changes to plugin receiver or service implementation
- ✅ Backward compatible with existing installations
- ✅ Can now test without physical OBD device (see documentation)
- ✅ Better diagnostics available (see troubleshooting guide)
-
AndrOBD sends broadcast:
Intent: com.fr3ts0n.androbd.plugin.IDENTIFY Category: com.fr3ts0n.androbd.plugin.REQUEST -
Plugin Receiver (HomeAssistantPluginReceiver) receives it:
onReceive(Context context, Intent intent) { intent.setClass(context, HomeAssistantPlugin.class); context.startService(intent); }
-
Plugin Service (HomeAssistantPlugin) starts and calls:
handleIdentify(context, intent) { Intent response = new Intent(IDENTIFY); response.addCategory(RESPONSE); response.putExtras(getPluginInfo().toBundle()); // ← Fixed here sendBroadcast(response); }
-
AndrOBD PluginHandler receives response:
Intent: com.fr3ts0n.androbd.plugin.IDENTIFY Category: com.fr3ts0n.androbd.plugin.RESPONSE Extras: PluginInfo bundle with corrected metadata -
Plugin Manager displays plugin in UI
With the fix, the PluginInfo bundle now contains:
NAME: "Home Assistant"
CLASS: "com.fr3ts0n.androbd.plugin.homeassistant.HomeAssistantPlugin"
PACKAGE: "com.fr3ts0n.androbd.plugin.homeassistant"
DESCRIPTION: "Send OBD data to Home Assistant"
COPYRIGHT: "Copyright (C) 2024 Ian Morgan" ← Fixed
LICENSE: "GPL-3.0"
URL: "https://github.com/ian-morgan99/AndrOBD-Plugin-Home-Assistant" ← Fixed
FEATURES: (bitmask of supported features)
This fix addresses:
- Plugin not visible in AndrOBD Plugin Manager
- Plugin not discoverable by AndrOBD
- Cannot enable/use the Home Assistant plugin
This fix does NOT address:
- Data transmission issues (those are separate)
- Home Assistant connectivity problems (configure separately)
- WiFi switching issues (different functionality)
- Plugin framework by fr3ts0n
- AndrOBD by fr3ts0n
- Fix implemented using GitHub Copilot
- Testing documentation includes community knowledge
If you encounter problems:
- Review TROUBLESHOOTING_PLUGIN_DISCOVERY.md
- Check GitHub Issues
- Ask in AndrOBD Telegram
The fix is successful when:
- ✅ Plugin appears in AndrOBD Plugin Manager
- ✅ Plugin can be enabled/disabled
- ✅ Plugin receives OBD data when enabled
- ✅ Plugin sends data to Home Assistant
- ✅ No errors in logcat related to plugin discovery
Status: Fix implemented and committed Testing: Requires build environment and Android device Documentation: Complete Ready for: User testing and validation