Dilbert66 / esphome-vistaECP

This is an implementation of an ESPHOME custom component and ESP Library to interface directly to a Safewatch/Honeywell/Ademco Vista 15/20 alarm system using the ECP interface and very inexpensive ESP8266/ESP32 modules .
GNU Lesser General Public License v2.1
130 stars 21 forks source link

Compilation Errors After VistaAlarm.yaml Changes #135

Closed kschlichter closed 1 month ago

kschlichter commented 1 month ago

I'm trying to compile the dev branch for use on an ESP8266 with ESP Home docker 2024.9.2 and I'm getting some compile errors. It's possible I've caused these errors with the changes I made in VistaAlarm.yaml issue/134 but another user seems to be hitting the same error in the Home Assistant forum so maybe it's a separate issue.

I've attached the logs from my install attempt and I'm happy to share my VistaAlarm.yaml, if that's helpful.
logs_VistaAlarm_compile.txt

This is where it starts to go wrong:

Compiling .pioenvs/vinevistaalarm/FrameworkArduino/Updater.cpp.o
In file included from src/esphome/core/log.h:8,
                 from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/core/application.h:16,
                 from src/esphome/components/vista_alarm_panel/vistaalarm.h:5,
                 from src/esphome/components/vista_alarm_panel/vistaalarm.cpp:2:
src/esphome/components/vista_alarm_panel/vistaalarm.cpp: In member function 'esphome::alarm_panel::vistaECPHome::zoneType* esphome::alarm_panel::vistaECPHome::createZone(uint16_t)':
src/esphome/components/vista_alarm_panel/vistaalarm.cpp:213:19: error: initializer fails to determine size of '__pstr__'
  213 |      ESP_LOGD(TAG,PSTR("adding zone %d"),z);
/config/.esphome/platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:76: note: in definition of macro 'FPSTR'
   39 | #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
      |                                            
Dilbert66 commented 1 month ago

The esp8266 does not handle PSTR's like the esp32. I've corrected the code and pushed to dev. You can try recompiling now.

kschlichter commented 1 month ago

That compiles for me now; thank you!