Hey Blake,
I’m trying your irrigation code with the KC868-A8 ESP32 relay board, but having some issues getting it running. I’m not sure where the problem may be because the ESP32 seems to be rebooting (boot looping I guess) after loading the code. It may be an ESPhome compiler issue, maybe something I’ve done.
I’ve removed the pcf8574 code the board needs and tried as close to your code unedited as I can (which is really just the SSID and passwords edited) and still find the ESPhome logs show the ESP32 resets right after I2C initialization. I’m using the latest Hass OS, HA and ESPhome builds on a RPi 3B.
Some logs:
Using 'COM3' as serial port.
Writing at 0x001005cb... (100 %)Wrote 1002096 bytes (568236 compressed) at 0x00010000 in 13.5 seconds (effective 595.0 kbit/s)...
Hash of data verified.
Leaving...
Hard Resetting...
Hard resetting via RTS pin...
Done! Flashing is complete!
Showing logs:
[18:44:00]abort() was called at PC 0x401699bb on core 1
[18:44:00]
[18:44:00]ELF file SHA256: 0000000000000000
[18:44:00]
[18:44:00]Backtrace: 0x40089430:0x3ffb19f0 0x400896ad:0x3ffb1a10 0x401699bb:0x3ffb1a30 0x40169a02:0x3ffb1a50 0x401690cb:0x3ffb1a70 0x4016a533:0x3ffb1a90 0x40169daa:0x3ffb1d30 0x4016a438:0x3ffb1d50 0x400e2876:0x3ffb1d70 0x400e2ad5:0x3ffb1df0 0x400e1ae9:0x3ffb1e30 0x400e1527:0x3ffb1e50 0x4017474f:0x3ffb1e70 0x400e30c3:0x3ffb1e90 0x40173aa3:0x3ffb1eb0 0x400dc05d:0x3ffb1ed0 0x40173dd1:0x3ffb1f20 0x40173ead:0x3ffb1f40 0x400df47a:0x3ffb1f60 0x400e27ee:0x3ffb1f90 0x400f8349:0x3ffb1fb0 0x4008a6be:0x3ffb1fd0
[18:44:00]
[18:44:00]Rebooting...
[18:44:00]ets Jun 8 2016 00:22:57
[18:44:00]
[18:44:00]rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[18:44:00]configsip: 0, SPIWP:0xee
[18:44:00]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:44:00]mode:DIO, clock div:2
[18:44:00]load:0x3fff0018,len:4
[18:44:00]load:0x3fff001c,len:1044
[18:44:00]load:0x40078000,len:8896
[18:44:00]load:0x40080400,len:5828
[18:44:00]entry 0x400806ac
[18:44:01]abort() was called at PC 0x401699bb on core 1
[18:44:01]
[18:44:01]ELF file SHA256: 0000000000000000
[18:44:01]
[18:44:01]Backtrace: 0x40089430:0x3ffb0490 0x400896ad:0x3ffb04b0 0x401699bb:0x3ffb04d0 0x40169a02:0x3ffb04f0 0x401690cb:0x3ffb0510 0x4016a533:0x3ffb0530 0x40169daa:0x3ffb07d0 0x4016a438:0x3ffb07f0 0x400e2876:0x3ffb0810 0x400e2ad5:0x3ffb0890 0x400e1ae9:0x3ffb08d0 0x400e1527:0x3ffb08f0 0x4017474f:0x3ffb0910 0x400e30c3:0x3ffb0930 0x40173aa3:0x3ffb0950 0x400dc05d:0x3ffb0970 0x40173dd1:0x3ffb09c0 0x40173ead:0x3ffb09e0 0x400e0361:0x3ffb0a00 0x400ec2b3:0x3ffb0a50 0x400f833a:0x3ffb1fb0 0x4008a6be:0x3ffb1fd0
[18:44:01]
[18:44:01]Rebooting...
[18:44:01]ets Jun 8 2016 00:22:57
[18:44:01]
[18:44:01]rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[18:44:01]configsip: 0, SPIWP:0xee
[18:44:01]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:44:01]mode:DIO, clock div:2
[18:44:01]load:0x3fff0018,len:4
[18:44:01]load:0x3fff001c,len:1044
[18:44:01]load:0x40078000,len:8896
[18:44:01]load:0x40080400,len:5828
[18:44:01]entry 0x400806ac
The only other useful clue I can see is there is a compiler warning, but it still compiles past it OK.
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-rmt.c.o
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-spi.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_out8 = &result[c_longs-1];
^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_data8 = &last_data;
^
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-time.c.o
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-timer.c.o
Blake or anyone have a suggesting to try ?
Also happy to move the questions to your Github repo Blake.
Cheers,
Martin