<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[téléinfo sur linky Triphasé mode Historique]]></title><description><![CDATA[<p dir="auto">Bonjour,<br />
Après avoir déménagé, je souhaite rebrancher mon installation à base de D1 mini ESP32 et PITInfo. Cette fois, mon linky est en tri-phasé et en mode historique.<br />
N'arrivant pas à obtenir mes résultats, j'ai fait un essai avec IDE Arduino en guise de terminal série (à 1200 bauds) et mon module uTeleinfo connecté à mon port USB mais le résultat me semble déjà à la base discutable :<br />
...<br />
16:15:49.356 -&gt; BB⸮HP⸮B⸮0⸮⸮069963⸮S⸮<br />
16:15:49.543 -&gt; BB⸮H⸮⸮נ000⸮9⸮6⸮9⸮ҍ<br />
16:15:49.777 -&gt; BB⸮HP⸮נ000⸮055⸮9⸮\⸮<br />
16:15:50.008 -&gt; BB⸮H⸮⸮Ҡ000⸮⸮96⸮0⸮Í<br />
16:15:50.194 -&gt; BB⸮HP⸮Ҡ0000⸮3900⸮M⸮<br />
16:15:50.333 -&gt; P⸮⸮àHP⸮B⸮P⸮<br />
16:15:50.474 -&gt; D⸮MA⸮N⸮----⸮"⸮<br />
16:15:50.660 -&gt; ⸮⸮NSԱ⸮000⸮H⸮<br />
16:15:50.800 -&gt; ⸮⸮NSԲ⸮000⸮ɍ<br />
16:15:50.938 -&gt; ⸮⸮NS⸮3⸮000⸮ʍ<br />
16:15:51.078 -&gt; ⸮MAر⸮060⸮6⸮<br />
16:15:51.218 -&gt; ⸮MAز⸮060⸮⸮⸮<br />
16:15:51.359 -&gt; ⸮MA⸮3⸮060⸮⸮⸮<br />
16:15:51.499 -&gt; PMAؠ03530⸮⸮⸮<br />
...</p>
<p dir="auto">Qu'en pensez-vous ? Une piste pour résoudre ce soucis ?<br />
Merci par avance</p>
]]></description><link>http://community.ch2i.eu/topic/1516/téléinfo-sur-linky-triphasé-mode-historique</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 22:13:15 GMT</lastBuildDate><atom:link href="http://community.ch2i.eu/topic/1516.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Apr 2025 14:20:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 06 Jun 2025 15:04:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a> En effet, l'installation photovoltaïque de ma précédente maison avait été réalisée par une entreprise. Là, il s'agit d'un simple panneau plug'n play. Je vais voir commente je peux faire autrement. Merci</p>
]]></description><link>http://community.ch2i.eu/post/6026</link><guid isPermaLink="true">http://community.ch2i.eu/post/6026</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Fri, 06 Jun 2025 15:04:13 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 06 Jun 2025 10:58:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> la courbe de conso ne passe jamais en négatif. Si vous reinjectez du courant sur le réseau Enedis, la courbe de production apparaitra en jaune. Mais il faut que le contrat le permette pour que le linky publie la production.</p>
]]></description><link>http://community.ch2i.eu/post/6025</link><guid isPermaLink="true">http://community.ch2i.eu/post/6025</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Fri, 06 Jun 2025 10:58:59 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 06 Jun 2025 09:57:47 GMT]]></title><description><![CDATA[<p dir="auto">Dis moi <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a> , la courbe affichée dans l'IHM du  téléinfo peut-elle afficher des valeurs négatives dans le cas d'une injection de courant dans le réseau par utilisation de panneau solaire ?<br />
Parce que j'en ai branché un sur ma phase 3 et je ne vois pas le chiffre récupéré via le message json passer en valeur négative (ce qui était le cas avec mon ancienne installation). Du coup, je n'arrive pas à savoir quand je produis plus que je ne consomme <img src="http://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=fd8776ac13b" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":-(" alt="😞" /></p>
]]></description><link>http://community.ch2i.eu/post/6024</link><guid isPermaLink="true">http://community.ch2i.eu/post/6024</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Fri, 06 Jun 2025 09:57:47 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 06 Jun 2025 07:49:12 GMT]]></title><description><![CDATA[<p dir="auto">Merci beaucoup <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a><br />
J'ai à présent une solution qui semble pleinement opérationnelle. Reste plus qu'à exploiter mes données en base de données !<br />
De manière générale merci beaucoup à <a class="plugin-mentions-user plugin-mentions-a" href="/user/charles">@<bdi>Charles</bdi></a> et <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a> . Votre travail est vraiment top ! La balle est à présent dans mon camp pour optimiser mon installation avec panneaux solaires et stratégie adaptée.</p>
]]></description><link>http://community.ch2i.eu/post/6023</link><guid isPermaLink="true">http://community.ch2i.eu/post/6023</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Fri, 06 Jun 2025 07:49:12 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 06 Jun 2025 06:20:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> je ne suis pas très familier de berry.<br />
Mais je pense que<br />
tasmota.add_rule("TIC", rule_tic)<br />
attend la clé TIC mais uniquement dans le topic SENSOR.<br />
Est ce que la donnée cherchée est disponible sous SENSOR ?<br />
Sinon, pour récupérer les données publiées sous le topic TIC, une solution serait mqtt_subscribe. Vous pourrez alors parser le JSON récupéré.</p>
]]></description><link>http://community.ch2i.eu/post/6022</link><guid isPermaLink="true">http://community.ch2i.eu/post/6022</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Fri, 06 Jun 2025 06:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Thu, 05 Jun 2025 16:17:53 GMT]]></title><description><![CDATA[<p dir="auto">Je me permets de revenir sur le forum parce que je sèche complètement. Je ne comprends pas pourquoi ma règle ne s'exécute pas.<br />
Voici mon code simplifié à l'extrème :</p>
<pre><code>var post_every = 15000 # Envoi toutes les 15 secondes
var variabletest = "vide"
 
