mindmelting / hass-powerpal

Home Assistant custom integration to fetch data from Powerpal
MIT License
44 stars 11 forks source link

Can't compile powerpalyaml in ESPhome #18

Closed pencilhead1 closed 1 year ago

pencilhead1 commented 1 year ago

I'm trying to compile powerpal config in ESPHOME using latest version 2023.2.1 I've re-downloaded/installed latest version of powerpal.

Powerpal works with previous versions, but HA has deprecated "AP password" for "AP KEY" and all my ESPHome devices need updating.

Configuration

YAML


external_components:
  - source: github://WeekendWarrior1/esphome@powerpal_ble
     requires ble_client because I had to add some small features to authenticate properly
    components: [ ble_client, powerpal_ble ]

# optional requirement to enable powerpal cloud uploading
http_request:
  id: powerpal_cloud_uploader

# optional requirement used with daily energy sensor
time:
  - platform: homeassistant
    id: homeassistant_time

esp32_ble_tracker:

ble_client:
  - mac_address: d5:d7:12:xx:xxx:xx
    id: powerpal

sensor:
  - platform: powerpal_ble
    ble_client_id: powerpal
    power:
      name: "Powerpal Power"
    daily_energy:
      name: "Powerpal Daily Energy"
    energy:
      name: "Powerpal Total Energy"
    battery_level:
      name: "Powerpal Battery"
    pairing_code: 667124
    notification_interval: 1
    pulses_per_kwh: 800
    time_id: homeassistant_time 

# daily energy still works without a time_id, but recommended to include one to properly handle daylight savings, etc.
#    http_request_id: powerpal_cloud_uploader
#    cost_per_kwh: 0.1872 #dollars per kWh
    powerpal_device_id: 0000d32e #optional, component will retrieve from your Powerpal if not set
    powerpal_apikey: 1ea7e8b2-4a8f-4e20-8e61-xxxxxxxxxxxx #optional, component will retrieve from your Powerpal if not set

Compilation Logs

Processing somfy (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- SPI @ 2.0.0
|-- EEPROM @ 2.0.0
|-- SmartRC-CC1101-Driver-Lib @ 2.5.7
|-- Somfy_Remote_Lib @ 0.4.1
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- WiFiClientSecure @ 2.0.0
|-- HTTPClient @ 2.0.0
Compiling /data/somfy/.pioenvs/somfy/src/esphome/components/ble_client/ble_client.cpp.o
Compiling /data/somfy/.pioenvs/somfy/src/esphome/components/json/json_util.cpp.o
Compiling /data/somfy/.pioenvs/somfy/src/esphome/components/logger/logger.cpp.o
Compiling /data/somfy/.pioenvs/somfy/src/esphome/components/md5/md5.cpp.o
In file included from src/esphome/components/ble_client/ble_client.cpp:5:
src/esphome/components/ble_client/ble_client.h:89:8: error: conflicting return type specified for 'virtual void esphome::ble_client::BLEClient::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)'
   void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
        ^~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/ble_client/ble_client.cpp:4:
src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.h:157:16: note: overridden function is 'virtual bool esphome::esp32_ble_tracker::ESPBTClient::gattc_event_handler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)'
   virtual bool gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
                ^~~~~~~~~~~~~~~~~~~
*** [/data/somfy/.pioenvs/somfy/src/esphome/components/ble_client/ble_client.cpp.o] Error 1
========================== [FAILED] Took 3.68 seconds ==========================
mindmelting commented 1 year ago

Hello!

I think you need to report this on a different repo: https://github.com/WeekendWarrior1/powerpal_ble

This is not the repo for ESPHome Powell's BLE integration 😀