Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ESPHome 2024.8.0 #7

Open
golles opened this issue Aug 30, 2024 · 20 comments
Open

Issue with ESPHome 2024.8.0 #7

golles opened this issue Aug 30, 2024 · 20 comments

Comments

@golles
Copy link

golles commented Aug 30, 2024

Since this version (just noticed this today) there has been this issue.
The last known working version is: ESPHome 2024.7.3
Release notes: https://github.com/esphome/esphome/releases/tag/2024.8.0
Diff: esphome/esphome@2024.7.3...2024.8.0

Logs:

[13:06:19]ventilatie'�m
[13:06:19][C][wifi:443]:   Signal strength: -80 dB ▂▄▆█
[13:06:19][C][wifi:ets Jun  8 2016 00:22:57
[13:06:19]
[13:06:20]rst�3�b�C����I�6���[I][logger:156]: Log initialized
[13:06:20][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[13:06:20][D][esp32.preferences:114]: Saving 1 preferences to flash...
[13:06:20][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:06:20][I][app:029]: Running through setup()...
[13:06:20][D][spi:035]: Setting up SPI bus...
[13:06:20][D][binary_sensor:034]: 'Status': Sending initial state OFF
[13:06:20][D][text_sensor:064]: 'Version': Sending state '2024.8.1 Aug 30 2024, 13:04:31'
[13:06:20][C][zehnder:089]: ZEHNDER 'Ventilatie':
[13:06:20]Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[13:06:20]
[13:06:20]Core  1 register dump:
[13:06:20]PC      : 0x401761bd  PS      : 0x00060030  A0      : 0x800dc483  A1      : 0x3ffb2420  
[13:06:20]A2      : 0x3ffb30cc  A3      : 0x3ffb2456  A4      : 0x0000000b  A5      : 0x3ffb2456  
[13:06:20]A6      : 0x00000089  A7      : 0x000000db  A8      : 0x89816ea9  A9      : 0x00000080  
[13:06:20]A10     : 0x00000000  A11     : 0x00000003  A12     : 0x00000002  A13     : 0x3ffb242c  
[13:06:20]A14     : 0x3ffb2400  A15     : 0x00000008  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
[13:06:20]EXCVADDR: 0x00000000  LBEG    : 0x40089939  LEND    : 0x4008995b  LCOUNT  : 0xffffffff  
[13:06:20]
[13:06:20]
[13:06:20]Backtrace:0x401761ba:0x3ffb24200x400dc480:0x3ffb2440 0x400dc4f3:0x3ffb2490 0x400e270e:0x3ffb24b0 0x40176815:0x3ffb2560 0x401768a1:0x3ffb2580 0x400e36dc:0x3ffb25a0 0x400e6662:0x3ffb25d0 0x400f285a:0x3ffb2820 
[13:06:20]
[13:06:20]
[13:06:20]
[13:06:20]
[13:06:20]ELF file SHA256: 0000000000000000
[13:06:20]
[13:06:20]Rebooting...
[13:06:20]ets Jun  8 2016 00:22:57
[13:06:20]
[13:06:20]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[13:06:20]configsip: 0, SPIWP:0xee
[13:06:20]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:06:20]mode:DIO, clock div:2
[13:06:20]load:0x3fff0030,len:1184
[13:06:20]load:0x40078000,len:13132
[13:06:20]load:0x40080400,len:3036
[13:06:20]entry 0x400805e4
[13:06:20][I][logger:156]: Log initialized
[13:06:20][C][safe_mode:079]: There have been 1 suspected unsuccessful boot attempts
[13:06:20][D][esp32.preferences:114]: Saving 1 preferences to flash...
[13:06:20][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:06:20][I][app:029]: Running through setup()...
[13:06:20][D][spi:035]: Setting up SPI bus...
[13:06:20][D][binary_sensor:034]: 'Status': Sending initial state OFF
[13:06:20][D][text_sensor:064]: 'Version': Sending state '2024.8.1 Aug 30 2024, 13:04:31'
[13:06:20][C][zehnder:089]: ZEHNDER 'Ventilatie':
[13:06:20]Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[13:06:20]
[13:06:20]Core  1 register dump:
[13:06:20]PC      : 0x401761bd  PS      : 0x00060030  A0      : 0x800dc483  A1      : 0x3ffb2420  
[13:06:20]A2      : 0x3ffb30cc  A3      : 0x3ffb2456  A4      : 0x0000000b  A5      : 0x3ffb2456  
[13:06:20]A6      : 0x00000089  A7      : 0x000000db  A8      : 0x89816ea9  A9      : 0x00000080  
[13:06:20]A10     : 0x00000000  A11     : 0x00000003  A12     : 0x00000002  A13     : 0x3ffb242c  
[13:06:20]A14     : 0x3ffb2400  A15     : 0x00000008  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
[13:06:20]EXCVADDR: 0x00000000  LBEG    : 0x40089939  LEND    : 0x4008995b  LCOUNT  : 0xffffffff  
[13:06:20]
[13:06:20]
[13:06:20]Backtrace:0x401761ba:0x3ffb24200x400dc480:0x3ffb2440 0x400dc4f3:0x3ffb2490 0x400e270e:0x3ffb24b0 0x40176815:0x3ffb2560 0x401768a1:0x3ffb2580 0x400e36dc:0x3ffb25a0 0x400e6662:0x3ffb25d0 0x400f285a:0x3ffb2820 
@w1an
Copy link

w1an commented Sep 1, 2024

Same error after updating ESPHome. According to ChatGPT there is a NULL pointer reference in the function writeConfigRegisters.

void nRF905::spiTransfer(uint8_t *const data, const size_t length) {
  this->enable();

  this->transfer_array(data, length);

  this->disable();
}

Not sure whether this is helpful...

@drkx
Copy link

drkx commented Sep 2, 2024

Actually the problem appear to be in the this->enable() part. It gets called before the this->spi_setup() from the SPIDevice is run. If you add this (I put this->rf_->spi_setup(); on line 102 of zehnder.cpp) the panic is gone. You do get a lot of errors saying it's already initialized however.

I didn't get a chance to test it yet because in my enthousiasm I ripped my micro usb plug from the board when I was done debugging :(

@w1an
Copy link

w1an commented Sep 2, 2024

You are a star! I can confirm that this fixed the issue for me.

@drkx
Copy link

drkx commented Sep 2, 2024

Good to hear and thanks for testing. Maybe create a pull request for this repo? I use my own repo. Don't remember why.

@remyvv
Copy link

remyvv commented Sep 3, 2024

I actually also ran into this after updating to the 2024.8.0 version.

It seems to be caused by the order of ->setup() invocations for the nrf905 and the zehnder component.
I've change these lines to the following:

float get_setup_priority() const override { return setup_priority::HARDWARE; }

This way the nrf905 gets setup before the zehnder component, which seems to be expected.
Also by doing this change the entire block of writing the config from the zehnder component (here) can be removed, since that's now correctly handled in the nrf905 component.

@w1an
Copy link

w1an commented Sep 3, 2024

Thanks I can confirm the solution by @remyvv also works for me.

@gijs007
Copy link

gijs007 commented Sep 5, 2024

I ran into a "Can't connect to ESPHome API [Errno 111]" message, and the integration in HomeAssistant stopped working after upgrading the firmware. After some Googling I came across this thread.

Turns out my issue is caused caused by the newer ESPHome version, after downgrading to ESPHome 2024.7.3 and re-flashing the firmware with the older version, these problems were solved.

To make downgrading of ESPHome easy, we can add this repo in Home Assistant addons section [https://github.com/khenderick/esphome-legacy-addons]

@Sanderhuisman Would you be so kind to merging/updating the source code, with the fixes mentioned earlier? So we don't have to resort to a downgrade workarounds, or editing code and making forks/repo's ;)

golles added a commit to golles/ESPHome-Config that referenced this issue Sep 6, 2024
@JGeeforce
Copy link

I get the same trouble as gollos, but can someone help me how to fix this?

@Sanderhuisman
Copy link
Owner

I don't have this setup myself anymore as I moved to a new apartment, but I can of course implement suggestions & fixes.

@gijs007 do you have a pull request for me fixing this problem?

@golles
Copy link
Author

golles commented Sep 9, 2024

Oh that's not good news for us :-|

I'm using @remyvv suggestion and that does work for me, this is the commit in my repo: golles/ESPHome-Config@d06615e

The only use case I haven't tested is the wipe the device memory and set up the new connection.

Maybe @remyvv can PR this, as he came with it :-)