def send_to_api()
  print("variable test:", variabletest) # Pour le débogage dans la console Tasmota
  tasmota.set_timer(post_every, send_to_api) # Redémarre le minuteur pour le prochain envoi
end
 
def rule_tic(value, trigger)
  variabletest = "TIC"
end
 
def start()
  tasmota.add_rule("TIC", rule_tic)
  tasmota.set_timer(5000, send_to_api)
end
 
tasmota.set_timer(10000, start)

</code></pre>
<p dir="auto">Dans la console, suite au redémarrage, je vois ce résultat (avec la ligne réduite des valeurs de mon compteur). Ma variable variabletest (qui semble globale de ce que j'ai lu sur le sujet) n'est jamais alimentée par la valeur "TIC".</p>
<pre><code>18:03:23.535 TIC: Fabricant Sagem / Sagemcom (2019)
18:03:23.536 TIC: Linky triphasé 60A
18:03:26.567 RSL: SENSOR = {"Time":"2025-06-05T18:03:26","METER":{"PH":...
18:03:30.517 variable test: vide
18:03:31.502 RSL: LIVE = {"METER":{"PH...
18:03:33.570 RSL: TIC = {"ADCO":"...
18:03:36.555 RSL: SENSOR = {"Time":"2025-06-05T18:03:36","METER":{"PH"...
18:03:41.577 RSL: LIVE = {"METER":{"PH":...
18:03:43.567 RSL: TIC = {"ADCO":"...
18:03:46.519 variable test: vide
18:03:46.525 RSL: SENSOR = {"Time":"2025-06-05T18:03:46","METER":{"PH":...

</code></pre>
<p dir="auto">Quelqu'un peut m'aider ? Je commence à manquer de cheveux pour poursuivre de me les arracher <img src="http://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f610.png?v=fd8776ac13b" class="not-responsive emoji emoji-android emoji--neutral_face" style="height:23px;width:auto;vertical-align:middle" title=":-|" alt="😐" /></p>
]]></description><link>http://community.ch2i.eu/post/6021</link><guid isPermaLink="true">http://community.ch2i.eu/post/6021</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Thu, 05 Jun 2025 16:17:53 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Mon, 26 May 2025 12:32:51 GMT]]></title><description><![CDATA[<p dir="auto">Bonjour,<br />
J'avance dans la solution berry. La fonction appelle bien à fréquence régulière mon API via la fonction send_to_api. Par contre, la règle alimentant mon json ne semble pas être appelée (pour info, j'ai mis un print en tout début de fonction rule_tic et je ne le retrouve pas dans la console). Que me conseillez vous ?<br />
J'ai ce morceau de code dans mon start de autoexec..be :</p>
<pre><code>  tasmota.add_rule("TIC", rule_tic)
</code></pre>
<p dir="auto">Est-ce qu'il y aurait un problème vis à vis de l'évènement TIC ?<br />
PS : Je n'ai rien configuré du côté de MQTT</p>
]]></description><link>http://community.ch2i.eu/post/6017</link><guid isPermaLink="true">http://community.ch2i.eu/post/6017</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Mon, 26 May 2025 12:32:51 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Wed, 21 May 2025 10:29:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a> j'entends bien que les étiquettes ne sont pas les mêmes mais dans mon code, les callbacks ne sont même pas appelés pour afficher un petit pourront en console.<br />
Quant à la bdd, je l'ai déjà. C'est celle qui gère mes différents objets connectés et sur lesquels je veux agir en fonction de mes panneaux solaires d'où l'interrogation du téléinfo <img src="http://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f913.png?v=fd8776ac13b" class="not-responsive emoji emoji-android emoji--nerd_face" style="height:23px;width:auto;vertical-align:middle" title="🤓" alt="🤓" /></p>
]]></description><link>http://community.ch2i.eu/post/6009</link><guid isPermaLink="true">http://community.ch2i.eu/post/6009</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Wed, 21 May 2025 10:29:00 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Wed, 21 May 2025 10:01:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> En monophasé et en triphasé les étiquettes teleinfo ne sont pas les mêmes. C'est sans doute pour cela que le soft ne fonctionne plus directement et qu'il nécessite une adaptation.<br />
Concernant la base de donnée, vous avez à disposition un connecteur InfluxDb qui est une base de donnée temporelle très utilisée.</p>
]]></description><link>http://community.ch2i.eu/post/6008</link><guid isPermaLink="true">http://community.ch2i.eu/post/6008</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Wed, 21 May 2025 10:01:14 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Wed, 21 May 2025 09:04:49 GMT]]></title><description><![CDATA[<p dir="auto">Merci beaucoup <a class="plugin-mentions-user plugin-mentions-a" href="/user/charles">@<bdi>Charles</bdi></a>  je vais essayer cette piste. Cependant, maintenant que la solution Tascoma m'a prouvée que mon téléinfo fonctionnait correctement, je ne comprends pas pourquoi le code que j'utilisais sur mon ancien linky ne fonctionne plus <img src="http://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=fd8776ac13b" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":-(" alt="😞" /><br />
Est-ce que tu as une piste ? Parce que ce serait beaucoup plus simple  pour moi qui ai juste besoin de transmettre dans ma BDD la consommation instantanée toutes les minutes.</p>
]]></description><link>http://community.ch2i.eu/post/6007</link><guid isPermaLink="true">http://community.ch2i.eu/post/6007</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Wed, 21 May 2025 09:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sun, 18 May 2025 16:23:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> regarde l'exemple en berry de la doc, ça envoi dans une database EMONCMS, mais le principe reste exactement le même.</p>
<p dir="auto"><a href="https://github.com/hallard/Denky-D4?tab=readme-ov-file#send-data-to-emoncms-with-berry" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/hallard/Denky-D4?tab=readme-ov-file#send-data-to-emoncms-with-berry</a></p>
]]></description><link>http://community.ch2i.eu/post/6002</link><guid isPermaLink="true">http://community.ch2i.eu/post/6002</guid><dc:creator><![CDATA[Charles]]></dc:creator><pubDate>Sun, 18 May 2025 16:23:47 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sun, 18 May 2025 13:59:25 GMT]]></title><description><![CDATA[<p dir="auto">EDIT : J'allais oublier de dire que j'ai une api en post exposée pour intégration à ma bdd.</p>
]]></description><link>http://community.ch2i.eu/post/6001</link><guid isPermaLink="true">http://community.ch2i.eu/post/6001</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Sun, 18 May 2025 13:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sun, 18 May 2025 07:16:52 GMT]]></title><description><![CDATA[<p dir="auto">J'ai l'impression que tout est opérationnel à présent. Il va me falloir à présent trouver comment alimenter ma base de données avec les puissances soutirées des trois phases. Une idée ?</p>
]]></description><link>http://community.ch2i.eu/post/6000</link><guid isPermaLink="true">http://community.ch2i.eu/post/6000</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Sun, 18 May 2025 07:16:52 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sat, 17 May 2025 17:06:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> pour info après un autoconf la configuration du D4 doit être la suivante</p>
<p dir="auto"><img src="/assets/uploads/files/1747501560388-39c5dc2c-6f23-43da-9caf-65faab6bc328-image.png" alt="39c5dc2c-6f23-43da-9caf-65faab6bc328-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>http://community.ch2i.eu/post/5999</link><guid isPermaLink="true">http://community.ch2i.eu/post/5999</guid><dc:creator><![CDATA[Charles]]></dc:creator><pubDate>Sat, 17 May 2025 17:06:13 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sat, 17 May 2025 09:48:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> vous n'avez pas le bouton "courbes" ?</p>
]]></description><link>http://community.ch2i.eu/post/5998</link><guid isPermaLink="true">http://community.ch2i.eu/post/5998</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Sat, 17 May 2025 09:48:04 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sat, 17 May 2025 09:16:54 GMT]]></title><description><![CDATA[<p dir="auto">Merci beaucoup <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a>, j'ai à présent accès aux consommations maxi. Par contre, alors que je note le compteur de trames évoluer, ma consommation en temps réel n'est pas alimentée.   A quel niveau dois-je agir pour l'afficher ?</p>
]]></description><link>http://community.ch2i.eu/post/5997</link><guid isPermaLink="true">http://community.ch2i.eu/post/5997</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Sat, 17 May 2025 09:16:54 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 16 May 2025 09:42:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> si rien n'est configuré c'est normal que cela ne fonctionne pas.<br />
Sélectionnez Denky D4 (0) et appliquez. l'ESP devrait rebooter et être configuré.</p>
]]></description><link>http://community.ch2i.eu/post/5995</link><guid isPermaLink="true">http://community.ch2i.eu/post/5995</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Fri, 16 May 2025 09:42:49 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 16 May 2025 09:10:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a><br />
Merci pour la référence et désolé pour la réactivité, je suis encore actuellement plus sur le gros œuvre que sur la domotique <img src="http://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=fd8776ac13b" class="not-responsive emoji emoji-android emoji--confused" style="height:23px;width:auto;vertical-align:middle" title=":-/" alt="😕" /><br />
J'ai réussi à uploader ton module téléinfo tasmota et m'y connecter. Par contre, il m'affiche l'erreur "TInfo Rx non configuré". En regardant dans les paramètres du module, je n'y vois aucun paramétrage. Peut-être est-ce là qu'il me manque quelque chose ?<br />
Merci par avance de ton retour.<br />
<img src="/assets/uploads/files/1747386562782-whatsapp-image-2025-05-16-at-11.04.02.jpeg" alt="WhatsApp Image 2025-05-16 at 11.04.02.jpeg" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1747386574532-whatsapp-image-2025-05-16-at-11.04.07.jpeg" alt="WhatsApp Image 2025-05-16 at 11.04.07.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>http://community.ch2i.eu/post/5994</link><guid isPermaLink="true">http://community.ch2i.eu/post/5994</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Fri, 16 May 2025 09:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Sat, 26 Apr 2025 23:20:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a><br />
<a href="https://github.com/NicolasBernaerts/tasmota/tree/master/teleinfo" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NicolasBernaerts/tasmota/tree/master/teleinfo</a></p>
]]></description><link>http://community.ch2i.eu/post/5957</link><guid isPermaLink="true">http://community.ch2i.eu/post/5957</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Sat, 26 Apr 2025 23:20:55 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Wed, 23 Apr 2025 14:10:28 GMT]]></title><description><![CDATA[<p dir="auto">Bonjour <a class="plugin-mentions-user plugin-mentions-a" href="/user/charles">@<bdi>Charles</bdi></a> ,<br />
Le module utilisé était un wemod teleinfo qui fonctionnait très bien connecté au linky de ma précédente maison (monophasé HC/HC). Le code était écrit grâce à ton aide.<br />
En voici le code injecté : <a href="/assets/uploads/files/1745416744271-teleinfolinky.txt">teleinfoLinky.txt</a></p>
<pre><code class="language-cpp">#include &lt;LibTeleinfo.h&gt;

  // Parsing JSON
  #include &lt;ArduinoJson.h&gt;
  const size_t capacity = JSON_OBJECT_SIZE(4) + JSON_ARRAY_SIZE(4) + 60;

  String chaineJSONenvoyee;
  
  float frequenceInterro=60;
  String commentairePutWS="";
  int PAC = 0;


