frugal-iot-client 1.3.11
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.
- package/.claude/settings.local.json +28 -0
- package/CLAUDE.md +263 -0
- package/HEADLESS_PLAN.md +167 -0
- package/LICENSE +21 -0
- package/README.md +48 -0
- package/dashboard_example.html +458 -0
- package/frugaliot.css +271 -0
- package/images/Battery0.png +0 -0
- package/images/Battery1.png +0 -0
- package/images/Battery2.png +0 -0
- package/images/Battery3.png +0 -0
- package/images/Battery4.png +0 -0
- package/images/Battery5.png +0 -0
- package/images/Battery6.png +0 -0
- package/images/icon_graph.svg +1 -0
- package/index-embedded.html +56 -0
- package/index-project.html +26 -0
- package/index.html +36 -0
- package/login.html +27 -0
- package/package.json +34 -0
- package/webcomponents.js +5003 -0
package/frugaliot.css
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/* NOTES
|
|
2
|
+
* Styling in webcomponents is tricky - to style something in the shadow-root i.e. built by "render"
|
|
3
|
+
* style the outside as e.g. class: "outer mqtt-xxx" and stylesheet has .mqtt-xxx .outer
|
|
4
|
+
* style children intended to be shown via a slot as e.g class: foo and stylesheet has mqtt-xxx .foo
|
|
5
|
+
* the slotted children don't see the html they are inside, and the shadow root doesnt know its inside a <mqtt-xxx>
|
|
6
|
+
*/
|
|
7
|
+
/* Do the generic styles for the CLOSED version, then override for the open */
|
|
8
|
+
/* :host-context(details:not(open)) label { color: red; } /* or can use this */
|
|
9
|
+
/* summary slot {display: inline-block;} */ /* WORKS but for all cos inside shadow root */
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/* Fix: xxx-large was too aggressive for actual phone widths */
|
|
13
|
+
@media screen and (max-width: 480px) {
|
|
14
|
+
.dropdown {
|
|
15
|
+
font-size: large;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
div.frugal_iot_name {
|
|
19
|
+
display: inline-block !important;
|
|
20
|
+
label { display: none !important;} /* Dont display label for noide id */
|
|
21
|
+
}
|
|
22
|
+
:host-context(details[open]) {
|
|
23
|
+
/* This is working on the shadow_route of the mqtt_text inside the group's details/summary */
|
|
24
|
+
div { display: block; } /*WORKS and overrides div.mqtt-text when open */
|
|
25
|
+
label { display: inline-block; } /*WORKS and overrides div.mqtt-text when open */
|
|
26
|
+
/* summary label { color: red; } /* FAILS */
|
|
27
|
+
/* :host-context(.name) label { color: blue; } /* Not clear if works or fails */
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
div.mqtt-text {
|
|
32
|
+
display: inline-block; /* display all on same line when closed */
|
|
33
|
+
/* Dont hide labels as mucks up dashboard_example.html */
|
|
34
|
+
/*label { display: none; }*/ /* Hide labels inside the frugal_iot group */
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*details[open] summary slot {display: block; color: red} */
|
|
38
|
+
/*details:not(open) summary slot {display: inline-block;} */
|
|
39
|
+
/*details:not(open) summary slot mqtt-text { color: purple} */
|
|
40
|
+
/* .mqtt-text label {color: purple} /* Works as entirely within shadow_root */
|
|
41
|
+
/*:host-context(.frugal_iot) label {color: green} /* Works as mqtt-text is within .frugal-iot*/
|
|
42
|
+
/* :host-context:not(open) label {color: green} /* fails - none of the parents are open or closed */
|
|
43
|
+
/*mqtt-groupfrugaliot mqtt-text { display: inline-block; } */
|
|
44
|
+
|
|
45
|
+
/*.name mqtt-text { display: inline; }*/
|
|
46
|
+
/* Multiple places */
|
|
47
|
+
.outer {background-color: white;margin:5px; padding:5px;}
|
|
48
|
+
.icon { /* mqtt-toggle , mqtt-bar (graph) */
|
|
49
|
+
height:1em;width:1em;float:right;
|
|
50
|
+
@media (max-width:1001px){
|
|
51
|
+
height:1.5em;width:1.5em;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.language-picker, language-picker, .language-picker select {
|
|
55
|
+
float: right;
|
|
56
|
+
text-align: right;
|
|
57
|
+
border: 0px;
|
|
58
|
+
@media screen and (max-width: 1001px ) {
|
|
59
|
+
font-size: x-large;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/* In MqttClient */
|
|
63
|
+
details.mqtt-client {
|
|
64
|
+
margin-left: 1em; margin-right: 1em; float: right;
|
|
65
|
+
@media screen and (max-width: 1001px ) {
|
|
66
|
+
font-size: xx-large;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/* In MqttProject */
|
|
70
|
+
.mqtt-project {
|
|
71
|
+
{ margin: 0.2em; }
|
|
72
|
+
.projectname {margin-right: 2em; }
|
|
73
|
+
}
|
|
74
|
+
/* In MqttNode */
|
|
75
|
+
.mqtt-node {
|
|
76
|
+
{ border: 1px,black,solid; margin: 0.2em; }
|
|
77
|
+
/*.name,.description,.nodeid,.projectname { margin-left: 1em; margin-right: 1em; }*/
|
|
78
|
+
/*.lastseen {margin-left: 1em; margin-right: 1em; float: right;} */
|
|
79
|
+
/*.batteryimg {height:17px;width:34px;float:right;}*/
|
|
80
|
+
@media (max-width: 1001px ) {
|
|
81
|
+
.name {
|
|
82
|
+
font-size: xxx-large;
|
|
83
|
+
}
|
|
84
|
+
.description, .nodeid, .projectname, .lastseen {
|
|
85
|
+
font-size: xx-large;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/* In the children of an mqtt-node */
|
|
90
|
+
mqtt-node {
|
|
91
|
+
details.group { border: 1px,black,solid; margin:1px }
|
|
92
|
+
@media (max-width:1001px){
|
|
93
|
+
details {font-size: x-large;}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mqtt-group {
|
|
98
|
+
border: 1px, black, solid;
|
|
99
|
+
margin: 1px;
|
|
100
|
+
@media (max-width: 1001px) {
|
|
101
|
+
font-size: x-large;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
div.offline {background-color: #888888;} /* Not INSIDE mqtt-node, it is the mqtt-node */
|
|
106
|
+
/* In MqttBar */
|
|
107
|
+
.mqtt-bar {
|
|
108
|
+
.bar {border: 1px,black,solid; background-color: white;margin: 0px;}
|
|
109
|
+
.left {display:inline-block; text-align: right;}
|
|
110
|
+
.right {background-color:white; display:inline-block;}
|
|
111
|
+
.val {margin:5px;}
|
|
112
|
+
@media (max-width:1001px){
|
|
113
|
+
.left, .right {height: 2em;}
|
|
114
|
+
.val {font-size: xx-large;}
|
|
115
|
+
label {font-size: x-large;}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* In MqttChoosetopic */
|
|
120
|
+
.mqtt-choosetopic {
|
|
121
|
+
.outer { border: 0px,black,solid; margin: 0.2em; }
|
|
122
|
+
@media (max-width:1001px){
|
|
123
|
+
.dropdown {font-size: x-large;}
|
|
124
|
+
select { font-size: x-large;}
|
|
125
|
+
label {font-size: x-large;}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.mqtt-gauge {
|
|
130
|
+
dial-gauge {--dg-title-font-size: 1em;--dg-numeric-font-size: 1.5em;}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.mqtt-graph {
|
|
134
|
+
.leftright{display:flex; align-items:center;}
|
|
135
|
+
@media (max-width:1001px) {
|
|
136
|
+
.graphnavleft, .graphnavright {font-size: xxx-large;}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* In MqttSlider */
|
|
141
|
+
.mqtt-slider .pointbar {margin:0px; padding 0px;}
|
|
142
|
+
.mqtt-slider .val {margin:5px;}
|
|
143
|
+
.mqtt-slider .setpoint {position: relative;top: -5px;cursor: pointer;width: max-content;height: max-content;}
|
|
144
|
+
|
|
145
|
+
.mqtt-text {
|
|
146
|
+
/* --mqtt-val-width can be set on a mqtt-text host (or any ancestor) to constrain input width.
|
|
147
|
+
CSS custom properties inherit through shadow DOM boundaries, so setting it outside the
|
|
148
|
+
shadow root (e.g. in a dashboard layout rule) overrides the default here. */
|
|
149
|
+
.val {margin:5px; width: var(--mqtt-text-val-width, auto);}
|
|
150
|
+
.wired {margin:5px;}
|
|
151
|
+
@media (max-width:1001px){
|
|
152
|
+
.val {font-size: xx-large;}
|
|
153
|
+
label {font-size: x-large;}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
.mqtt-toggle {
|
|
157
|
+
.val {margin:5px;}
|
|
158
|
+
.wired {margin:5px;}
|
|
159
|
+
@media (max-width:1001px){
|
|
160
|
+
.val {font-size: xx-large;}
|
|
161
|
+
label {font-size: x-large;}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/* In MqttGraph */
|
|
165
|
+
/* In MqttWrapper */
|
|
166
|
+
/*Not useful: .mqtt-wrapper {border: 1px,black,solid; margin: 0.2em; } */
|
|
167
|
+
mqtt-wrapper, .mqtt-admin {
|
|
168
|
+
.dropdown {
|
|
169
|
+
display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
|
|
170
|
+
}
|
|
171
|
+
.dropdown label { flex-shrink: 0; white-space: nowrap; }
|
|
172
|
+
.dropdown select {
|
|
173
|
+
flex: 1; padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px;
|
|
174
|
+
font-size: 0.92em; margin-left: 0;
|
|
175
|
+
/* Fix: select couldn't shrink below its (huge) text content, causing overflow */
|
|
176
|
+
min-width: 0;
|
|
177
|
+
}
|
|
178
|
+
select { margin-left: 2em; }
|
|
179
|
+
@media screen and (max-width: 1001px ) {
|
|
180
|
+
.dropdown { font-size: xxx-large; }
|
|
181
|
+
.dropdown select { font-size: inherit; }
|
|
182
|
+
.dropdownsadmin {
|
|
183
|
+
display: flex;
|
|
184
|
+
justify-content: left;
|
|
185
|
+
gap: 10px;
|
|
186
|
+
}
|
|
187
|
+
.dropdownsadmin > select {
|
|
188
|
+
flex: 0 0 auto;
|
|
189
|
+
margin-left: 0;
|
|
190
|
+
}
|
|
191
|
+
select { font-size: xx-large; }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
/* Related to authentication */
|
|
197
|
+
.mqtt-login, .mqtt-admin, .tabbed-display, tabbed-display {
|
|
198
|
+
.pseudolink {
|
|
199
|
+
color: blue;
|
|
200
|
+
text-decoration: underline;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
}
|
|
203
|
+
.tabs {
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-direction: row;
|
|
206
|
+
align-items: center;
|
|
207
|
+
margin-bottom: 0em;
|
|
208
|
+
padding-bottom: 0em;
|
|
209
|
+
}
|
|
210
|
+
.tab {
|
|
211
|
+
border: 2px, black, solid;
|
|
212
|
+
width: 50%;
|
|
213
|
+
font-size: x-large;
|
|
214
|
+
margin-bottom: 0.2em;
|
|
215
|
+
margin-bottom: 0em;
|
|
216
|
+
padding: 0.6em;
|
|
217
|
+
border-top-left-radius: 20px;
|
|
218
|
+
border-top-right-radius: 20px;
|
|
219
|
+
}
|
|
220
|
+
.tab.active {
|
|
221
|
+
background-color: #ffffff;
|
|
222
|
+
font-weight: bolder;
|
|
223
|
+
border-bottom: 0px;
|
|
224
|
+
}
|
|
225
|
+
.tab.inactive {
|
|
226
|
+
background-color: #888888;
|
|
227
|
+
font-weight: lighter;
|
|
228
|
+
}
|
|
229
|
+
.message {margin: 0.5em; font-weight: bold; font-size: x-large; }
|
|
230
|
+
.tabbed-section.inactive { display: none; }
|
|
231
|
+
tabbed-display.solo .tabbed-section.active {
|
|
232
|
+
padding: 0;
|
|
233
|
+
border: none;
|
|
234
|
+
border-radius: 0;
|
|
235
|
+
}
|
|
236
|
+
.tabbed-section.active {
|
|
237
|
+
padding: 10px;
|
|
238
|
+
border: black solid 2px;
|
|
239
|
+
/*border-top: 2px; */
|
|
240
|
+
border-bottom-left-radius: 20px;
|
|
241
|
+
border-bottom-right-radius: 20px;
|
|
242
|
+
h3 {
|
|
243
|
+
font-size: 2.3em;
|
|
244
|
+
font-weight: bold;
|
|
245
|
+
margin: 0.6em 0 0.4em 0;
|
|
246
|
+
border-bottom: 3px solid #444;
|
|
247
|
+
padding-bottom: 0.15em;
|
|
248
|
+
}
|
|
249
|
+
label {
|
|
250
|
+
font-size: xx-large;
|
|
251
|
+
display: block;
|
|
252
|
+
}
|
|
253
|
+
section {
|
|
254
|
+
margin: 0.5em;
|
|
255
|
+
input {
|
|
256
|
+
font-size: xx-large;
|
|
257
|
+
margin: 0.5em;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
button { font-size: x-large; padding: 10px; border-radius: 10px; }
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/* Claude suggested this not to impact the Login page - not sure if it does */
|
|
265
|
+
/* Fix: was width:50% shared with the 2-tab login view, breaking the 5-tab dashboard bar */
|
|
266
|
+
|
|
267
|
+
.tabbed-display .tab, tabbed-display .tab {
|
|
268
|
+
width: auto;
|
|
269
|
+
flex: 1 1 auto;
|
|
270
|
+
}
|
|
271
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" ?><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g id="analysis"><path d="M22.29,6.29,15,13.59,9.71,8.29a1,1,0,0,0-1.42,0l-8,8a1,1,0,0,0,1.42,1.42L9,10.41l5.29,5.3a1,1,0,0,0,1.42,0l8-8A1,1,0,0,0,22.29,6.29Z"/></g></svg>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Frugal IoT Demo</title>
|
|
6
|
+
<link href="./frugaliot.css" rel="stylesheet" type="text/css">
|
|
7
|
+
<!-- this maps files that webcomponents uses, -->
|
|
8
|
+
<script type="importmap">
|
|
9
|
+
{
|
|
10
|
+
"imports": {
|
|
11
|
+
"@kurkle/color": "https://frugaliot.naturalinnovation.org/node_modules/@kurkle/color/dist/color.esm.js",
|
|
12
|
+
"chart.js": "https://frugaliot.naturalinnovation.org/node_modules/chart.js/dist/Chart.js",
|
|
13
|
+
"dial-gauge": "/node_modules/dial-gauge/dial-gauge.js",
|
|
14
|
+
"luxon": "https://frugaliot.naturalinnovation.org/node_modules/luxon/src/luxon.js",
|
|
15
|
+
"chartjs-adapter-luxon": "https://frugaliot.naturalinnovation.org/node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js",
|
|
16
|
+
"csv-parse": "https://frugaliot.naturalinnovation.org/node_modules/csv-parse/dist/esm/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
<!-- load webcomponents.js either from local server, or from frugaliot.naturalinnovation.org -->
|
|
21
|
+
<script src="./webcomponents.js" type="module"></script>
|
|
22
|
+
<!--<script src="./webcomponents.js" type="module"></script>-->
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<h1>This is an example of embedding a widget in a page</h1>
|
|
26
|
+
<div style="display:none">
|
|
27
|
+
<!-- every embedded page needs a mqtt-client, it sets up the MQTT connection to the broker.
|
|
28
|
+
username is the organization whose topics this page displays, password its mqtt_password
|
|
29
|
+
from that organization's config file on the server - it will not connect without them. -->
|
|
30
|
+
<mqtt-client server="wss://frugaliot.naturalinnovation.org/wss" username="dev" password="public"></mqtt-client>
|
|
31
|
+
</div>
|
|
32
|
+
<div style="float:right;border:2px,solid,blue;width:50%">
|
|
33
|
+
<!-- this is a simple display widget - in this case a meter bar -->
|
|
34
|
+
<mqtt-bar max="45" min="0" topic="dev/lotus/esp8266-fb94bb/sht/temperature" label="Temperature" type="float" color="red"></mqtt-bar>
|
|
35
|
+
<!--<mqtt-bar max="45" min="0" topic="dev/lotus/esp32-70c376/soil" label="Soil" type="float" color="brown"></mqtt-bar>-->
|
|
36
|
+
</div>
|
|
37
|
+
<div style="float:left;border:2px,solid,blue;width:10%">
|
|
38
|
+
<!-- this is a simple control widget - in this case toggles an LED on a device at my office -->
|
|
39
|
+
<mqtt-toggle topic="dev/lotus/esp8266-fb94bb/ledbuiltin/on" label="LED" type="bool" color="blue"></mqtt-toggle>
|
|
40
|
+
</div>
|
|
41
|
+
<p>
|
|
42
|
+
This is a demo of a custom web page with a bar widget; a graph; and a control.
|
|
43
|
+
These all go to the same device which may or may not always be turned on!
|
|
44
|
+
</p>
|
|
45
|
+
<p>
|
|
46
|
+
<!-- And a pretty simple graph - in this case its displaying the same value from above, but it can
|
|
47
|
+
<!-- display any topic -->
|
|
48
|
+
<!-- Note - I think there is an issue with back button if loaded from a different server, will fix -->
|
|
49
|
+
<mqtt-graph>
|
|
50
|
+
<mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/sht/temperature" color="red" label="Office Temperature" min=0 max=50 type="float"></mqtt-graphdataset>
|
|
51
|
+
<mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/sht/humidity" color="blue" label="Office Humidity" min=0 max=100 type="float"></mqtt-graphdataset>
|
|
52
|
+
<mqtt-graphdataset topic="dev/lotus/esp8266-fb94bb/ledbuiltin/on" color="orange" label="LED" type="bool"></mqtt-graphdataset>
|
|
53
|
+
</mqtt-graph>
|
|
54
|
+
</p>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Frugal IoT Demo</title>
|
|
6
|
+
<link href="./frugaliot.css" rel="stylesheet" type="text/css">
|
|
7
|
+
<script type="importmap">
|
|
8
|
+
{
|
|
9
|
+
"imports": {
|
|
10
|
+
"@kurkle/color": "/node_modules/@kurkle/color/dist/color.esm.js",
|
|
11
|
+
"chart.js": "/node_modules/chart.js/dist/Chart.js",
|
|
12
|
+
"dial-gauge": "/node_modules/dial-gauge/dial-gauge.js",
|
|
13
|
+
"luxon": "/node_modules/luxon/src/luxon.js",
|
|
14
|
+
"chartjs-adapter-luxon": "/node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js",
|
|
15
|
+
"csv-parse": "/node_modules/csv-parse/dist/esm/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
<script src="./webcomponents.js" type="module"></script>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<!-- TODO maybe add mqtt-organization discover to discover projects - but maybe better to go to server for it -->
|
|
23
|
+
<!-- <mqtt-project topic="dev/lotus/" name="Lotus Ponds" discover></mqtt-project> -->
|
|
24
|
+
<mqtt-wrapper organization="dev" project="lotus"></mqtt-wrapper>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
package/index.html
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<meta name="theme-color" content="#007bff">
|
|
7
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
8
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
9
|
+
<meta name="apple-mobile-web-app-title" content="Frugal IoT">
|
|
10
|
+
<!--suppress HtmlUnknownTarget -->
|
|
11
|
+
<link rel="apple-touch-icon" href="/images/icon-192x192.png">
|
|
12
|
+
<!--suppress HtmlUnknownTarget -->
|
|
13
|
+
<link rel="manifest" href="/manifest.json">
|
|
14
|
+
<title>Frugal IoT Dashboard</title>
|
|
15
|
+
<link href="./frugaliot.css" rel="stylesheet" type="text/css">
|
|
16
|
+
<script type="importmap">
|
|
17
|
+
{
|
|
18
|
+
"imports": {
|
|
19
|
+
"@kurkle/color": "/node_modules/@kurkle/color/dist/color.esm.js",
|
|
20
|
+
"chart.js": "/node_modules/chart.js/dist/Chart.js",
|
|
21
|
+
"dial-gauge": "/node_modules/dial-gauge/dial-gauge.js",
|
|
22
|
+
"luxon": "/node_modules/luxon/src/luxon.js",
|
|
23
|
+
"chartjs-adapter-luxon": "/node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js",
|
|
24
|
+
"csv-parse": "/node_modules/csv-parse/dist/esm/index.js"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
<script src="./webcomponents.js" type="module"></script>
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<!-- TODO maybe add mqtt-organization discover to discover projects - but maybe better to go to server for it -->
|
|
32
|
+
<!-- <mqtt-project topic="dev/lotus/" name="Lotus Ponds" discover></mqtt-project> -->
|
|
33
|
+
<mqtt-admin></mqtt-admin>
|
|
34
|
+
<!-- <mqtt-wrapper></mqtt-wrapper> -->
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
package/login.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Frugal IoT Dashboard</title>
|
|
6
|
+
<link href="./frugaliot.css" rel="stylesheet" type="text/css">
|
|
7
|
+
<script type="importmap">
|
|
8
|
+
{
|
|
9
|
+
"imports": {
|
|
10
|
+
"@kurkle/color": "/node_modules/@kurkle/color/dist/color.esm.js",
|
|
11
|
+
"chart.js": "/node_modules/chart.js/dist/Chart.js",
|
|
12
|
+
"dial-gauge": "/node_modules/dial-gauge/dial-gauge.js",
|
|
13
|
+
"luxon": "/node_modules/luxon/src/luxon.js",
|
|
14
|
+
"chartjs-adapter-luxon": "/node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js",
|
|
15
|
+
"csv-parse": "/node_modules/csv-parse/dist/esm/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
<script src="./webcomponents.js" type="module"></script>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<!-- TODO maybe add mqtt-organization discover to discover projects - but maybe better to go to server for it -->
|
|
23
|
+
<!-- <mqtt-project topic="dev/lotus/" name="Lotus Ponds" discover></mqtt-project> -->
|
|
24
|
+
<mqtt-login></mqtt-login>
|
|
25
|
+
<!-- <mqtt-wrapper></mqtt-wrapper> -->
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"name": "Mitra Ardron",
|
|
4
|
+
"email": "mitra@mitra.biz",
|
|
5
|
+
"url": "https://www.mitra.biz"
|
|
6
|
+
},
|
|
7
|
+
"browserslist": "> 20%, not dead",
|
|
8
|
+
"bugs": "https://github.com/mitra42/frugal-iot-logger/issues",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"async": "^3.2.6",
|
|
11
|
+
"chart.js": "^4.5.1",
|
|
12
|
+
"csv-parse": "^5.6.0",
|
|
13
|
+
"dial-gauge": "^0.1.5",
|
|
14
|
+
"html-element-extended": "^0.1.6",
|
|
15
|
+
"js-yaml": "^4.2.0",
|
|
16
|
+
"luxon": "^3.7.2",
|
|
17
|
+
"mqtt": "^5.15.1"
|
|
18
|
+
},
|
|
19
|
+
"description": "Frugal IoT client",
|
|
20
|
+
"homepage": "https://github.com/mitra42/frugal-iot-client",
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mqtt",
|
|
23
|
+
"frugal-iot"
|
|
24
|
+
],
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"main": "webcomponents.js",
|
|
27
|
+
"name": "frugal-iot-client",
|
|
28
|
+
"repository": "https://github.com/mitra42/frugal-iot-client",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
|
+
},
|
|
32
|
+
"type": "module",
|
|
33
|
+
"version": "1.3.11"
|
|
34
|
+
}
|