This repository contains external components for ESPHome
This component enables keyboard or barcode scanner connected via USB OTG port of ESP32 S2/S3 family of micro-controllers. Additionally the component can resolve the pure barcode into a food product name.
This component allows to add items to the Paprika3App grocery list.
The Paprika3App component requires a lot of memory to gzip requests (Sadly needed by the weird API). Thus, the ESP32-S2/S3 device has to have PSRAM connected and enabled, e.g.:
psram:
mode: octal
speed: 80MHz
Arduino framework is not supported. And flash mode must be corrected for esp-idf ESP32 S2/S3.
esphome:
platformio_options:
board_build.flash_mode: dio # default mode is wrong
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
The following yaml can be used to import components into your ESPHome configuration:
external_components:
- source: github://danielBreitlauch/esphome_components
text_sensor:
- platform: usb_barcode_scanner
name: barcode
type: food # optional 'barcode' will show the barcode or 'food' (default) will show the product name
openfoodfacts_region: de # optional specify the region for lookup queries to OpenFoodFacts. Default: world
paprika-app-list:
email: "xxx" # login email of the apps account
password: "xxx" # login password of the apps account
listID: "xxx-xxx-xxx-xxxx-xxxxxxx-xxxx-xxxxxxxxxxxxx" # listId of the grocery list lmk if it needs to be simpler to find this
text_sensor:
- ...
on_value:
then:
- paprika-app-list.add
format: "lala: %s" # Optional: formats the incoming text
esphome:
name: barcode
platformio_options:
board_build.flash_mode: dio
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
psram:
mode: octal
speed: 80MHz
external_components:
- source: github://danielBreitlauch/esphome_components
paprika-app-list:
email: "xxx"
password: "xxx"
listID: "xxx-xxx-xxx-xxxx-xxxxxxx-xxxx-xxxxxxxxxxxxx"
text_sensor:
- platform: usb_barcode_scanner
name: barcode
on_value:
then:
- paprika-app-list.add