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

[Feature Request] Berry driver TAPP file instead of autoexec.be #632

Closed
soyxan opened this issue Dec 26, 2022 · 7 comments
Closed

[Feature Request] Berry driver TAPP file instead of autoexec.be #632

soyxan opened this issue Dec 26, 2022 · 7 comments
Milestone

Comments

@soyxan
Copy link

soyxan commented Dec 26, 2022

FEATURE DESCRIPTION

Distribute the berry driver as a TAPP (Tasmota application) file instead of autoexec.be, this way if anyone is using a custom made autoexec.be file (like me) it will not be overwritten when updating from the screen.

ADDITIONAL CONTEXT

As per the Tasmota documentation: Any file with .tapp (Tasmota Application) extension will be considered as an uncompressed ZIP, and if it contains a sub-file autoexec.be it will be executed.
https://tasmota.github.io/docs/Tasmota-Application/

PANEL / FIRMWARE VERION

Please add the Panel/Firmware Version you are using (EU, US-L or US-P)

@joBr99
Copy link
Owner

joBr99 commented Dec 26, 2022

I do not really see a benefit in this, what do you have in your autoexec.be? What's the use case?

Updates to the berry driver are really rare, for example there was no new version from April to the End of November. It only needs to be altered if something in tasmota changes that breaks the berry driver.

@soyxan
Copy link
Author

soyxan commented Dec 26, 2022

I implemented some custom scripts in my NSPanel to fully integrate the Tasmota thermostat in HA. but anyone could have any other requirement that needs a custom autoexec.be file. What I need to do now is to rename your autoexec.be file and import it from my autoexec.be (not big deal, but it is not very clean)
Also, I think that the purpose of the TAPP files is specifically designed for this case, as your driver will be properly identified in the Tasmota file system, avoiding any unintended modification/deletion, in fact, Tasmota has many applications that are already distributed this way, for instance, the OpenHASP implementation in Tasmota ( https://tasmota.github.io/docs/HASPmota/ )

@joBr99
Copy link
Owner

joBr99 commented Dec 26, 2022

Will have a look; yes, you can rename it without any issues and just load it from your autoexec. (Wouldn't say that this is a bad practice, that's actually how it's done in the project with the stock firmware)

@joBr99
Copy link
Owner

joBr99 commented Dec 27, 2022

There is now a .tapp file in the repo you can install the driver with

Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/nsp-lovelace-driver.tapp; Restart 1

There is a mecanism implemented for the migration from autoexec.be to tapp, but since this requires the new berry driver this will be done in some future release. Until the switchover the backend won't do automatic updates of the tapp driver.

@joBr99 joBr99 closed this as completed Dec 27, 2022
@joBr99 joBr99 added this to the 3.8.X milestone Dec 27, 2022
@joBr99
Copy link
Owner

joBr99 commented Dec 27, 2022

Initial Installation of tapp driver:

Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/nsp-lovelace-driver.tapp; Restart 1

Initial Installation of autoexec driver:

Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1

Update and migration to tapp driver, requires version 8 of the berry driver

UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/nsp-lovelace-driver.tapp

Update of autoexec driver

UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be

@soyxan
Copy link
Author

soyxan commented Dec 27, 2022

Thanks for the quick work!

I have seen that the UpdateDriverVersion command in the berry driver implements both ways of updating (.tapp or .be), but in the AppDaemon script nspanel-lovelace-ui.py the desired_tasmota_driver_url used in the Updater constructor (which underneaths calls the UpdateDriverVersion command), points only to the .be file (https://github.com/joBr99/nspanel-lovelace-ui/blob/main/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py#L38). I assume that in a future new version of this script, it will reference the .tapp file somehow, right?

@joBr99
Copy link
Owner

joBr99 commented Dec 27, 2022

There is a mecanism implemented for the migration from autoexec.be to tapp, but since this requires the new berry driver this will be done in some future release. Until the switchover the backend won't do automatic updates of the tapp driver.

Yes, at some point it will be changed to tapp.

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

2 participants