diff --git a/html/admin.html b/html/admin.html
index c71143f..5f08b21 100755
--- a/html/admin.html
+++ b/html/admin.html
@@ -454,6 +454,7 @@ window.onload = function() {
success: function(response) {
console.log("Getting SQLite config table:");
console.log(response);
+ window._adminConfig = response;
//device name
const deviceName = document.getElementById("device_name");
deviceName.value = response.deviceName;
@@ -781,8 +782,14 @@ function update_config(param, value){
}
function updateFirmware() {
+ // Check if connected to internet (not in hotspot mode)
+ if (window._adminConfig && window._adminConfig.WIFI_status === 'hotspot') {
+ alert('Mise à jour impossible en mode hotspot.\nConnectez d\'abord le capteur à un réseau WiFi avec accès internet.');
+ return;
+ }
+
console.log("Starting comprehensive firmware update...");
-
+
// Show loading state
const updateBtn = document.getElementById('updateBtn');
const updateBtnText = document.getElementById('updateBtnText');