forked from blakadder/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplates.html
238 lines (213 loc) · 9.94 KB
/
templates.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---
layout: default
---
<div class="container">
<div class="row">
<div class="column">
<span style="font-size: xx-large; font-weight: 400; letter-spacing: -.1rem;">{{ page.title }} {% include pow.html %} {{ page.type | replace: "Miscellaneous", "" }}
{% if page.category contains 'bulb'%}
Bulb
{% endif %}
</span>
</div>
<!-- <div class="float-right"> -->
<div class="float-right" style="overflow-wrap: normal; min-width: 20%; max-width: 40%">
{% assign standard_list = page.standard %}
{% for item_standard in standard_list %}
<a class="button button-grey" href="{{ item_standard | downcase }}.html">{{ item_standard | upcase }}</a>
{% endfor %}
</div>
</div>
<div class="row">
<div class="column">
{% if page.model != nil %}<span style="font-size: large;">Model reference: {{ page.model }} </span> {% endif %}
</div>
</div>
<div class="row">
<div class="column column-60">
<img src="{{ page.image }}" alt="{{ page.title }}" style="max-height: 350px; max-width: 450px;">
</div>
<div class="column">
<p>
<b>
Available from:
</b>
<br>
<a class="menu" href="{% assign link = page.link %}{% include linkage.html %}">{{ page.link | remove_first: "http://" | remove_first: "https://" | remove_first: "www." | remove_first: "smile." | remove_first: "s.click." | split:'/' | first | capitalize}}</a>
<br>
<a class="menu" href="{% assign link = page.link2 %}{% include linkage.html %}">{{ page.link2 | remove_first: "http://" | remove_first: "https://" | remove_first: "www." | remove_first: "smile." | remove_first: "s.click." | remove_first: "offer." | split:'/' | first | capitalize}}</a>
<br>
<a class="menu" href="{% assign link = page.link3 %}{% include linkage.html %}">{{ page.link3 | remove_first: "http://" | remove_first: "https://" | remove_first: "www." | remove_first: "smile." | remove_first: "s.click." | remove_first: "offer." | split:'/' | first | capitalize}}</a>
<br>
<a class="menu" href="{% assign link = page.link4 %}{% include linkage.html %}">{{ page.link4 | remove_first: "http://" | remove_first: "https://" | remove_first: "www." | remove_first: "smile." | remove_first: "s.click." | remove_first: "offer." | split:'/' | first | capitalize}}</a>
<br><br>
{% if page.mlink != nil %}
<b>
Manufacturer:
</b>
<br>
<a class="menu" href="{% assign link = page.mlink %}{% include linkage.html %}">{{ page.mlink | remove_first: "http://" | remove_first: "https://" | remove_first: "www." | remove_first: "smile." | remove_first: "s.click." | split:'/' | first | capitalize}}</a>
{% endif %}
<br><br>
{% if page.flash != nil %}
<b>
Flashed with:
</b>
<br>
{% if page.flash == 'tuya-convert' %}
<a class="menu" href="https://github.com/ct-Open-Source/tuya-convert" target="_blank">Tuya-Convert</a>
{% elsif page.flash == "serial" %}
<a class="menu" href="https://tasmota.github.io/docs/Getting-Started" target="_blank">Serial port</a>
{% elsif page.flash == "sonoff-diy" %}
<a class="menu" href="https://github.com/itead/Sonoff_Devices_DIY_Tools" target="_blank">Sonoff DIY</a>
{% elsif page.flash == "mgos" %}
<a class="menu" href="https://github.com/arendst/mgos-to-tasmota" target="_blank">MgOS to Tasmota</a>
{% elsif page.flash == "preflashed" %}
Tasmota pre-flashed
{% elsif page.flash == "esp2ino" %}
<a class="menu" href="https://github.com/elahd/esp2ino" target="_blank">esp2ino</a>
{% else %}
{% endif %}
{% else %}
{% endif %}
<br>
</div>
<div class="column">
{% include gpios.html %}
</div>
</div>
</div>
{% if page.template32 != nil %}
<div class="row">
<div class="column"><strong>Template for ESP32 device</strong></div>
<div class="column-10"><a class="button button-outline button-small menu" href="{{ site.github.repository_url }}/tree/master/{{ page.relative_path }}">Edit on GitHub</a></div>
</div>
<div class="row">
<div class="column column-100">
<pre><code class="language-json" style="white-space: nowrap">{{ page.template32 }}</code></pre>
</div>
</div>
{% elsif page.template9 != nil %}
<div class="row">
<div class="column"><strong>Template for Tasmota v9.1+</strong></div>
<div class="column-10"><a class="button button-outline button-small menu" href="{{ site.github.repository_url }}/tree/master/{{ page.relative_path }}">Edit on GitHub</a></div>
</div>
<div class="row">
<div class="column column-100">
<pre><code class="language-json" style="white-space: nowrap">{{ page.template9 }}</code></pre>
</div>
</div>
{% else %}
<div class="row">
<div class="column"><strong>Template</strong></div>
<div class="column-10"><a class="button button-outline button-small menu" href="{{ site.github.repository_url }}/tree/master/{{ page.relative_path }}">Edit on GitHub</a></div>
</div>
<div class="row">
<div class="column column-100">
<pre><code class="language-json" style="white-space: nowrap">{{ page.template }}</code></pre>
</div>
</div>
{% endif %}
<!-- Alternative template -->
{% if page.template9_alt != nil %}
<div class="row">
<div class="column column-100">
<pre><code class="language-json" style="white-space: nowrap">{{ page.template9_alt }}</code></pre>
</div>
</div>
{% endif %}
{% if page.template-alt != nil and page.template9 == nil %}
<div class="row">
<div class="column column-100">
<pre><code class="language-json" style="white-space: nowrap">{{ page.template-alt }}</code></pre>
</div>
</div>
{% endif %}
<div>
{% if page.unsupported == true %}
<h2>This device now comes with a Wi-Fi module incompatible with Tasmota</h2>
{% endif %}
{% if page.template32 != nil %}
Works only with a tasmota32 binary. <a href="https://tasmota.github.io/docs/ESP32/">Flashing instructions</a>.<p>
{% endif %}
{% if page.author == 'blak' %}
<div style="float:right; margin:10px; text-align: center;"><img style="width:50px" src="/assets/images/blakapproved.png"> <br><b> by <a href="https://blakadder.com">blakadder</a></b></div>
{% endif %}
{% if page.flash == 'preflashed' %}
This device comes with <b>Tasmota pre-flashed</b> straight from the factory!
<br><br>
<p>
{% endif %}
{% if page.template9 == nil %}
{% assign template = page.template | split: ':' %}
{% assign gpios = template[2] | remove: '[' | remove: '],"FLAG"' | split: ',' %}
{% if gpios contains '131' or gpios contains '132' or gpios contains '133' or gpios contains '134' or gpios contains '135' or gpios contains '136' or gpios contains '137' or gpios contains '145' or gpios contains '146' or gpios contains '207' %}
For more accurate energy consumption measurements this device requires <a href="https://tasmota.github.io/docs/Power-Monitoring-Calibration">power monitoring calibration</a>.
<br><br>
<p>
{% endif %}
{% else %}
{% assign templat9 = page.template9 | split: ':' %}
{% assign gpios = templat9[2] | remove: '[' | remove: '],"FLAG"' | split: ',' %}
{% if gpios contains '2624' or gpios contains '2656' or gpios contains '2688' or gpios contains '2720' or gpios contains '2752' or gpios contains '2784' or gpios contains '2816' or gpios contains '3072' or gpios contains '3104' or gpios contains '3456' or gpios contains '5056' %}
For more accurate energy consumption measurements this device requires <a href="https://tasmota.github.io/docs/Power-Monitoring-Calibration">power monitoring calibration</a>.
<br><br>
<p>
{% endif %}
{% if page.type contains 'Curtain Switch' %}
Requires configuring <a href="https://tasmota.github.io/docs/Blinds-and-Shutters/">shutter support</a>.
<br><br>
<p>
{% endif %}
{% endif %}
{% if page.template contains '"BASE":73' %}
Requires enabled <a href="https://tasmota.github.io/docs/PWM-dimmer-switch/">PWM Dimmer support</a> in Tasmota v8.2 or newer. Follow the article instructions for configuration.
<br><br>
<p>
{% endif %}
{% if page.type contains 'RGBW' %}
See <a href="https://tasmota.github.io/docs/Lights/#4-channels-rgbw-lights">Tasmota documentation</a> on how to configure RGBW lights to your needs.
<br><br>
<p>
{% endif %}
{% if page.flash == 'tuya-convert' %}
Tuya-Convert might not be possible for this device if the manufacturer started using <a href="https://github.com/ct-Open-Source/tuya-convert/issues/483">newest Tuya firmware</a> since this template was published ({{ page.date_added }}).
<br><br>
<p>
{% endif %}
{% if page.flash == 'wpf' %}
Can be flashed over-the-air with <a href="https://github.com/elahd/wyze_plug_flasher">Wyze Plug Flasher</a>.
<br><br>
<p>
{% endif %}
{% if page.title contains 'Teckin' or page.title contains 'Lumiman' or page.title contains 'BrilliantSmart' %}
<b>NOTICE!!!</b> Manufacturer has started using unsupported non-ESP8266 chips recently and this device might not be compatible anymore.<p>
<br><br>
<p>
{% endif %}
{% if page.title contains 'Athom' %}
<strong>Use code <code>BLAKADDER4 </code> when buying from Aliexpress links for a 10% discount. Code is valid until end of September.</strong>
<br><br>
<p>
{% endif %}
{% if page.title contains 'Moes' %}
<strong>Use code <code>BLAKADDER</code> when buying from <a href="https://www.moeshouse.com/?ref=v4thya2eufek">moeshouse.com</a> store for a 20% discount.
<br><br>
<p>
{% endif %}
{% if page.mlink contains 'novostella.uk' %}
<strong>Use code <code>BLAKADDER</code> when buying directly from Novostella for a 10% discount.</strong>
<br><br>
<p>
{% endif %}
{% if page.title contains 'LoraTap' %}
<strong>WARNING!</strong> LoraTap is using ESP8266 and Realtek Wi-Fi modules on same model devices. Check seller descriptions or contact them before buying!
<br><br><p>
{% endif %}
{% if page.title contains 'Lerlink' %}
Manufactured by Lerlink but found under different brands (Lonsonho, Zemismart, Moes, etc)
<br><br><p>
{% endif %}
{{ content | markdownify }}
</div>
<div id="amzn-assoc-ad-c632316f-24d7-45e3-9fd2-4f1038ceddbc"></div><script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=c632316f-24d7-45e3-9fd2-4f1038ceddbc"></script>