frugal-iot-server 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ # Which readings appear on a device's card, and in what order.
2
+ #
3
+ # Keys match the OTA key, which the firmware builds as SYSTEM_OTA_PREFIX "_" SYSTEM_OTA_SUFFIX -
4
+ # the application, then the board (see src/system/ota.cpp). So sht30 built for ten boards gives ten
5
+ # keys, sht30_c3_pico, sht30_d1_mini, ... all wanting the same card. Resolution order is:
6
+ # 1. an exact match on the device id e.g. esp8266-fb94bb
7
+ # 2. an exact match on the full OTA key e.g. sht30_c3_pico
8
+ # 3. the longest key the OTA key starts with e.g. sht30
9
+ # Longest wins at step 3, so file order never matters and sht30 beats sht.
10
+ #
11
+ # front: the ordered rows on the front of the card. An entry containing "/" is a twig
12
+ # (module/leaf); one without is a control module, shown as its single control row.
13
+ # summary: the one-line summary. Optional, and usually best omitted - it defaults to the first few
14
+ # entries of front, which now includes a control, shown compactly as "Relay ✓".
15
+ #
16
+ # An application with no entry gets the default: graphable readings, then actuators, then controls.
17
+ # That is the right answer whenever the order does not matter, so most applications belong here only
18
+ # if they want something specific. Module ids are the keys of modules.yaml - note the BH1750 sensor
19
+ # publishes under "lux", not "bh1750".
20
+ #
21
+ # Of the applications in the node library, three are deliberately absent: "all" is every sensor at
22
+ # once and no order helps, "gsheets" carries only a logging control, and "lcd_sht" displays another
23
+ # node's readings rather than its own.
24
+
25
+ agri:
26
+ front: [soil/soil, ds18b20/ds18b20, sht/temperature, sht/humidity, controlhysteresis]
27
+ summary: [soil/soil, ds18b20/ds18b20]
28
+ bh1750:
29
+ front: [lux/lux, controlhysteresis]
30
+ blinken:
31
+ front: [controlblinken]
32
+ commonground:
33
+ front: [bme280/temperature, bme280/humidity, do/do, ultrasonic/ultrasonic, ds18b20/ds18b20, controlhysteresis]
34
+ datalogger:
35
+ front: [sht/temperature, sht/humidity]
36
+ ensaht:
37
+ front: [aht21/temperature, aht21/humidity, ens160/aqi, controlhysteresis]
38
+ gps:
39
+ front: [gps/satellites, gps/latitude, gps/longitude, gps/altitude]
40
+ summary: [gps/satellites]
41
+ lilygohigrow:
42
+ front: [soil/soil, dht/temperature, dht/humidity, lux/lux]
43
+ summary: [soil/soil]
44
+ loadcell:
45
+ front: [loadcell/loadcell]
46
+ loramesher:
47
+ front: [sht/temperature, sht/humidity]
48
+ ms5803:
49
+ front: [ms5803/pressure, ms5803/temperature]
50
+ power:
51
+ front: [sht/temperature, sht/humidity, controlblinken]
52
+ remotedisplay:
53
+ front: [sht/temperature, sht/humidity, controlhysteresis]
54
+ sht30:
55
+ front: [sht/temperature, sht/humidity, controlhysteresis]
56
+ soil:
57
+ front: [soil/soil, sht/temperature, sht/humidity, controlhysteresis]
58
+ summary: [soil/soil]
59
+ sonoff:
60
+ # The relay is what someone wants to see; the control that drives it comes second.
61
+ front: [relay/on, controlhysteresis]
@@ -7,6 +7,9 @@
7
7
  # topics: list of topics, each with leaf, optionally leaf_from if it should be copied, and optionally any fields of topics to be overridden
8
8
  # slot: if it is supposed to fit in a specific slot of frugaliot
9
9
  # insidefrugaliot: true if it should be hidden inside the Frugal_IoT drop-down on the name of a sensor, false or not set if it should be shown as a separate module
