From c23baf438c9816266001962d37a343bd45b89101 Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 10:33:16 +0100 Subject: [PATCH 1/7] Translate error messages to french --- eesmart-d2l.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/eesmart-d2l.js b/eesmart-d2l.js index 2801663..3708815 100644 --- a/eesmart-d2l.js +++ b/eesmart-d2l.js @@ -215,7 +215,7 @@ module.exports = function (RED) { return { success: false, error_code: "0xB003", - error_message: "Can't read payload, the payload size is 0." + error_message: "Impossible de lire la charge utile, sa taille est de 0." }; } @@ -229,7 +229,7 @@ module.exports = function (RED) { } catch (error) { data.success = false data.error_code = "0xB001" - data.error_message = "Can't read payload" + data.error_message = "Impossible de lire la charge utile." } try { data.payload = JSON.parse(data.payload) @@ -238,7 +238,7 @@ module.exports = function (RED) { } catch (error) { data.success = false data.error_code = "0xB002" - data.error_message = "Can't decode JSON payload" + data.error_message = "Impossible de décoder le format JSON" } return data; @@ -368,7 +368,7 @@ module.exports = function (RED) { //TODO Support standard mode return { error_code: "0xC001", - error_message: "Default mode is not supported for Linky's STANDARD, please use Raw data array." + error_message: "Le mode par défaut n'est pas supporté pour la TIC STANDARD, veuillez utiliser le mode 'Raw data array'." } } @@ -392,7 +392,7 @@ module.exports = function (RED) { { topic: "error_message", error_code: "0xA001", - payload: "Can't handle the messages with topic '" + msg.topic + "'.", + payload: "Impossible de traiter les messages avec le topic '" + msg.topic + "'.", error_debug_data: "" }, undefined @@ -406,7 +406,7 @@ module.exports = function (RED) { } else if (typeof msg.payload === "object" && Buffer.isBuffer(msg.payload)) { dataBuffer = msg.payload } else { - node.sendErrorMessage("0xA005", "Can't parse input data, it's should be Buffer or Base64 String.") + node.sendErrorMessage("0xA005", "Impossible de lire la charge utile, il doit être au format 'Buffer' ou 'Base64 String'.") return; } @@ -414,7 +414,7 @@ module.exports = function (RED) { // Check D2L id if (headers.idD2L !== credentials.id_d2l) { - node.sendErrorMessage("0xA002", "D2L id mismatch, got '" + headers.idD2L + "' and expect '" + credentials.id_d2l + "'.") + node.sendErrorMessage("0xA002", "L'ID du D2L ne correspond pas, reçu '" + headers.idD2L + "' and attendu '" + credentials.id_d2l + "'.") return; } @@ -426,19 +426,21 @@ module.exports = function (RED) { // Check if frame is complete if (headers.frameSize !== dataBuffer.length) { - node.sendErrorMessage("0xA006", "Can't read data, part of the data is missing. Try adding a join node between this node and the TCP in node to create a Buffer joining using an empty buffer with a timeout of 0.5 second.") + node.sendErrorMessage("0xA006", "Impossible de lire les données, une partie des données est manquante. " + + "Essayez d'ajouter un noeud 'join' entre ce noeud et le noeud 'tcp in' pour créer un " + + "'Buffer joining using an empty buffer with a timeout of 0.5 second'.") return; } // Check if CRC is OK if (!checkCRC(dataBuffer)) { - node.sendErrorMessage("0xA003", "Can't read data, the checksum is invalid. Please check the Key and IV values") + node.sendErrorMessage("0xA003", "Impossible de lire les données, la somme de contrôle est invalide. Veuillez vérifier les clés.") return; } // Check if it's a request if (headers.isRequest === false) { - node.sendErrorMessage("0xFFFF", "Can't handle response messages. Please report this on github if it's was sent by the D2L.") + node.sendErrorMessage("0xFFFF", "Impossible de traiter les messages de type réponse. Merci d'ouvrir une issue sur GitHub si ce message as été envoyé par le D2L.") return; } @@ -493,7 +495,7 @@ module.exports = function (RED) { case 1: node.sendErrorMessage( '0xA007', - "The D2L requested a firmware update but eeSmart didn’t provide me the documentation to handle this. Please see https://github.com/Zehir/node-red-contrib-eesmart-d2l/issues/1", + "Le D2L fait une demande de mise à jour logicielle. eeSmart ne nous as pas donné la documentation pour traiter ces demandes. Voir https://github.com/Zehir/node-red-contrib-eesmart-d2l/issues/1", { payload_size: headers.payloadSize, payload_data: getRequestPayloadRaw(headers, dataBuffer), @@ -505,7 +507,7 @@ module.exports = function (RED) { default: node.sendErrorMessage( '0xA004', - "Unknown Payload Type, got '" + headers.payloadType + "' and expect '" + TYPE_COMMANDE_V3_PUSH_JSON + "' or '" + TYPE_COMMANDE_V3_GET_HORLOGE + "'. Please open an issue on Github.", + "Type de charge utile inconnue, reçu '" + headers.payloadType + "' et attend '" + TYPE_COMMANDE_V3_PUSH_JSON + "' ou '" + TYPE_COMMANDE_V3_GET_HORLOGE + "'. Merci d'ouvrir une issue sur GitHub.", { payload_size: headers.payloadSize, payload_data: getRequestPayloadRaw(headers, dataBuffer), From 7a5ec57d0498f7a74d9b84f38714508e68f4c84f Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 10:40:47 +0100 Subject: [PATCH 2/7] Translate status messages to french --- eesmart-d2l.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eesmart-d2l.js b/eesmart-d2l.js index 3708815..04674a9 100644 --- a/eesmart-d2l.js +++ b/eesmart-d2l.js @@ -526,8 +526,8 @@ module.exports = function (RED) { fill: "green", shape: "dot", text: node.format_tcp_data === "default" && sendData[0].payload.info.frame_type === "HISTORIQUE" ? - new Date(Date.now()).toLocaleTimeString() + " : " + sendData[0].payload.consumption.total + " Wh" : - "Updated at " + new Date(Date.now()).toLocaleTimeString() + new Date(Date.now()).toLocaleTimeString("fr-FR") + " : " + sendData[0].payload.consumption.total + " Wh." : + "MàJ à " + new Date(Date.now()).toLocaleTimeString("fr-FR") }) break; @@ -535,7 +535,7 @@ module.exports = function (RED) { node.status({ fill: "blue", shape: "dot", - text: new Date(Date.now()).toLocaleTimeString() + " : Responded to a clock request" + text: new Date(Date.now()).toLocaleTimeString("fr-FR") + " : Répondu à une demande d'horloge." }) break; From e4592440a80dcf46b00f2297a1049154e3f7a4b8 Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 10:44:15 +0100 Subject: [PATCH 3/7] Typo --- eesmart-d2l.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eesmart-d2l.js b/eesmart-d2l.js index 04674a9..c49f641 100644 --- a/eesmart-d2l.js +++ b/eesmart-d2l.js @@ -238,7 +238,7 @@ module.exports = function (RED) { } catch (error) { data.success = false data.error_code = "0xB002" - data.error_message = "Impossible de décoder le format JSON" + data.error_message = "Impossible de décoder le format JSON." } return data; From 172d9be784c0236d62103613b5f51d192f18421e Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 10:53:13 +0100 Subject: [PATCH 4/7] Translate changelog to french --- CHANGELOG.md | 67 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4fe661..cff92e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,59 +1,58 @@ # Changelog -All notable changes to this project will be documented in this file. +Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +Le format est basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +et ce projet adhère au [Versionnage Sémantique](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.2.5] - 2020-11-24 ![Relative date](https://img.shields.io/date/1606242883?label=) -### Added -- Error message for firmware update request. -### Changed -- Add error code to the status message. +### Ajout +- Message d'erreur pour la demande de mise à jour du micrologiciel. +### Changement +- Ajout du code d'erreur au message d'état. ## [0.2.4] - 2020-11-19 ![Relative date](https://img.shields.io/date/1605802829?label=) -### Fixed -- Format data error with GET_HORLOGE requests #5. +### Correction +- Message d'erreur pour les requetes de type GET_HORLOGE [#5](https://github.com/Zehir/node-red-contrib-eesmart-d2l/issues/5). ## [0.2.3] - 2020-11-16 ![Relative date](https://img.shields.io/date/1605556772?label=) -### Fixed -- Default format error message. +### Correction +- Message d'erreur de format par défaut.. ## [0.2.2] - 2020-11-16 ![Relative date](https://img.shields.io/date/1605546807?label=) -### Added -- Error message if a part of the TCP frame is missing. +### Ajout +- Message d'erreur si une partie de la trame TCP est manquante. ## [0.2.1] - 2020-11-16 ![Relative date](https://img.shields.io/date/1605543464?label=) -### Fixed -- Bad status message in Standard mode. +### Correction +- Mauvais message de status dans le mode TIC Standard. ## [0.2.0] - 2020-11-16 ![Relative date](https://img.shields.io/date/1605541033?label=) -### Added -- Allow JSONata expressions as input. -- Node status. -- Output data formatter. -### Changed -- Allow payload of type buffer and base64. +### Ajout +- Accepte les expression JSONata en options. +- Messages de status du noeud. +- Choix du format de sortie. +### Changement +- Accepte les charges utiles au format buffer et base64. ## [0.1.1] - 2020-11-06 ![Relative date](https://img.shields.io/date/1604690140?label=) -### Added -- New error code 0xA004 for unknown payload type. +### Ajout +- Ajout du code d'erreur 0xA004 pour les charges utiles au format inconnues. ## [0.1.0] - 2020-11-05 ![Relative date](https://img.shields.io/date/1604531360?label=) -### Changed -- The node is now in parser category. -- id_d2l is now a string instead of numeric. -### Fixed -- Issues with D2L unique ID starting with 0. +### Changement +- Changement de la catégorie du noeud pour 'parser'. +- id_d2l et maintenant une chaine de caractère à la place d'en nombre. +### Correction +- Problèmes quand l'ID du D2L commence par 0. ## [0.0.2] - 2020-11-04 ![Relative date](https://img.shields.io/date/1604504235?label=) -### Added -- Changelog -- Github Workflow for auto publish npm package. -- Various npm options. +### Ajout +- Ce fichier +- Github Workflow pour publier automatiquement le paquet npm. ## [0.0.1] - 2020-11-03 ![Relative date](https://img.shields.io/date/1604449693?label=) -### Added -- First working version. \ No newline at end of file +### Ajout +- Première version fonctionnelle. \ No newline at end of file From 5079322e2bba91316f9003d0745c157f2154a904 Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 13:50:36 +0100 Subject: [PATCH 5/7] Translate Readme to french --- README.md | 62 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 53496d3..d0cb70c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Node Red eeSmart D2L +# Node-Red eeSmart D2L [![GitHub](https://img.shields.io/github/license/zehir/node-red-contrib-eesmart-d2l)](https://github.com/Zehir/node-red-contrib-eesmart-d2l/blob/main/LICENSE) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Zehir/node-red-contrib-eesmart-d2l/NPM%20Publish)](https://github.com/Zehir/node-red-contrib-eesmart-d2l/actions) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/zehir/node-red-contrib-eesmart-d2l?include_prereleases&label=github&sort=semver)](https://github.com/Zehir/node-red-contrib-eesmart-d2l/releases) @@ -7,42 +7,46 @@ [![Liberapay giving](https://img.shields.io/liberapay/gives/Zehir)](https://liberapay.com/Zehir) [![Discord](https://img.shields.io/discord/779386253912047647?label=discord)](https://discord.gg/qTd363NKeu) -Server node for eeSmart D2L Linky. +>N.B: Because this tool is targeted for french people, the documentation is in french. The Linky are only installed in France. -Converts the data sent by the D2L into readable data. +Noeud pour traduire les données envoyées par le D2L d'eeSmart Linky. -## Prerequisites -- [eeSmart D2L](http://eesmart.fr/modulesd2l/erl-wifi-compteur-linky/) -- [Node Red](https://nodered.org/) server -- APP and IV Keys +Convertit les données brutes en données lisibles. -### Getting APP and IV Keys -To get your keys for local server send an email to [support@eesmart.fr](mailto:support@eesmart.fr) with the folowwing data -- Your D2L unique identifier -- Your proof of purchase (optional ?) +## Prérequis +- Un compteur [Linky](https://www.enedis.fr/linky-compteur-communicant). +- Un boitier [eeSmart D2L](http://eesmart.fr/modulesd2l/erl-wifi-compteur-linky/). +- Un serveur [Node-Red](https://nodered.org/). +- Les clés de communication applicative et IV de votre D2L. -[Mail Template](mailto:support@eesmart.fr?subject=Requesting%20Keys%20for%20local%20server&body=Hello%2C%0D%0A%0D%0AI%20would%20like%20to%20get%20my%20keys%20to%20setup%20a%20local%20server%20for%20my%20D2L.%0D%0AHis%20unique%20ID%20is%3A%20XXXXXXXXXXXX%0D%0AI%20buy%20it%20from%20XXXXXXXXXXX%2C%20you%20will%20find%20my%20bill%20attached.%0D%0A%0D%0ACordially%2C%20XXXXX) +### Récupération des clés +Pour récupérer vos clés pour le serveur local il faut envoyer un mail à [support@eesmart.fr](mailto:support@eesmart.fr) avec ces informations : +- L'identifiant unique de votre D2L (Un nombre écrit en dessous du QR Code) +- Votre preuve d'achat (optionnel ?) + +[Mail Template](mailto:support@eesmart.fr?subject=Demande%20des%20cl%C3%A9s%20pour%20la%20configuration%20d'un%20serveur%20local&body=Bonjour%2CJ'aimerais%20recevoir%20mes%20cl%C3%A9s%20pour%20configurer%20un%20serveur%20local%20pour%20mon%20D2L.Sont%20identifiant%20unique%20est%20%3A%20XXXXXXXXXXXXJe%20l'ai%20achet%C3%A9%20sur%20XXXXXXXXXXX%2C%20vous%20trouverez%20ci-joint%20la%20facture.Cordialement%2C%20XXXXX) ## Installation -You can install this [node](https://flows.nodered.org/node/node-red-contrib-eesmart-d2l) from `Manage Palette` option of node red and search for `node-red-contrib-eesmart-d2l`. +Vous pouvez installer ce [noeud](https://flows.nodered.org/node/node-red-contrib-eesmart-d2l) depuis l'option `Manage Palette` de Node-Red et rechercher `node-red-contrib-eesmart-d2l`. -Or by using NPM : +Ou en utilisant NPM : ```bash npm install node-red-contrib-eesmart-d2l ``` -## Quickstart -- Create a TCP in node of type "Listen on" port 7845. -- Set the Output to a stream of Buffer. -- Set the Topic to d2l_update. -- Connect this node to the TCP in input. -- Create a TCP out node of type Reply to TCP. -- Connect this node to the TCP out output. -- Connect a debug node to the Data and Error outputs. -- Use the smartphone application to setup your D2L. Use the local server with the Node Red IP and the port 7845 or any used in step 1. -- Read the documentation in Node Red. - -## References -- [Enedis documentation](https://www.enedis.fr/sites/default/files/Enedis-NOI-CPT_54E.pdf) - full description of data returned by the node. -- [D2L User manual](http://eesmart.fr/wp-content/uploads/eeSmart-D2L-Notice-dinstallation.pdf) - how to configure your D2L. -- [Discord](https://discord.gg/qTd363NKeu) - you can join us on Discord. \ No newline at end of file +## Démarrage rapide +- Créer un noeud "TCP in" de type "Listen on" port 7845. +- Définir la sortie sur "Stream of Buffer". +- Définit le topic à "d2l_update". +- Ajouter un noeud "eeSmart D2L". +- Connecter la sortie du noeud "TCP in" à l'entrée du noeud "eeSmart D2L". +- Créer un noeud "TCP out" de type "Reply to TCP". +- Connecter la sortie TCP du noeud "eeSmart D2L" au noeud "TCP out". +- Connecter un noeud de debug aux sorties Données et Erreurs du noeud "eeSmart D2L". +- Utiliser l'application pour smartphone pour configurer votre D2L. Utiliser le serveur local avec l'adresse IP de votre serveur Node-Red et le port définit dans la première étape. +- Lire la documentation du plugin incluse dans Node-Red. + +## Références +- [Documentation Enedis](https://www.enedis.fr/sites/default/files/Enedis-NOI-CPT_54E.pdf) - description complète des données envoyés par le Linky via le D2L. +- [Notice d'installation D2L](http://eesmart.fr/wp-content/uploads/eeSmart-D2L-Notice-dinstallation.pdf) - comment configurer votre D2L. +- [Discord](https://discord.gg/qTd363NKeu) - vous pouvez nous rejoindre sur discord. \ No newline at end of file From dd02a194f7ee2a7d8907cb3adf15130728ed583e Mon Sep 17 00:00:00 2001 From: Zehir Date: Wed, 25 Nov 2020 13:51:06 +0100 Subject: [PATCH 6/7] Translate node to french --- eesmart-d2l.html | 126 ++++++++++++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 56 deletions(-) diff --git a/eesmart-d2l.html b/eesmart-d2l.html index 5730b9f..541944e 100644 --- a/eesmart-d2l.html +++ b/eesmart-d2l.html @@ -34,7 +34,7 @@ }, paletteLabel: 'eeSmart D2L', inputLabels: "TCP in", - outputLabels: ["Data", "Error", "TCP out"], + outputLabels: ["Données", "Erreurs", "Sortie TCP"], oneditprepare: function () { $("#node-input-id_d2l").typedInput({ type: "text", @@ -66,8 +66,8 @@