<?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[Simulation de trames teleInfo par WinInfo.ino]]></title><description><![CDATA[<p dir="auto">Bonjour,<br />
j'ai ajouté une option pour simuler des trames teleInfo en bouclant TX serial1 vers Rx serial2.<br />
Je vous joint 1 fichier avec les modifications à ajouter à WinInfo.ino ainsi qu'un copie décran de l'onglet tinfo associé.<br />
<img src="/assets/uploads/files/1518804359052-onglet-tabinfo-resized.jpg" alt="0_1518804358183_onglet tabinfo .JPG" class="img-markdown  img-fluid" /></p>
<p dir="auto">[0_1518804378137_modif WinInfo.txt](Envoi en cours 100%)</p>
]]></description><link>https://community.ch2i.eu/topic/255/simulation-de-trames-teleinfo-par-wininfo-ino</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 08:28:39 GMT</lastBuildDate><atom:link href="https://community.ch2i.eu/topic/255.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Feb 2018 18:07:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Simulation de trames teleInfo par WinInfo.ino on Wed, 14 Mar 2018 13:13:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mjeanne" aria-label="Profile: mjeanne">@<bdi>mjeanne</bdi></a><br />
Vous parlez-donc d'une version wifinfo modifiée? qui réémet les informations reçues de Rx serial vers Tx serial1 au profit d'une box domotique.</p>
]]></description><link>https://community.ch2i.eu/post/2398</link><guid isPermaLink="true">https://community.ch2i.eu/post/2398</guid><dc:creator><![CDATA[Marco40]]></dc:creator><pubDate>Wed, 14 Mar 2018 13:13:52 GMT</pubDate></item><item><title><![CDATA[Reply to Simulation de trames teleInfo par WinInfo.ino on Tue, 13 Mar 2018 23:49:37 GMT]]></title><description><![CDATA[<p dir="auto">non, c'est juste en sortie que ça devrait se jouer. Selon une option dans l'interface web, on pourrait choisir d'avoir les données réelles ou des données simulées.<br />
Si on a une box domotique derrière qui ne reçoit rien, le mode debug permettrait de savoir si le soucis est en amont ou en aval de l'esp</p>
]]></description><link>https://community.ch2i.eu/post/2397</link><guid isPermaLink="true">https://community.ch2i.eu/post/2397</guid><dc:creator><![CDATA[mjeanne]]></dc:creator><pubDate>Tue, 13 Mar 2018 23:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to Simulation de trames teleInfo par WinInfo.ino on Sat, 10 Mar 2018 09:30:36 GMT]]></title><description><![CDATA[<p dir="auto">Bonjour<br />
C'est toujours possible mais il faudrait prévoir un relais pour commuter l'entrée série entre la liaison teleinfo ou la simulation.</p>
]]></description><link>https://community.ch2i.eu/post/2396</link><guid isPermaLink="true">https://community.ch2i.eu/post/2396</guid><dc:creator><![CDATA[Marco40]]></dc:creator><pubDate>Sat, 10 Mar 2018 09:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to Simulation de trames teleInfo par WinInfo.ino on Thu, 08 Mar 2018 11:22:00 GMT]]></title><description><![CDATA[<p dir="auto">Bonjour,</p>
<p dir="auto">c'est pas con un mode débug. L'idéal serait de pouvoir l'activer depuis l'interface web, et sans modification de cablage. Cela permettrait en cas de soucis de faire un debug plus simple. Sur d'autres forums, certains se plaignent de ne pas recevoir de trames, ce mode permettrait déjà de savoir si le soucis est coté compteur ou coté ordinateur.</p>
]]></description><link>https://community.ch2i.eu/post/2395</link><guid isPermaLink="true">https://community.ch2i.eu/post/2395</guid><dc:creator><![CDATA[mjeanne]]></dc:creator><pubDate>Thu, 08 Mar 2018 11:22:00 GMT</pubDate></item><item><title><![CDATA[Reply to Simulation de trames teleInfo par WinInfo.ino on Fri, 16 Feb 2018 19:51:01 GMT]]></title><description><![CDATA[<p dir="auto">Je vous colle le code directement, problème avec un fichier.</p>
<p dir="auto">#define SIMUTRAMETEMPO</p>
<p dir="auto">#ifdef SIMUTRAMETEMPO</p>
<p dir="auto">//avec esp12 0.9<br />
//strapper ces 2 pins:<br />
//emission sur serial1 esp12--&gt;GPIO2---&gt;TXD1--&gt;D4<br />
//réception sur serial après le swap--&gt;GPIO13----&gt;RXD2---&gt;D7</p>
<p dir="auto">//fonctions calcChecksum de LibTeleinfo modifié<br />
unsigned char calcChecksum(char *mot)<br />
{<br />
unsigned int  i;<br />
unsigned int  sum = ' ';  // Somme des codes ASCII du message + un espace</p>
<pre><code>						  // avoid dead loop, always check all is fine 
if (mot) {
	// this will not hurt and may save our life ;-)
	if (strlen(mot)) {
		while (*mot)
			sum += *mot++;
		return ((sum &amp; 63) + ' ');
	}
}
return 0;
</code></pre>
<p dir="auto">}</p>
<p dir="auto">/* ======================================================================<br />
Function: initSimuTrame<br />
Purpose :<br />
Input   :<br />
Output  : -<br />
Comments: -<br />
====================================================================== */<br />
int cptChar = 500;<br />
unsigned  long cpt = 0;  //max:4294967295<br />
#define END_STR '\0' // End of group<br />
#define NBCHAR  23<br />
#define NBCHAMP  17</p>
<p dir="auto">//options supplémentaire du compilateur, ajouter -fpermissive</p>
<p dir="auto">//ATTENTION a tabnames de webserver.cpp si version LibTeleinfo-syslog.zip<br />
char TRAME[][NBCHAR] = { "\x02\0","\rADCO 039801172264 \0", "\rOPTARIF BBR* \0", "\rISOUSC 45 \0",<br />
"\rBBRHCJB 008078393 \0", "\rBBRHPJB 015766489 \0", "\rBBRHCJW 001256887 \0",<br />
"\rBBRHPJW 002075407 \0", "\rBBRHCJR 000153905 \0", "\rBBRHPJR 000532607 \0",<br />
"\rPTEC HCJW \0",	"\rDEMAIN BLEU \0",	"\rIINST 001 \0","\rIMAX 025 \0",<br />
"\rHHPHC Y \0","\rMOTDETAT 000000 \0","\x03\0" };<br />
void initSimuTrameTempo(void)<br />
{<br />
for (int i = 1; i &lt; NBCHAMP - 1; i++)<br />
{<br />
TRAME[i][0] = TINFO_SGR;<br />
for (int j = 0; j &lt;NBCHAR; j++)<br />
{<br />
if (TRAME[i][j] == END_STR)<br />
{<br />
TRAME[i][j] = calcChecksum(&amp;TRAME[i][1]);			//CRC			<br />
TRAME[i][j + 1] = TINFO_EGR;<br />
TRAME[i][j + 2] = END_STR;<br />
break;<br />
}<br />
}<br />
}<br />
}<br />
void emetTrameTempo(void)<br />
{<br />
char Etiq[] = "ADCO";<br />
//mise a jour du compteur<br />
char buffer[13];<br />
sprintf(buffer, "%012u", cpt);<br />
for (int i = 0; i &lt; 12; i++)<br />
TRAME[1][i + 6] = buffer[i];<br />
TRAME[1][19] = tinfo.calcChecksum(&amp;Etiq[0], &amp;buffer[0]);<br />
//emission d'une trame complète<br />
for (int i = 0; i &lt; NBCHAMP; i++)<br />
{<br />
for (int j = 0; j &lt; NBCHAR; j++)<br />
{<br />
if (TRAME[i][j] != END_STR)<br />
Serial1.write(TRAME[i][j]);<br />
else<br />
break;<br />
}<br />
delay(10);//tempo inter champ<br />
}<br />
cpt += 1;  //pas de test de débordement...<br />
delay(10);//tempo intertrame<br />
}</p>
<p dir="auto">#endif //SIMUTRAMETEMPO</p>
<p dir="auto">#ifdef SIMUTRAMETEMPO<br />
//dans setup juste avant Init teleinfo<br />
Serial1.begin(1200, SERIAL_7E1);<br />
Serial1.setRxBufferSize(1024);<br />
initSimuTrameTempo();<br />
#endif // SIMUTRAMETEMPO</p>
<p dir="auto">#ifdef SIMUTRAMETEMPO<br />
//au début de loop<br />
cptChar += 1;<br />
if(cptChar&gt;=500)<br />
{<br />
emetTrameTempo();<br />
cptChar = 0;<br />
}<br />
#endif //SIMUTRAMETEMPO</p>
]]></description><link>https://community.ch2i.eu/post/2381</link><guid isPermaLink="true">https://community.ch2i.eu/post/2381</guid><dc:creator><![CDATA[Marco40]]></dc:creator><pubDate>Fri, 16 Feb 2018 19:51:01 GMT</pubDate></item></channel></rss>