#define SERIAL_DEBUG  Serial
#define SERIAL_TIC    Serial1

// Teleinfo RXD pin is connected to ESP32-PICO-V3-02 GPIO8
#define TIC_RX_PIN  23

_Mode_e tinfo_mode = TINFO_MODE_HISTORIQUE; 
//_Mode_e tinfo_mode = TINFO_MODE_STANDARD; 

TInfo tinfo; // Teleinfo object

// Wakeup de 5 secondes
#define uS_TO_S_FACTOR 1000000ULL  /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP  5        /* Time ESP32 will go to sleep (in seconds) */

#define LEDPIN LED_BUILTIN
  
// Uptime timer
boolean tick1sec=0;// one for interrupt, don't mess with 
unsigned long uptime=0; // save value we can use in sketch even if we're interrupted

String sendJSON(ValueList * me, boolean all){
  bool firstdatacomplete = true;
  bool firstdataenvoyee = true;
  String chaineJSONenvoyee = "";
  String chaineJSONcomplete = "";
  String Element_Valeur = "";
  String separateur = ",";
  String sep;

  // Got at least one ?
  if (me) {

    PAC = 0;
    // Json start
    chaineJSONenvoyee = "{\"commentaire\":" + "\"" + commentairePutWS + "\"";
    chaineJSONcomplete = "{\"commentaire\":" + "\"" + commentairePutWS + "\"";

    // Loop thru the node
    while (me-&gt;next) {
      // go to next node
      me = me-&gt;next;

      // uniquement sur les nouvelles valeurs ou celles modifiées 
      // sauf si explicitement demandé toutes
      if ( all || ( me-&gt;flags &amp; (TINFO_FLAGS_UPDATED | TINFO_FLAGS_ADDED) ) ) {
        //Serial.println("|"+String(me-&gt;name)+"|") ;
          

          /*
          Serial.print(F("\"")) ;
          Serial.print(me-&gt;name) ;
          Serial.print(F("\":")) ;
          */
            
          // we have at least something ?
          if (me-&gt;value &amp;&amp; strlen(me-&gt;value))
          {
            boolean isNumber = true;
            uint8_t c;
            char * p = me-&gt;value;
  
            // check if value is number
            while (*p &amp;&amp; isNumber) {
              if ( *p &lt; '0' || *p &gt; '9' )
                isNumber = false;
              p++;
            }
    
            // this will add "" on not number values
            if (!isNumber) {
              Element_Valeur = "\"" + String(me-&gt;name) + "\":" + "\"" + String(me-&gt;value) + "\"";
            }
            // this will remove leading zero on numbers
            else
              //Serial.print(atol(me-&gt;value));
              Element_Valeur = "\"" + String(me-&gt;name) + "\":" + atol(me-&gt;value);
          }
          
          if (String(me-&gt;name) != "MSG1" &amp;&amp; 
              String(me-&gt;name) != "PJOURF+1" &amp;&amp;
              String(me-&gt;name) != "ADSC" &amp;&amp;
              String(me-&gt;name) != "VTIC" &amp;&amp;
              String(me-&gt;name) != "NGTF" &amp;&amp;
              String(me-&gt;name) != "LTARF" &amp;&amp;
              String(me-&gt;name) != "EAST" &amp;&amp;
              String(me-&gt;name) != "EASF01" &amp;&amp;
              String(me-&gt;name) != "EASF02" &amp;&amp;
              String(me-&gt;name) != "EASF03" &amp;&amp;
              String(me-&gt;name) != "EASF04" &amp;&amp;
              String(me-&gt;name) != "EASF05" &amp;&amp;
              String(me-&gt;name) != "EASF06" &amp;&amp;
              String(me-&gt;name) != "EASF07" &amp;&amp;
              String(me-&gt;name) != "EASF08" &amp;&amp;
              String(me-&gt;name) != "EASF09" &amp;&amp;
              String(me-&gt;name) != "EASF10" &amp;&amp;
              String(me-&gt;name) != "EASD01" &amp;&amp;
              String(me-&gt;name) != "EASD02" &amp;&amp;
              String(me-&gt;name) != "EASD03" &amp;&amp;
              String(me-&gt;name) != "EASD04" &amp;&amp;
              String(me-&gt;name) != "EAIT" &amp;&amp;
              String(me-&gt;name) != "ERQ1" &amp;&amp;
              String(me-&gt;name) != "ERQ2" &amp;&amp;
              String(me-&gt;name) != "ERQ3" &amp;&amp;
              String(me-&gt;name) != "ERQ4" &amp;&amp;
              String(me-&gt;name) != "IRMS1" &amp;&amp;
              String(me-&gt;name) != "URMS1" &amp;&amp;
              String(me-&gt;name) != "PREF" &amp;&amp;
              String(me-&gt;name) != "PCOUP" &amp;&amp;
              String(me-&gt;name) != "PREF" &amp;&amp;
              String(me-&gt;name) != "CCASN" &amp;&amp;
              String(me-&gt;name) != "CCASN-1" &amp;&amp;
              String(me-&gt;name) != "CCAIN" &amp;&amp;
              String(me-&gt;name) != "CCAIN-1" &amp;&amp;
              //String(me-&gt;name) != "UMOY1" &amp;&amp;
              String(me-&gt;name) != "STGE" &amp;&amp;
              String(me-&gt;name) != "PRM" &amp;&amp;
              String(me-&gt;name) != "RELAIS" &amp;&amp;
              String(me-&gt;name) != "NTARF" &amp;&amp;
              String(me-&gt;name) != "NJOURF" &amp;&amp;
              String(me-&gt;name) != "NJOURF+1" 
              ){
            chaineJSONenvoyee = chaineJSONenvoyee + separateur + Element_Valeur;
          }
          

          chaineJSONcomplete = chaineJSONcomplete + separateur + Element_Valeur;
        }
      }
    
   // Json end
   //Serial.println(F("}")) ;
   chaineJSONenvoyee = chaineJSONenvoyee + "}";
   chaineJSONcomplete = chaineJSONcomplete + "}";
   Serial.println("chaineJSONcomplete = " + chaineJSONcomplete );
   Serial.println("chaineJSONenvoyee =  " + chaineJSONenvoyee );

   return chaineJSONcomplete;
  }
}