10
+ # summary: false to keep this module off a device's one-line summary. Omitted means it contributes -
11
+ # default-visible, because a new sensor that is silently invisible until someone remembers a flag
12
+ # is the worse failure. insidefrugaliot modules never contribute; they feed the status strip.
10
13
  aht20:
11
14
  name: "AHT20"
12
15
  topics:
@@ -17,44 +20,119 @@ aht21:
17
20
  topics:
18
21
  - leaf: temperature
19
22
  - leaf: humidity
23
+ # The DS18B20 probes on an FF-OpenMPPT board - see frugal-iot-irrigation. Separate modules rather
24
+ # than one, because the three measure quite different things and want different ranges; the class
25
+ # is the same Sensor_DS18B20 as the `ds18b20` module below.
26
+ airtemp:
27
+ name: Air Temperature
28
+ topics:
29
+ - leaf: airtemp
30
+ leaf_from: temperature
31
+ name: Air Temperature
32
+ min: -20
33
+ max: 60
34
+ analog:
35
+ name: "Analog Out"
36
+ topics:
37
+ - leaf: volts
20
38
  battery:
21
39
  name: "Battery"
22
40
  insidefrugaliot: true
23
41
  topics:
24
42
  - leaf: battery
43
+ # How much of its rated capacity the battery still has, inferred from an overnight discharge.
44
+ # A trend over weeks, not a reading; see control_health.h. Named batteryhealth because `health` is
45
+ # already taken by the device's own reporting.
46
+ batteryhealth:
47
+ name: Battery Health
48
+ topics:
49
+ - leaf: health
50
+ leaf_from: percent
51
+ name: Health
52
+ duplicates:
53
+ significantdate: 86400000
54
+ significantvalue: 1
55
+ - leaf: state
56
+ leaf_from: controltext
57
+ name: State
58
+ rw: r
59
+ - leaf: soc
60
+ leaf_from: controlfloat
61
+ name: Charge
62
+ min: 0
63
+ max: 100
64
+ - leaf: capacity
65
+ leaf_from: controlfloat
66
+ name: Capacity Ah
67
+ min: 0
68
+ max: 500
69
+ wireable: false
70
+ - leaf: load
71
+ leaf_from: controlfloat
72
+ name: Average load A
73
+ min: 0
74
+ max: 50
75
+ wireable: false
76
+ - leaf: active
77
+ leaf_from: controlint
78
+ name: Irrigation active
79
+ min: 0
80
+ max: 16
81
+ - leaf: panelwatts
82
+ leaf_from: controlfloat
83
+ name: Panel watts
84
+ min: 0
85
+ max: 2000
86
+ wireable: false
87
+ - leaf: storageratio
88
+ leaf_from: controlfloat
89
+ name: Storage ratio
90
+ min: 0
91
+ max: 50
92
+ rw: r
93
+ wireable: false
94
+ - leaf: advice
95
+ leaf_from: controltext
96
+ name: Advice
97
+ rw: r
98
+ batttemp:
99
+ name: Battery Temperature
100
+ topics:
101
+ - leaf: batttemp
102
+ leaf_from: temperature
103
+ name: Battery Temperature
104
+ min: -20
105
+ max: 60
25
106
  bme280:
26
107
  name: "BME280"
27
108
  topics:
28
109
  - leaf: temperature
29
110
  - leaf: humidity
30
111
  - leaf: pressure
31
- max: 1100
32
- min: 300
33
112
  bme680:
34
113
  name: "BME680"
35
114
  topics:
36
115
  - leaf: temperature
37
116
  - leaf: humidity
38
117
  - leaf: pressure
39
- max: 1100
40
- min: 300
41
118
  - leaf: gas
42
119
  bmp280:
43
120
  name: "BMP280"
44
121
  topics:
45
122
  - leaf: temperature
46
123
  - leaf: pressure
47
- max: 1100
48
- min: 300
49
124
  button:
125
+ summary: false # transient - a press is not a state worth a summary line
50
126
  name: Button
51
127
  topics:
52
128
  - leaf: button
53
129
  captive:
130
+ summary: false # a language code is not a reading
54
131
  name: Captive
55
132
  topics:
56
133
  - leaf: language_code
57
134
  carousel:
135
+ summary: false # a display selector is not a reading
58
136
  name: Display carousel
59
137
  topics:
60
138
  - leaf: select
@@ -64,37 +142,6 @@ controlblinken:
64
142
  - leaf: timeon
65
143
  - leaf: timeoff
66
144
  - leaf: out
67
- climate:
68
- name: Climate
69
- topics:
70
- - leaf: temperature_now
71
- leaf_from: controlfloat
72
- name: Temperature Now
73
- - leaf: temperature_setpoint
74
- leaf_from: controlfloat
75
- wireable: false
76
- name: Temperature Setpoint
77
- - leaf: temperature_hysteresis
78
- leaf_from: controlfloat
79
- wireable: false
80
- name: Temperature Hysteresis
81
- - leaf: humidity_now
82
- leaf_from: controlfloat
83
- name: Humidity Now
84
- - leaf: humidity_setpoint
85
- leaf_from: controlfloat
86
- name: Humidity Setpoint
87
- wireable: false
88
- - leaf: humidity_hysteresis
89
- leaf_from: controlfloat
90
- name: Humidity Hysteresis
91
- wireable: false
92
- - leaf: temperature_out
93
- leaf_from: controlouttoggle
94
- name: Temperature Out
95
- - leaf: humidity_out
96
- leaf_from: controlouttoggle
97
- name: Humidity Out
98
145
  controlhysteresis:
99
146
  name: Control
100
147
  topics:
@@ -162,11 +209,11 @@ ens160:
162
209
  leaf_from: controlfloat
163
210
  name: Temperature
164
211
  max: 50
165
- color: red
212
+ color: "#ff0000"
166
213
  - leaf: humidity
167
214
  leaf_from: controlfloat
168
215
  name: Humidity
169
- color: blue
216
+ color: "#0000ff"
170
217
  - leaf: aqi
171
218
  - leaf: tvoc
172
219
  - leaf: eco2
@@ -183,6 +230,7 @@ ensaht:
183
230
  - leaf: eco2
184
231
  - leaf: aqi500
185
232
  frugal_iot:
233
+ summary: false # this is the card identity, not a module on it
186
234
  name: XXX
187
235
  topics:
188
236
  - leaf: id
@@ -207,6 +255,16 @@ health:
207
255
  topics:
208
256
  - leaf: wifibars
209
257
  - leaf: wifissid
258
+ # The charge controller's own heatsink. Either a DS18B20 or a pair of diodes read on an ADC pin,
259
+ # depending on the board - the reading means the same either way.
260
+ heatsink:
261
+ name: Heatsink Temperature
262
+ topics:
263
+ - leaf: heatsink
264
+ leaf_from: temperature
265
+ name: Heatsink Temperature
266
+ min: 0
267
+ max: 120
210
268
  ht:
211
269
  name: HT
212
270
  topics:
@@ -220,10 +278,64 @@ ina219:
220
278
  - leaf: current
221
279
  - leaf: power
222
280
  - leaf: load
281
+ irrigation:
282
+ name: Irrigation
283
+ topics:
284
+ - leaf: hour
285
+ leaf_from: controlint
286
+ name: Start hour
287
+ min: 0
288
+ max: 23
289
+ - leaf: minute
290
+ leaf_from: controlint
291
+ name: Start minute
292
+ min: 0
293
+ max: 59
294
+ - leaf: maxminutes
295
+ leaf_from: controlfloat
296
+ name: Max minutes per sector
297
+ min: 0
298
+ max: 120
299
+ - leaf: enabled
300
+ leaf_from: controlintoggle
301
+ name: Enabled
302
+ - leaf: tank
303
+ leaf_from: controlfloat
304
+ name: Tank level
305
+ color: "#0000ff"
306
+ - leaf: tankstart
307
+ leaf_from: controlfloat
308
+ name: Tank level to start
309
+ - leaf: tankempty
310
+ leaf_from: controlfloat
311
+ name: Tank level to stop
312
+ - leaf: power
313
+ leaf_from: controlintoggle
314
+ name: Power ok
315
+ wireable: true
316
+ - leaf: solar
317
+ leaf_from: controlintoggle
318
+ name: Input power
319
+ wireable: true
320
+ - leaf: pump
321
+ leaf_from: controlouttoggle
322
+ name: Pump
323
+ - leaf: active
324
+ leaf_from: controlint
325
+ name: Active sector
326
+ min: 0
327
+ max: 16
223
328
  lcd:
329
+ summary: false # a message is not a reading
224
330
  name: LCD
225
331
  topics:
226
332
  - leaf: message
333
+ # The switched load output - OSPIT's pin 14 in its "load" role, opened by the low-voltage
334
+ # disconnect. An Actuator_Digital, so the same shape as `relay`.
335
+ load:
336
+ name: Load
337
+ topics:
338
+ - leaf: on
227
339
  ledbuiltin:
228
340
  name: LED
229
341
  slot: ledbuiltin
@@ -240,6 +352,96 @@ lux:
240
352
  name: Light meter
241
353
  topics:
242
354
  - leaf: lux
355
+ # Solar charge control - see frugal-iot-irrigation. `step` is the raw DAC value because that is
356
+ # unambiguous; `vmpp` is what the node PREDICTS that step asks the hardware for, which is a guess
357
+ # until it has been checked against a meter.
358
+ mppt:
359
+ name: Charge Control
360
+ topics:
361
+ - leaf: automatic
362
+ leaf_from: controlintoggle
363
+ name: Automatic
364
+ - leaf: state
365
+ leaf_from: controltext
366
+ name: State
367
+ rw: r
368
+ - leaf: profile
369
+ leaf_from: controlint
370
+ name: Battery type
371
+ min: 0
372
+ max: 3
373
+ wireable: false
374
+ - leaf: chargeend
375
+ leaf_from: controlfloat
376
+ name: Charge end
377
+ min: 10000
378
+ max: 16000
379
+ wireable: false
380
+ - leaf: tempcoeff
381
+ leaf_from: controlfloat
382
+ name: Temp coefficient
383
+ min: 0
384
+ max: 60
385
+ wireable: false
386
+ - leaf: hotcharge
387
+ leaf_from: controlfloat
388
+ name: Hot battery
389
+ min: 10000
390
+ max: 16000
391
+ wireable: false
392
+ - leaf: batttemp
393
+ leaf_from: controlfloat
394
+ name: Battery temp
395
+ min: -20
396
+ max: 60
397
+ - leaf: heatsink
398
+ leaf_from: controlfloat
399
+ name: Heatsink temp
400
+ min: 0
401
+ max: 120
402
+ - leaf: target
403
+ leaf_from: controlfloat
404
+ name: Target
405
+ min: 10000
406
+ max: 16000
407
+ rw: r
408
+ wireable: false
409
+ - leaf: step
410
+ leaf_from: controlint
411
+ name: DAC step
412
+ min: 0
413
+ max: 255
414
+ wireable: false
415
+ - leaf: panel
416
+ leaf_from: controlfloat
417
+ name: Panel
418
+ min: 0
419
+ max: 30000
420
+ - leaf: battery
421
+ leaf_from: controlfloat
422
+ name: Battery
423
+ min: 0
424
+ max: 16000
425
+ - leaf: voc
426
+ leaf_from: controlfloat
427
+ name: Open circuit
428
+ min: 0
429
+ max: 30000
430
+ rw: r
431
+ wireable: false
432
+ - leaf: vmpp
433
+ leaf_from: controlfloat
434
+ name: Panel target
435
+ min: 0
436
+ max: 30
437
+ rw: r
438
+ wireable: false
439
+ - leaf: dacvolts
440
+ leaf_from: controlfloat
441
+ name: DAC volts
442
+ min: 0
443
+ max: 3.3
444
+ rw: r
243
445
  ms5803:
244
446
  name: MS5803
245
447
  topics:
@@ -250,6 +452,25 @@ ota:
250
452
  insidefrugaliot: true
