diff --git a/fichero_printer/fichero/api.py b/fichero_printer/fichero/api.py index 7cb0ef7..df1bad4 100644 --- a/fichero_printer/fichero/api.py +++ b/fichero_printer/fichero/api.py @@ -284,7 +284,26 @@ async def get_status( except PrinterError as exc: detail = str(exc) error_str = str(exc).lower() - if not classic and ("br-connection-not-supported" in error_str or "dbus" in error_str): + if not classic and "br-connection-not-supported" in error_str: + detail += "\n\nšŸ”§ HOME ASSISTANT BLE PERMISSION FIX:\n" + detail += "This error occurs when Home Assistant doesn't have proper Bluetooth permissions.\n\n" + detail += "šŸ“‹ STEP-BY-STEP SOLUTION:\n" + detail += "1. Edit your add-on configuration in Home Assistant\n" + detail += "2. Add this line to the configuration:\n" + detail += " host_dbus: true\n" + detail += "3. Save the configuration\n" + detail += "4. Restart the Fichero add-on\n" + detail += "5. Try connecting again\n\n" + detail += "šŸ’” If you're using the Home Assistant OS:\n" + detail += "- Go to Settings > Add-ons > Fichero Printer > Configuration\n" + detail += "- Add 'host_dbus: true' under the 'host_dbus' section\n" + detail += "- This gives the add-on access to the system Bluetooth stack\n\n" + detail += "šŸ”„ ALTERNATIVE SOLUTION:\n" + detail += "If BLE still doesn't work after adding host_dbus, try Classic Bluetooth:\n" + detail += "1. Set 'classic=true' in your API calls\n" + detail += "2. Use channel=1 (most common for Fichero printers)\n" + detail += "3. Use the 'Pair Device' button in the web UI first" + elif not classic and "dbus" in error_str: detail += "\n\nBLE Permission Fix:\n" detail += "1. Add 'host_dbus: true' to your add-on configuration\n" detail += "2. Restart the add-on\n" diff --git a/fichero_printer/fichero/index.html b/fichero_printer/fichero/index.html index 1dd09ca..f931c0f 100644 --- a/fichero_printer/fichero/index.html +++ b/fichero_printer/fichero/index.html @@ -481,6 +481,22 @@ +
+

šŸ”§ BLE Connection Issues?

+

+ If you see "br-connection-not-supported" error: +

+
    +
  1. Edit your Home Assistant add-on configuration
  2. +
  3. Add: host_dbus: true
  4. +
  5. Save and restart the add-on
  6. +
  7. Try connecting again
  8. +
+

+ Still issues? Try Classic Bluetooth with channel 1 and use the "Pair Device" button. +

+
+