emerald_electricity_advisor
emerald_electricity_advisor copied to clipboard
Incompatible with ESPHome 2023.6.0
This relies on ESPTime, and there is a breaking change in ESPHome 2023.6.0 related to this component of ESPHome.
https://github.com/esphome/esphome/pull/4926
I am definitely not a programmer and have no idea where to start to resolve this myself.
Same, here's my logs for the above when updating from at time of writing latest HA & ESPhome releases:
INFO ESPHome 2023.6.5
INFO Reading configuration /config/esphome/iot-esp32-emerald.yaml...
INFO Detected timezone 'Australia/Melbourne'
INFO Generating C++ source...
INFO Compiling app...
Processing iot-esp32-emerald (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/api_connection.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/api_server.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/list_entities.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/proto.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/subscribe_state.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/api/user_services.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/ble_client/ble_client.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/ble_rssi/ble_rssi_sensor.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/emerald_ble/emerald_ble.cpp.o
Compiling /data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/esp32/core.cpp.o
src/esphome/components/emerald_ble/emerald_ble.cpp: In member function 'void esphome::emerald_ble::Emerald::decode_emerald_packet_(const uint8_t*, uint16_t)':
src/esphome/components/emerald_ble/emerald_ble.cpp:106:17: error: 'ESPTime' is not a member of 'esphome::time'
time::ESPTime date_of_measurement = time_->now();
^~~~~~~
src/esphome/components/emerald_ble/emerald_ble.cpp:106:17: note: suggested alternative:
In file included from src/esphome/components/time/real_time_clock.h:8,
from src/esphome/components/emerald_ble/emerald_ble.h:10,
from src/esphome/components/emerald_ble/emerald_ble.cpp:1:
src/esphome/core/time.h:12:8: note: 'esphome::ESPTime'
struct ESPTime {
^~~~~~~
src/esphome/components/emerald_ble/emerald_ble.cpp:108:15: error: 'date_of_measurement' was not declared in this scope
if (date_of_measurement.is_valid()) {
^~~~~~~~~~~~~~~~~~~
src/esphome/components/emerald_ble/emerald_ble.cpp:108:15: note: suggested alternative: 'parse_measurement_'
if (date_of_measurement.is_valid()) {
^~~~~~~~~~~~~~~~~~~
parse_measurement_
*** [/data/iot-esp32-emerald/.pioenvs/iot-esp32-emerald/src/esphome/components/emerald_ble/emerald_ble.cpp.o] Error 1
========================= [FAILED] Took 38.04 seconds =========================
Pretty straight forward fix already made and submitted by user @gheydon over here: https://github.com/WeekendWarrior1/esphome/pull/4
As I wanted to use this code but not wait for the PR to be accepted (already 3 weeks at time of writing) you can simply change the line that reads:
- source: github://WeekendWarrior1/esphome@emerald_ble
to:
- source: github://gheydon/esphome@emerald_ble
which points to source the fixed code instead of @WeekendWarrior1 code. You will need to switch that line back once the PR is merged to inherit any code fixes in the future from the original repo.
@fanuch - Legend! Thanks for doing that. As soon as I get a chance I will re-point to your repository. It looks like @WeekendWarrior1 may be somewhat inactive.
You don't want to take a look at the incompatibility with bluetooth proxy whilst you are there do you ;) Issue is referenced here https://github.com/WeekendWarrior1/emerald_electricity_advisor/issues/7
@aheath70 I had a quick look and it looks like it is something to how @WeekendWarrior1 built this. the repository has a complete copy of esp home, and this is getting outdated.
Luckily the fix that i did was able to be done. But I would like to use this code at another place so I need to have it reliable, so I am going to see if I can clean it up.
... and just like that, was able to update to the latest and greatest ESPHOME on that ESP32. @gheydon - thanks so much. Have starred your repository so that if and when you do manage a reliable re-write, I might get a notification.
Small things make me happy! :)