You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
###### 4. Connect to hidden WiFi AP `ESPTSH_85e196` (last 6 digit of MAC) with password `5ccf7f85e196` (MAC)
212
-
###### 5. Check that firmware and `udpctl` service works. Query system information
210
+
4. Connect to hidden WiFi AP `ESPTSH_85e196` (last 6 digit of MAC) with password `5ccf7f85e196` (MAC)
211
+
5. Check that firmware and `udpctl` service works. Query system information
213
212
```
214
213
$ ./tcli.py -H 192.168.4.1 -s 5ccf7f85e196 system info
215
214
{
@@ -243,9 +242,9 @@ $ ./tcli.py -H 192.168.4.1 -s 5ccf7f85e196 system info
243
242
}
244
243
```
245
244
246
-
#### 5.1.3. Configure System
245
+
#### Configure System
247
246
248
-
###### 1. Setup Wi-Fi station mode and system description
247
+
1. Setup Wi-Fi station mode and system description
249
248
```
250
249
$ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config set -m '
251
250
{
@@ -266,7 +265,7 @@ $ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config set -m '
266
265
]}'
267
266
```
268
267
269
-
###### 2. Setup Time-Zone
268
+
2. Setup Time-Zone
270
269
```
271
270
$ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config set -m '
272
271
{
@@ -279,7 +278,7 @@ $ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config set -m '
279
278
}'
280
279
```
281
280
282
-
###### 3. Save configuration
281
+
3. Save configuration
283
282
```
284
283
$ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config save -m '
285
284
{
@@ -291,7 +290,7 @@ $ ./tcli.py -H 192.168.5.86 -s 5ccf7f85e196 service config save -m '
291
290
```
292
291
293
292
294
-
#### 5.1.4. Configure Script Logic and Schedule
293
+
#### Configure Script Logic and Schedule
295
294
296
295
Following terms were used:
297
296
- global variable `last_ev` - last state change event (0- reset state, 1-force power on, 2- humidity high threshold, 3- humidity low threshold, 4- power off timeout)
@@ -300,8 +299,12 @@ Following terms were used:
300
299
- humidity turn on threshold: >= 36%
301
300
- humidity turn off threshold: < 36%
302
301
- used estimated moving average results from DHT sensor
302
+
- force on power off timeout: 12 minutes
303
+
- humidity on power off timeout: 30 minutes
304
+
- humidity on/off cool down timeout: 5 minutes
305
+
303
306
304
-
###### 1. Make light-shell script with control rule logic. Solution is not optimal, may improved by using dht service thresholds and multicast signal handling
307
+
1. Make light-shell script with control rule logic. Solution is not optimal, may improved by using dht service thresholds and multicast signal handling
305
308
```
306
309
## last_dt; ## last_ev; # sdt := sysctime();
307
310
(last_ev <= 0) ?? { gpio_set(0, 0); last_ev := 1; last_dt := sdt; print(last_ev) }; // set initial state, force power on
0 commit comments