/* ======================================================================
Function: NewFrame 
Purpose : callback when we received a complete teleinfo frame
Input   : linked list pointer on the concerned data
Output  : - 
Comments: -
====================================================================== */
void NewFrame(ValueList * me){
  SERIAL_DEBUG.println("NewFrame - uptime=" + String(uptime));
  if (tick1sec) {
  concatlog("NewFrame - uptime=" + String(uptime));
  chaineJSONenvoyee = sendJSON(me, true);
  postconsoWS(chaineJSONenvoyee);
  postlogsindb();
  logcycle="";
  ledClignotte();
  tick1sec = false;
  }
  
}

/* ======================================================================
Function: UpdatedFrame 
Purpose : callback when we received a complete teleinfo frame
Input   : linked list pointer on the concerned data
Output  : - 
Comments: it's called only if one data in the frame is different than
          the previous frame
====================================================================== */
void UpdatedFrame(ValueList * me){
  SERIAL_DEBUG.println("UpdatedFrame - tick1sec=" + String(tick1sec));
  if (tick1sec) {
    concatlog("UpdatedFrame - uptime=" + String(uptime));
  chaineJSONenvoyee = sendJSON(me, true);
  postconsoWS(chaineJSONenvoyee);
  postlogsindb();
  logcycle="";
  ledClignotte();
    tick1sec = false;
  }
  
}

