Bonjour,
si quelqu'un veut tester:
3 modif dans pagesHtmlPara.h
Code :
<label for='Hor3' style='text-align:right;'>IT 10ms/100Hz (Triac)</label><input type='radio' name='Horlo' id='Hor3' value="3" onclick="checkDisabled();" >
<label for='Hor4' style='text-align:right;'>IT 20ms/50Hz</label><input type='radio' name='Horlo' id='Hor4' value="4" onclick="checkDisabled();" >
<span id='ReqScrExt'><label for='Hor5' style='text-align:right;'>depuis ESP externe</label><input type='radio' name='Horlo' id='Hor5' value="5" onclick="checkDisabled();"'></span>
</div>
</div>
Code :
GID('ligneTopicP').style.display = (GID("Pmqtt").checked) ? "table-row" : "none";
Source = document.querySelector('input[name="sources"]:checked').value;
GID('ReqScrExt').style.display = (Source=='Ext' && GID("RMSextIP").value != "") ? "inline" : "none";
if (Source !='Ext') Source_data=Source;
AdaptationSource();
Code :
ModePara=Para[9];
Horloge=Para[10];
if (Horloge == 5 && Source != "Ext") Horloge = 0; // remet horloge internet si pas de source externe
ESP32_Type=Para[11];
var IpNoms=Para[12].split(RS);
quelques lignes dans Source_Externe.ino
Code :
for (int i = 0; i <= idx; i++) {
switch (i) {
case 0: // date&heure
if (Horloge == 5) { // heure depuis la source exterieure
JourLinky = data_[i].substring(0, 10);
Int_HeureLinky = data_[i].substring(11,13).toInt();
Int_MinuteLinky = data_[i].substring(14, 16).toInt();
Int_SecondeLinky = data_[i].substring(17, 19).toInt();
}
case 1:
Source_data = data_[i];
et pour finir dans Stockage.ino
Code :
int16_t minute = atoi(buffer);
Int_Minute = minute;
} else if (Horloge == 1 || Horloge == 5) { //Heure Linky ou RMS distant
Int_Heure = Int_HeureLinky;
Int_Minute = Int_MinuteLinky;
Int_Seconde = Int_SecondeLinky;
sprintf(buffer, "%d:%02d:%02d", Int_Heure, Int_Minute, Int_Seconde);
DATE = JourLinky + " " + String(buffer);
int32_t p = JourLinky.indexOf('/');
struct tm myDate;
myDate.tm_mday = JourLinky.substring(0, p).toInt();
myDate.tm_mon = JourLinky.substring(p + 1, JourLinky.indexOf('/', p + 1)).toInt() - 1; // janvier = 0
myDate.tm_year = JourLinky.substring(JourLinky.lastIndexOf('/') + 1).toInt() - 1900; // reference an 1900
myDate.tm_hour = Int_Heure;
myDate.tm_min = Int_Minute;
myDate.tm_sec = Int_Seconde;
time_t timestamp = mktime( & myDate );
struct timeval now = { .tv_sec = timestamp };
settimeofday(&now, NULL);
HeureValide = true;
} else { //Horloge interne ou par IT 10 ou 20ms
sprintf(buffer, "%d:%02d:%02d", Int_Heure, Int_Minute, Int_Seconde);
Merci André

,
Routeur V16.00b (since V2.01) / 1xESP32 (IP fixe) / Source UxI / 5 actions
Panneaux 1680Wc
1 Triac : ECS 2000W
1 SSR (multi) : ECS 1800W
1 SSR (On-Off) : Circulateur plancher chauffant eau 50W
1 SSR (multi) : circuit d'eau 1500W
1 SSR (multi) : Ultime 2000W