revk / ESP32-Faikin

ESP32 based module to control Daikin aircon units
GNU General Public License v3.0
409 stars 59 forks source link

Switching to ESPHome firmware #69

Closed XMaarten closed 1 year ago

XMaarten commented 1 year ago

Would it be possible to instead of upgrading to the latest firmware version, to upgrade to ESPHome instead?

I would like to use https://github.com/joshbenner/esphome-daikin-s21 instead of the default firmware with MQTT.

revk commented 1 year ago

MQTT command/Faikin/upgrade https://someurl... should allow you to fetch any binary.

Or use a lead to reflash directly.

XMaarten commented 1 year ago

Great, thanks! Maybe add this to the documentation, I couldn't find it myself.

revk commented 1 year ago
Screenshot 2023-07-08 at 13 02 06

It is in the manual for the library it uses. https://github.com/revk/ESP32-RevK/blob/master/revk-user.md

XMaarten commented 1 year ago

I am getting a ESP_ERR_OTA_VALIDATE_FAILED error, probably because the image isn't signed? Is there a way to continue without a signed image?

revk commented 1 year ago

You would need to flash your own boot loader and image to start with. You can then decide if you want signed code or not, and set up your own signing.

I have not set "secure boot" fuses on the modules we sell, so the boot loader requires signing with my key, so flashing from scratch with your own code should be possible.

XMaarten commented 1 year ago

I am using your device from Amazon, but would like to switch to the ESPHome using OTA. Do I understand correctly that this isn't possible without having your key?

Would you maybe be willing to sign a default ESPHome binary with your key?

revk commented 1 year ago

You will need to do a serial flash for that.

But I am working on HomeKit/Matter stuff anyway, so hopefully won't be long before we have that.

Surely ESPHome binary would not talk to the Daikin though - would it?

XMaarten commented 1 year ago

When I have it flashed to a default ESPHome binary, I can flash it again using EPSHome itself to use https://github.com/joshbenner/esphome-daikin-s21 .

Serial flash requires me to open the units, and I am always having problems with flashing serial.

revk commented 1 year ago

I suggest using https://www.amazon.co.uk/dp/B0C15K9ZC4

Or wait for me to get HomeKit working in the code ;-)

XMaarten commented 1 year ago

I wish I found that sooner :). Thanks, I just ordered one.

revk commented 1 year ago

Thanks, I am planning to put way more PCBs on Amazon soon.