-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlinky.html
137 lines (124 loc) · 5.16 KB
/
linky.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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<script type="text/javascript">
RED.nodes.registerType ('Enedis-Linky',{
category: 'devices',
color: '#96ca2d',//'#c4ff0e',
icon: 'enedis_linky_icon.png',
defaults: {
name: {value: "", required: false},
username: {value: "", required: true},
password: {value: "", required: true},
},
credentials: {
username: {type: "text"},
password: {type: "password"}
},
inputs: 1,
outputs: 1,
align: 'left',
label: function () {
return this.name || "Enedis-Linky";
return this.username || null;
return this.password || null;
}
});
</script>
<script type="text/x-red" data-template-name="Enedis-Linky">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Node name</label>
<input type="text" id="node-input-name" placeholder="Enedis-Linky" />
</div>
<div class="form-row">
<label for="node-input-username"><i class="fa fa-user-secret"></i> Username</label>
<input type="text" id="node-input-username" placeholder="Your Enedis username"/>
</div>
<div class="form-row">
<label for="node-input-password"><i class="fa fa-paw"></i> Password</label>
<input type="password" id="node-input-password" placeholder="Your Enedis password"/>
</div>
<div class="form-tips">
<p>You need to configure your <span style="font-weight:bold;font-style: italic;">Enedis </span> account here.</p>
</div>
</script>
<script type="text/x-red" data-help-name="Enedis-Linky">
<p>A simple node to connect to a <span style="font-style: italic;"><b>Enedis </b>(French electrical distribution network) </span>account to fetch your own electric consumption provided by <span style="font-weight:bold;font-style: italic;">LINKY </span>smart-meter and use it like you want.</p>
<h3>Pre-requisite:</h3>
<dl class="message-properties">
<dd> Create your account: </dd>
<ul>
<li>Go to Enedis website: </li>
<a href="https://espace-client-particuliers.enedis.fr/web/espace-particuliers/creation-de-compte"> "Création de mon compte"</a>
<li>Set your personnal data in fields :</li>
You will receive a registration link (mail or post)
<li>Follow link to set your username & password.</li>
</ul>
</dl>
<dl class="message-properties">
<dd> Enable your account: </dd>
<ul>
<li>Activate load curve recording on <span style="font-weight:bold;font-style: italic;">Enedis</span> website: </li>
<p><a href="https://espace-client-particuliers.enedis.fr/group/espace-particuliers/">https://espace-client-particuliers.enedis.fr/group/espace-particuliers/</a></p>
<li>Enable the data collection:</li>
<p>"Consommation" > "Gérer ma courbe de charge" > "Activer ma courbe de charge"</p>
</ul>
</dl>
<h3>Properties</h3>
<dl class="message-properties">
<dt>Node name <span class="property-type">string</span></dt>
<dd>Can be used to override the default name of the node.</dd>
<dt>Username <span class="property-type">string</span></dt>
<dd> Enedis Username.</dd>
<dt>Password <span class="property-type">string</span></dt>
<dd> Enedis Password (masked text).</dd>
</dl>
<h3>Input</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd> Time interval for datas in<code>JSON</code> format.<dd>
<pre><CODE>"payload" : {<br> "debut": "JJ-MM-AAAA",<br> "fin": "JJ-MM-AAAA"<br>}</CODE></pre>
</dl>
<h3>Output</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd> The consumption datas in <code>JSON</code> format.</dd>
<dd> Example for daily datas (fetched every half hours).</dd>
<dd><pre><code>payload {
{
debut : "JJ/MM/AAAA",
fin : "JJ/MM/AAAA"
},
linky {
etat {
"valeur": "temine"
},
graphe {
"decalage": 0,
"puissanceSouscrite": 12
},
periode {
"dateFin": "JJ/MM/AAAA",
"dateDebut": "JJ/MM/AAAA"
},
data [
{"valeur": 9.999,"ordre": 1},
{"valeur": 9.999,"ordre": 2},
{"valeur": "...","ordre":'n'},
{"valeur": 9.999,"ordre": 47}
]
}
}</code></pre></dd>
<dd>More examples <a href= "https://github.com/PhilBri/Node-Linky/blob/master/docs/linky_files_examples.js">here</a>.</dd>
</dl>
<h3>Details</h3>
<dl class="message-properties">
<dd>
<span style="font-weight:bold;text-decoration: underline;">Note:</span><br>
<code>Username</code> and <code>Password</code> fields have Node-RED <code>credentials</code> property for privacy:
</dd>
<ul>
<li>Stored separately to the main flow file.</li>
<li>Do not get included when flows are exported from the editor.</li>
</ul>
</dl>
<h3>References</h3>
<ul><li><a href="https://github.com/PhilBri/Node-Linky">GitHub</a> - The node github repository.</li></ul>
</script>