@flecoufle/node-red-linky 1.4.2 → 1.4.3
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/CHANGELOG.md +3 -0
- package/linky/linky.js +9 -0
- package/package.json +13 -2
package/CHANGELOG.md
CHANGED
package/linky/linky.js
CHANGED
|
@@ -115,6 +115,15 @@ module.exports = async function (RED) {
|
|
|
115
115
|
node.config = RED.nodes.getNode(config.config);
|
|
116
116
|
|
|
117
117
|
node.on('input', function (msg, send, done) {
|
|
118
|
+
// Nettoyage du cache et de l'historique si changement de jour
|
|
119
|
+
const today = getTodayKey();
|
|
120
|
+
const cacheDate = node.context().get('cacheDate');
|
|
121
|
+
if (cacheDate !== today) {
|
|
122
|
+
node.context().set('responseCache', {});
|
|
123
|
+
node.context().set('requestHistory', {});
|
|
124
|
+
node.context().set('cacheDate', today);
|
|
125
|
+
}
|
|
126
|
+
|
|
118
127
|
const _p = {
|
|
119
128
|
"type": msg.payload?.type || '',
|
|
120
129
|
"token": msg.payload?.token || node.credentials?.token || node.config?.token || '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flecoufle/node-red-linky",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Récupérer de Linky les données de consommation et production d'énergie via l'API Enedis",
|
|
5
5
|
"main": "linky/linky.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -30,8 +30,19 @@
|
|
|
30
30
|
"api",
|
|
31
31
|
"node-red",
|
|
32
32
|
"power",
|
|
33
|
+
"energy",
|
|
34
|
+
"energie",
|
|
33
35
|
"consumption",
|
|
34
|
-
"
|
|
36
|
+
"consommation",
|
|
37
|
+
"production",
|
|
38
|
+
"enedis",
|
|
39
|
+
"electricity",
|
|
40
|
+
"electricite",
|
|
41
|
+
"meter",
|
|
42
|
+
"compteur",
|
|
43
|
+
"iot",
|
|
44
|
+
"domotique",
|
|
45
|
+
"smart-meter"
|
|
35
46
|
],
|
|
36
47
|
"author": "François Lecoufle",
|
|
37
48
|
"license": "GPL-3.0-or-later",
|