Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.36k stars 253 forks source link

Going from tasmota to esphome again, updating tft etc #378

Closed thepuncake closed 1 year ago

thepuncake commented 1 year ago

Hi again and great job on the blueprint, now if only I can make it work!

So I started off by flashing esphome over the original firmware but ran into some trouble with the blueprint throwing errors and whatnot so I decided to flash tasmota. Followed blackadder's instructions and it all worked out beautifully.

Then I realized that I can only control other tasmota devices with it (?) which is less than ideal as the original plan was to bring in HA entities.

Now I really want to go back to esphome and the blueprint but is there some process I need to follow before going ahead with the flash?

Do I need to flash a blank tft file to the Nextion screen? Can I do that from tasmota?

Do I need to serial flash again or can I flash esphome OTA from within tasmota or something?

If somebody who's done the same can roughly outline the steps needed and correct order, that would be amazing.

Thanks in advance and again, great great thing you did here :)

bkbartk commented 1 year ago

for as far as I understand you only need to flash _blank if you used the jobr99 project before, but I don't think you did. You can either flash using esphome or tasmota. But since a lot of people have issues on esphome I would suggest tasmota I can advise you to check here https://docs.nspanel.pky.eu/prepare_nspanel/#configure-tasmota-template-for-nspanel

for esphome, build as legacy download. convert to .bin.gz (I use 7 zip for this) and drop it in the firmware update box. Now esphome will be flashed. thats all.

Blackymas commented 1 year ago

I have never used tasmota.

The best way would be to do everything from 0 as it says in the doc.

  1. delete HA NSpanel Device, Blueprint, ESPHOME
  2. start to build ESPhome and reflash NSPanel
  3. follow the instructions
thepuncake commented 1 year ago

for as far as I understand you only need to flash _blank if you used the jobr99 project before, but I don't think you did. You can either flash using esphome or tasmota. But since a lot of people have issues on esphome I would suggest tasmota I can advise you to check here https://docs.nspanel.pky.eu/prepare_nspanel/#configure-tasmota-template-for-nspanel

  • uploade the berry driver
  • and now you can use FlashNextion https is not supported, so you probaly need to store the files local. if you are not sure, just upload the _blank, (a white screen should appear). then upload the normal version.

for esphome, build as legacy download. convert to .bin.gz (I use 7 zip for this) and drop it in the firmware update box. Now esphome will be flashed. thats all.

Thanks for your answer, I'm currently on tasmota and it works but not really usable. Will the above process with the new autoexec.be allow me to use lovelace on the nspanel? Also the page you linked mentions an esphome component while running tasmota. Can/will that work with the Blackymas blueprint without having to reflash? Thanks again and excuse the confusion.

bkbartk commented 1 year ago

let's just stat that the lovelace project and the blueprint project are 2 totally unrelated projects. If you insist on using tasmota I would advise you to use the lovelace-ui project. The other solution is to migrate all services to tasmota. But I think that is days work. So if you need tasmota I would suggest to use this project https://github.com/joBr99/nspanel-lovelace-ui If you want to use esphome you can use both project. but if so I would only suggest to flash the .tft using tasmota because that works better.

you cannot do without flashing, but you can do without serial flashing

In tamota you are able to upload an esphome bin file image for esp32(nspanel) you need to use the legacy format. and because of the size you might need to zip(gz) the file.

image

thepuncake commented 1 year ago

@bkbartk Thanks for your detailed explanation! So to get this right. First I need to upload the berry driver to tasmota like so: Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1

Then I would need to upload nspanel_eu.tft to a local web server (HA www folder) and flash in tasmota console with FlashNextion http://192.168.0.100:8123/local/nspanel_eu.tft (the tft file from this project)

Then I would have to download the firmware bin file from the HA esphome addon in legacy format with the config from this project, compress to .bin.gz and flash through tasmota "firmware upgrade".

And then I would have to import the blueprint in Home Assistant. Do I get it or am I missing something? Thanks again!

bkbartk commented 1 year ago

yes

thepuncake commented 1 year ago

Ok I've done this but tasmota won't let me upload the .bin.gz file as it's too large (714kb). I don't imagine there is a way to make it even smaller. Normally I would flash tasmota-minimal to solve this but will that work with the nspanel?

bkbartk commented 1 year ago

This is possible. But I remember a similar situation where in the end the size wasn’t the issue. I do not remember what the solution was. did you use the legacy format?

thepuncake commented 1 year ago

Yup, legacy format, the bin file is a bit over a mb, gets to 700k on compression. I've just tried tasmota-minimal btw but it doesn't seem to change anything.

bkbartk commented 1 year ago

you could try both, minimal tasmota, and a minimal esphome build also If you are using Tasmota 7.2+ it is necessary to run the command “SetOption78 1” in the Tasmota console and restart your device to be able to upgrade to esphome. https://esphome.io/guides/migrate_sonoff_tasmota.html

but I've have this issue you are facing and in the end it turned out, the issue was not the file size. I only can't remember what it was. maybe only a reboot was needed ore something

thepuncake commented 1 year ago

Well I've tried flashing the original bin file instead of the compressed one and it has worked so I guess the issue really wasn't the file size :) Thanks for guiding me through this man, you a hero hehe.

Edit: Everything is working beautifully, thanks once more, closing this!