arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.96k stars 4.77k forks source link

Feature Request: Add device config via loadable template specific file #5177

Closed Jason2866 closed 5 years ago

Jason2866 commented 5 years ago

Have you look for this feature in other issues and in the wiki? Yes Is your feature request related to a problem? Please describe.

Since the growing amount of devices not all devices can be added to Tasmota code Describe the solution you'd like

Possibility to load a config file (template) which can be loaded via webfrontend to config Tasmota. So everyone could share working device config templates for easy setting up his device

netpok commented 5 years ago

I never intended to offload any part of the existing code to an external server as it would lead to loss of functionality without internet. jQuery was included to speed up the development, in the final version it could be replaced with native code if required.

The can of worms of course should be locked away behind SRI and HSTS, so they can't come out :)

I like this local template menu, but I was not able to find it, is it still work in progress?

arendst commented 5 years ago

Yes it is WIP but I hope to release today.

I need to tune the Ajax part in the near future as currently it uses functionality based on my then simple knowledge of updating pages without rewrites.

netpok commented 5 years ago

Okay, also the required JS code on the device can be further reduced by using ES6, but this would lead to the requirement for modern web browsers. Here is a compatibility table (but probably the basic functions are supported in some of the earlier versions too): image

blakadder commented 5 years ago

TBPH if the webui configuration is structures this way there's really no need to include the web downloading component. This is perfectly straightforward, it is in continuation with the existing gpio configuration so almost no learning curve and it leaves the user free to experiment and change the template according to his needs

jziolkowski commented 5 years ago

@arendst let's discuss the JSON template you have in mind in a client-server scenario. I could write a standalone one (to the tune of tasmota ota fw-server.py) or integrate it into https://github.com/jziolkowski/tdm

EDIT: or expand the fw-server to become ota-template-server.py

arendst commented 5 years ago

@jziolkowski too early. It was just a brainwave after seeing the possibilities provided by @netpok.

If regarding the current template functionality it would be just that. The released JSON message as provided by the template command.

jziolkowski commented 5 years ago

Got it. But in case you decide it's a plausible idea, I'm up for the task.