-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsolaredge-power.html
71 lines (68 loc) · 2.61 KB
/
solaredge-power.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
<script type="text/javascript">
RED.nodes.registerType("solaredge-power-site", {
category: "config",
defaults: {
siteid: { value: "", required: true, validate: RED.validators.number() },
apikey: { value: "", required: true },
},
label: function() {
return "SolarEdge Power site " + this.siteid;
},
});
</script>
<script type="text/x-red" data-template-name="solaredge-power-site">
<div class="form-row">
<label for="node-config-input-siteid"><i class="fa fa-hashtag"></i> Site ID</label>
<input type="text" id="node-config-input-siteid" />
</div>
<div class="form-row">
<label for="node-config-input-apikey"><i class="fa fa-key"></i> API Key</label>
<input type="text" id="node-config-input-apikey">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("solaredge-power", {
category: "input",
color: "#ffcc66",
defaults: {
site: { value:"", type: "solaredge-power-site", required: true },
interval: { value: 900, required: true, validate: RED.validators.number() },
command: { value:"", required: true },
name: {value:""}
},
inputs: 0,
outputs: 1,
icon: "feed.png",
label: function() {
return this.name||"SolarEdge Power";
}
});
</script>
<script type="text/x-red" data-template-name="solaredge-power">
<div class="form-row">
<label for="node-input-site"><i class="fa fa-globe"></i> Site</label>
<input type="text" id="node-input-site" />
</div>
<div class="form-row">
<label for="node-input-command"><i class="fa fa-terminal"></i> Command</label>
<select id="node-input-command">
<option value="details">Details</option>
<option value="overview">Overview</option>
<option value="currentPowerFlow">Current Power Flow</option>
<option value="list">Components List</option>
<option value="inventory">Inventory</option>
<option value="sensors">Sensors</option>
<option value="envBenefits">Site Environmental Benefits</option>
<option value="dataPeriod">Site Data</option>
<option value="inverterTechnicalData">Inverters Technical Data</option>
</select>
</div>
<div class="form-row">
<label for="node-input-interval"><i class="fa fa-clock-o"></i> Interval (s)</label>
<input type="text" id="node-input-interval" />
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>