@remyvv
Copy link

remyvv commented Sep 10, 2024

Maybe @remyvv can PR this, as he came with it :-)

Sure, can do.
I am currently on vacation so it will have to wait at least 2 weeks until I'm back.

@JGeeforce
Copy link

I hope someone can help. I am trying to set up a new board/nrf905 setup for my E400. Long story short, I managed to fork this repo and did the 2 changes given by golles and I had to change the wire from CLK to CSK to get rid of a write config error. The zehnder part in de log is still starting with: invalid config and after that the searching starts. My E400 is found as hardware, but the pairing is not done. And it tries over and over. O and HA doesn't find new device.

What could be the problem? Maybe still something in the zehnder code, as I see invalid config in the logs?

@JGeeforce
Copy link

I did a downgrade to ESPhome 7.3 Did a complete fresh install and now it is working. So besides the 2 changes by gollos there must something more not correct with ESPhome 8.x I don't have the knowledge for this, so I hope someone else can have a look.

@JBS5
Copy link

JBS5 commented Sep 19, 2024

Is it possible to downgrade a specific ESP to 2024.7.3 instead of downgrading my whole ESPHome docker container from 2024.8.3 to 2024.7.3?

@golles
Copy link
Author

golles commented Sep 19, 2024

Is it possible to downgrade a specific ESP to 2024.7.3 instead of downgrading my whole ESPHome docker container from 2024.8.3 to 2024.7.3?