/* ======================================================================
Function: initSerial
Purpose : Configure (or reconfigure Serial Port)
Input   : -
Output  : - 
Comments: -
====================================================================== */
void initSerial(){
  // Cleanup
  SERIAL_TIC.flush();
  SERIAL_TIC.end();

  // Configure Teleinfo 
  SERIAL_DEBUG.printf_P(PSTR("TIC RX=GPIO%d  Mode:"), TIC_RX_PIN);
  SERIAL_TIC.begin(tinfo_mode == TINFO_MODE_HISTORIQUE ? 1200 : 9600, SERIAL_7E1, TIC_RX_PIN);

  if ( tinfo_mode == TINFO_MODE_HISTORIQUE ) {
    SERIAL_DEBUG.println(F("Historique"));
  } else {
    SERIAL_DEBUG.println(F("Standard"));
  }
}

/* ======================================================================
Function: ledOff
Purpose : Setup I/O for RGB Led to be OFF
Input   : -
Output  : - 
Comments: -
====================================================================== */
void ledClignotte(){
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
}

/* ======================================================================
Function: setup
Purpose : Setup I/O and other one time startup stuff
Input   : -
Output  : - 
Comments: -
====================================================================== */
void setup(){
  SERIAL_DEBUG.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);

  // Serial, pour le debug
  SERIAL_DEBUG.println(F("\r\n\r\n"));
  SERIAL_DEBUG.println(F("================================================="));
  SERIAL_DEBUG.println(F("     D1 Mini ESP32 - Teleinfo Lynky Alim WS      "));
  SERIAL_DEBUG.println(F("================================================="));
  SERIAL_DEBUG.println(F("\r\n"));



          SERIAL_DEBUG.println("[Setup] Gestion du Wifi avec WifiManager");
        WifiGestion();

        //SERIAL_DEBUG.println("[Setup] Récupération des paramètres de cet arduino : Fréquence d'interrogation et du commentaire de prise de mesure");
        //GET_params_arduino();

        SERIAL_DEBUG.println("[Setup] Alimentation des logs en BDD à travers le service REST (Requête POST)");
        SERIAL_DEBUG.println("-------------------------------------------------------------------------------");
        concatlog("[Setup] Alimentation des logs en BDD (Req POST)");
        postlogsindb();
        
  // Init Serial Port
  initSerial();

  // Init teleinfo
  tinfo.init(tinfo_mode);

  // Attacher les callback dont nous avons besoin
  // pour cette demo, ADPS et TRAME modifiée
  tinfo.attachUpdatedFrame(UpdatedFrame);
  tinfo.attachNewFrame(NewFrame); 
}

