Skip to content

Commit b3263c5

Browse files
author
xlyric
committed
Coorrection Mutex
1 parent e2d6b6d commit b3263c5

17 files changed

+43
-38
lines changed

data/config-dimmer.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ <h6 class="m-0 font-weight-bold text-primary">Pv Routeur</h6>
349349
</div>
350350
</div>
351351
</div>
352+
<div class="form-group row">
353+
<div class="col-sm-4" data-toggle="popover" title="Aide" data-bs-content="Pour inverser la mesure sans toucher à la sonde">Inversion de la mesure (+/-) : ℹ </div>
354+
<div class="col-sm-4">
355+
<div class="custom-control custom-checkbox small">
356+
<input type="checkbox" class="custom-control-input" id="polarity" onchange="sendservermode('polarity');">
357+
<label class="custom-control-label" for="polarity">polarité</label>
358+
</div>
359+
</div>
360+
</div>
352361
</div>
353362
</div>
354363
<br>

data/config-dimmer.html.gz

84 Bytes
Binary file not shown.

data/envoy.html.gz

15 Bytes
Binary file not shown.

data/index.html.gz

0 Bytes
Binary file not shown.

platformio.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
[env]
1212
platform = espressif32 @ ~6.10.0 ; passage de la 6.3 à la 6.10 en date du 2025-03-02
13+
; problème avec la version 3 certaines librairies ne le supportent pas
14+
;platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
1315
board = esp32dev
1416
framework = arduino
1517
monitor_speed = 115200

src/config/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ constexpr size_t NTP_UPDATE_INTERVAL_MS = 3600000; /// synch de l'heure toute le
154154
// #define ARDUINO_RUNNING_CORE 1
155155
#endif
156156

157-
#define RELEASE "Version 20250324"
157+
#define RELEASE "Version 20250418"
158158
constexpr const int FS_RELEASE = 20250324;
159159

160160
#ifdef LIGHT_FIRMWARE

src/functions/Mqtt_http_Functions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ WiFiClient espClient;
8080
if (client.connect(pvname.c_str(), configmqtt.username, configmqtt.password)) {
8181
// Once connected, publish online to the availability topic
8282
client.publish(topic.c_str(), "online", true);
83-
client.setKeepAlive(30);
83+
client.setKeepAlive(15);
84+
client.setBufferSize(1024);
8485
logging.Set_log_init(MQTT_connected,true);
8586
Serial.println(MQTT_connected);
8687
} else {

src/functions/homeassistant.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
device_dimmer_boost.Set_name("Boost");
106106
device_dimmer_boost.Set_dev_cla("switch");
107107

108-
client.setBufferSize(1024);
109108
device_routeur.discovery();
110109
device_routed.discovery();
111110
device_dimmer.discovery();

src/functions/shelly.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ int shelly_get_data(String url) {
8787
shelly_watt = 99999;
8888
return shelly_watt;
8989
}
90-
90+
if ( config.polarity == true ) {
91+
powerValue = -powerValue;
92+
}
9193
// affichage dans le sérial de doc["total_power"] en tant que string ;
9294
Serial.println("Shelly Watt : ");
9395
Serial.println(powerValue);

src/functions/webFunctions.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,16 @@ void call_pages() {
247247
getLocalTime( &timeinfo );
248248
snprintf(raison, bufferSize, "reboot manuel: %s", asctime(&timeinfo) );
249249

250-
if (xSemaphoreTake(mutex, portMAX_DELAY)) { // Prend le mutex
251250
client.publish("memory/Routeur", raison, true);
252-
xSemaphoreGive(mutex); // Libère le mutex
253-
}
254251
#endif
255252
request->redirect("/");
253+
yield();
254+
delay(1000);
255+
yield();
256256
delay(1000);
257+
yield();
257258
config.restart = true;
258-
ESP.restart();
259+
//ESP.restart();
259260
});
260261

261262
// reset de la detection dallas précédente

0 commit comments

Comments
 (0)