251
453
  topics:
252
454
  - leaf: key
455
+ panel:
456
+ name: Solar Panel
457
+ topics:
458
+ - leaf: panel
459
+ leaf_from: voltage
460
+ name: Panel Voltage
461
+ max: 30000
462
+ pcbtemp:
463
+ name: Board Temperature
464
+ topics:
465
+ - leaf: pcbtemp
466
+ leaf_from: temperature
467
+ name: Board Temperature
468
+ min: -20
469
+ max: 100
470
+ pump:
471
+ name: Pump
472
+ topics:
473
+ - leaf: on
253
474
  rain:
254
475
  name: Rain
255
476
  topics:
@@ -259,16 +480,93 @@ relay:
259
480
  name: Relay
260
481
  topics:
261
482
  - leaf: on
483
+ # One sector of an irrigation run - see modules "irrigation". A node with several sectors publishes
484
+ # sector1, sector2... and the client resolves those numbered instances back to this entry, so only
485
+ # the one definition is needed here however many sectors a node has.
486
+ sector:
487
+ name: Irrigation sector
488
+ topics:
489
+ - leaf: moisture
490
+ leaf_from: controlfloat
491
+ name: Moisture
492
+ color: "#a52a2a"
493
+ - leaf: target
494
+ leaf_from: controlfloat
495
+ name: Target
496
+ - leaf: enable
497
+ leaf_from: controlintoggle
498
+ name: Enable
499
+ - leaf: valve
500
+ leaf_from: controlouttoggle
501
+ name: Valve
262
502
  sht:
263
503
  name: SHT
264
504
  topics:
265
505
  - leaf: temperature
266
506
  - leaf: humidity
507
+ # State of charge, estimated from battery voltage - reporting only, never controlled from. See
508
+ # control_soc.h in frugal-iot-irrigation for what the estimate is and is not worth.
509
+ soc:
510
+ name: State of Charge
511
+ topics:
512
+ - leaf: soc
513
+ leaf_from: percent
514
+ name: Charge
515
+ duplicates:
516
+ significantdate: 900000
517
+ significantvalue: 1
518
+ - leaf: charging
519
+ leaf_from: controlouttoggle
520
+ name: Charging
521
+ - leaf: battery
522
+ leaf_from: controlfloat
523
+ name: Battery
524
+ min: 0
525
+ max: 16000
526
+ - leaf: panel
527
+ leaf_from: controlfloat
528
+ name: Panel
529
+ min: 0
530
+ max: 30000
531
+ - leaf: profile
532
+ leaf_from: controlint
533
+ name: Battery type
534
+ min: 0
535
+ max: 3
536
+ wireable: false
267
537
  soil:
268
538
  name: Soil
269
539
  topics:
270
540
  - leaf: soil
541
+ tank:
542
+ name: Water Tank
543
+ topics:
544
+ - leaf: tank
545
+ soilmodbus:
546
+ name: "Soil Probe"
547
+ topics:
548
+ # Reuses the shared humidity and temperature definitions - same ranges, logging and
549
+ # duplicate rules - overriding only what soil makes different from air.
550
+ - leaf: humidity
551
+ name: "Soil Moisture"
552
+ color: brown
553
+ units: "%" # Volumetric water content, not the relative humidity the shared leaf means
554
+ - leaf: temperature
555
+ name: "Soil Temperature"
556
+ color: brown
271
557
  ultrasonic:
272
558
  name: "Ultrasonic Distance"
273
559
  topics:
274
560
  - leaf: ultrasonic
561
+ # The irrigation valves - Actuator_Digital instances, so the same shape as `relay`. A node with
562
+ # several publishes valve1, valve2... which the client resolves back to this entry.
563
+ # A switched USB supply - an Actuator_Digital, so the same shape as `relay`. On the FF board this
564
+ # shares a pin with the third irrigation valve; a node has one or the other.
565
+ usb:
566
+ name: USB Supply
567
+ topics:
568
+ - leaf: on
569
+ valve:
570
+ name: Valve
571
+ topics:
572
+ - leaf: on