/* ======================================================================
Function: loop
Purpose : infinite loop main code
Input   : -
Output  : - 
Comments: -
====================================================================== */
void loop()
{
  static char c;
  static unsigned long previousMillis = 0;
  static uint8_t buttonState = 0;
  static unsigned long lastDebounceTime = 0;  

  unsigned long currentMillis = millis();

  /*
  // Avons nous recu un ticker de seconde?
  if (tick1sec) {
    tick1sec = false;
    uptime++;
  }
  */
  
  // On a reçu un caractère ?
  if ( SERIAL_TIC.available() ) {
    // Le lire
    c = SERIAL_TIC.read();

    // Gérer
    tinfo.process(c);

    
    // L'affcher dans la console
    if (c==TINFO_STX) {
      SERIAL_DEBUG.print("&lt;STX&gt;");
    } else if (c==TINFO_ETX) {
      SERIAL_DEBUG.print("&lt;ETX&gt;");
    } else if (c==TINFO_HT) {
      SERIAL_DEBUG.print("&lt;TAB&gt;");
    } else {
      SERIAL_DEBUG.print(c);
    }
    
  }

  //SERIAL_DEBUG.println("currentMillis=" + String(currentMillis) + "previousMillis=" + String(previousMillis));
  if (currentMillis - previousMillis &gt; 60000 ) {
    SERIAL_DEBUG.println("IL FAUT ENREGISTRER UNE MESURE");
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   
    tick1sec = true;
  }
}
</code></pre>
<p dir="auto">Suite à la proposition de <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a>, j'ai commandé un Denky D4 1.3a mais ne connaissant pas du tout Tasmota, je me heurte à la configuration. Quel test rapide puis-je faire pour vérifier les valeurs récupérées du flux téléinfo ? (A terme, l'idée est de pouvoir injecter les consos de mes 3 phases toutes les minutes à ma base de données mySql (hébergée par AlwaysData)</p>
]]></description><link>http://community.ch2i.eu/post/5955</link><guid isPermaLink="true">http://community.ch2i.eu/post/5955</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Wed, 23 Apr 2025 14:10:28 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Tue, 22 Apr 2025 10:12:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a> said in <a href="/post/5951">téléinfo sur linky Triphasé mode Historique</a>:</p>
<blockquote>
<p dir="auto">16:15:50.008 -&gt; BB⸮H⸮⸮Ҡ000⸮⸮96⸮0⸮Í</p>
</blockquote>
<p dir="auto">Normalement le mode historique ne pose pas de soucis de résistance, c'est quel soft qui est flashé dans le D1 ?</p>
]]></description><link>http://community.ch2i.eu/post/5954</link><guid isPermaLink="true">http://community.ch2i.eu/post/5954</guid><dc:creator><![CDATA[Charles]]></dc:creator><pubDate>Tue, 22 Apr 2025 10:12:11 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Fri, 11 Apr 2025 10:01:10 GMT]]></title><description><![CDATA[<p dir="auto">Merci beaucoup <a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas-bernaerts">@<bdi>Nicolas-Bernaerts</bdi></a> pour cette proposition mais vu mon niveau en électronique et la miniaturisation de la bête, je ne me vois pas changer une résistance dans le bazar.<br />
Il n'y aurait pas d'autres pistes logicielles ?</p>
<p dir="auto">Pour info, Voici la clé télé info utilisée :<br />
<img src="/assets/uploads/files/1744365662016-img_20250411_115606.jpg" alt="IMG_20250411_115606.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>http://community.ch2i.eu/post/5953</link><guid isPermaLink="true">http://community.ch2i.eu/post/5953</guid><dc:creator><![CDATA[Eric44]]></dc:creator><pubDate>Fri, 11 Apr 2025 10:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to téléinfo sur linky Triphasé mode Historique on Thu, 10 Apr 2025 20:19:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric44">@<bdi>Eric44</bdi></a><br />
Cela ressemble fortement a un problème de résistance sur l'étage d'entrée de l'opto couleur. Si la résistance est variable, essayez de la modifier.</p>
]]></description><link>http://community.ch2i.eu/post/5952</link><guid isPermaLink="true">http://community.ch2i.eu/post/5952</guid><dc:creator><![CDATA[Nicolas Bernaerts]]></dc:creator><pubDate>Thu, 10 Apr 2025 20:19:03 GMT</pubDate></item></channel></rss>