-
Notifications
You must be signed in to change notification settings - Fork 2
/
sensors.inc.EXAMPLE
115 lines (103 loc) · 4.11 KB
/
sensors.inc.EXAMPLE
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
## sensors module for weewx skins
## Copyright Tom Keffer, Matthew Wall
## See LICENSE.txt for your rights
## Modified to work with the DavisHealthAPI extension to display device info
#errorCatcher Echo
#encoding UTF-8
## this is a conditional display of sensor data, including connectivity,
## battery status, and various voltages. if there are no data available,
## then this degenerates to nothing displayed.
#def get_battery_status($x)
#if $x == 0
<span class="status_ok">OK</span>
#else
<span class="status_low">LOW</span>
#end if
#end def
<div id='sensors_widget' class="widget">
<div class="widget_title">
<a href="telemetry.html">Sensor Status</a>
<a class="widget_control"
onclick="toggle_widget('sensors')">♦</a>
</div>
<div class="widget_contents">
<table>
<tr><th>Connectivity</th><th></th></tr>
<tr>
<td class="label">$obs.label.rxCheckPercent</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').signalQuality</td>
</tr>
<tr>
<td class="label">$obs.label.rssi</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').rssi</td>
</tr>
<tr><th>Power Status</th><th></th></tr>
<tr>
<td class="label">$obs.label.supercapVolt</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').supercapVolt</td>
</tr>
<tr>
<td class="label">$obs.label.solarVolt</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').solarVolt</td>
</tr>
<tr>
<td class="label">$obs.label.txBattery</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').txBattery</td>
</tr>
<tr>
<td class="label">$obs.label.txBatteryFlag</td>
<td class="data">$get_battery_status($current($max_delta=3600,$data_binding='davishealthapi_binding').txBatteryFlag.raw)</td>
</tr>
<tr>
<td class="label">$obs.label.consoleBattery</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').consoleBattery</td>
</tr>
<tr><th>Data Transmission</th><th></th></tr>
<tr>
<td class="label">$obs.label.packetStreak</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').packetStreak</td>
</tr>
<tr>
<td class="label">$obs.label.errorPackets</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').errorPackets</td>
</tr>
<tr>
<td class="label">$obs.label.resynchs</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').resynchs</td>
</tr>
<tr>
<td class="label">$obs.label.rxBytes</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').rxBytes</td>
</tr>
<tr>
<td class="label">$obs.label.txBytes</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').txBytes</td>
</tr>
<tr><th>Data Information</th><th></th></tr>
<tr>
<td class="label">$obs.label.uptime</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').uptime</td>
</tr>
<tr>
<td class="label">$obs.label.linkUptime</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').linkUptime</td>
</tr>
<tr>
<td class="label">$obs.label.firmwareVersion</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').firmwareVersion</td>
</tr>
<tr>
<td class="label">$obs.label.bootloaderVersion</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').bootloaderVersion</td>
</tr>
<tr>
<td class="label">$obs.label.healthVersion</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').healthVersion</td>
</tr>
<tr>
<td class="label">$obs.label.radioVersion</td>
<td class="data">$current($max_delta=3600,$data_binding='davishealthapi_binding').radioVersion</td>
</tr>
</table>
</div>
</div>