You can downgrade the container, do the installation on the device, update the container, and then don't update that specific device anymore, so don't use the Update all button.

@JBS5
Copy link

JBS5 commented Sep 19, 2024

Is it possible to downgrade a specific ESP to 2024.7.3 instead of downgrading my whole ESPHome docker container from 2024.8.3 to 2024.7.3?

You can downgrade the container, do the installation on the device, update the container, and then don't update that specific device anymore, so don't use the Update all button.

Thanks. Works perfectly! My ventilation ESP is up&running again with 2024.7.3.

@JGeeforce
Copy link

JGeeforce commented Sep 19, 2024

I hope someone can change the code to make it work with ESP 2024.8, or even better, as I saw that update this morning in HA 2024.9.

For that more changes are needed then the 2 mentioned by gollos, as I was unable to let a new setup work with v8. I had to downgrade to 7.3.

@golles
Copy link
Author

golles commented Sep 19, 2024

I hope someone can change the code to make it work with ESP 2024.8, or even better, as I saw that update this morning in HA 2024.9.

For that more changes are needed then the 2 mentioned by gollos, as I was unable to let a new setup work with v8. I had to downgrade to 7.3.

This fix suggested by remyvv #7 (comment) seems to works fine 2024.9

@JGeeforce
Copy link

I hope someone can change the code to make it work with ESP 2024.8, or even better, as I saw that update this morning in HA 2024.9.
For that more changes are needed then the 2 mentioned by gollos, as I was unable to let a new setup work with v8. I had to downgrade to 7.3.

This fix suggested by remyvv #7 (comment) seems to works fine 2024.9

Well I tried that with 2024.8, but didn't work. It just won't pair. Going to try 2024.9

@JGeeforce
Copy link

JGeeforce commented Sep 19, 2024

I did a clean build files and compiled a new build on ESPhome 2024.9. It's working, I still can control my fan, BUT I think this is because it was already paired. As said with exact these build, 2024.8 didn't work, because it won't pair.

Update: A user on Tweaekers reported he couldn't pair with 2024.9.0. So the same issue with new unpaired hardware on 8.x and 9.0. You need 7.3 for that. Hope someone can fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants