diff --git a/README.md b/README.md index ce03a42..32caad2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ESP-NOW based window/door sensor for ESP8266. Alternate firmware for Tuya/SmartL 1. When triggered transmits system information, battery status (HIGH/MID/LOW) and sensor status (OPEN/CLOSED). 2. Average response time of 1 second (depends on the MCU of the sensor). -3. In setup/update mode creates an access point named "ESP-NOW Window XXXXXXXXXXXX" with password "12345678" (IP 192.168.4.1). +3. In setup/update mode creates an access point named "ESP-NOW window XXXXXXXXXXXX" with password "12345678" (IP 192.168.4.1). 4. Automatically adds sensor and battery configuration to Home Assistan via MQTT discovery as a binary_sensors (2 different binary_sensor). 5. Possibility firmware update over OTA (if is allows the size of the flash memory). 6. Web interface for settings. @@ -24,7 +24,8 @@ See [here](https://github.com/aZholtikov/ESP-NOW-Window-Door-Sensor/tree/main/ha 1. A gateway is required. For details see [ESP-NOW Gateway](https://github.com/aZholtikov/ESP-NOW-Gateway). 2. ESP-NOW network name must be set same of all another ESP-NOW devices in network. -3. Upload the "data" folder (with web interface) into the filesystem before flashing. -4. For using this firmware on Tuya/SmartLife WiFi window/door sensors, the WiFi module must be replaced with an ESP8266 compatible module (if necessary). -5. Highly recommended connect an external power supply during setup/upgrade. -6. Because this sensor is battery operated, it has an additional controller (MCU) that controls the power of the WiFi module (Module) and transmits data to it for transmission to the network. The communication is done via UART at 9600 speed. Make sure that the protocol is correct before flashing. Details [here](https://github.com/aZholtikov/ESP-NOW-Window-Door-Sensor/tree/main/doc). +3. If encryption is used, the key must be set same of all another ESP-NOW devices in network. +4. Upload the "data" folder (with web interface) into the filesystem before flashing. +5. For using this firmware on Tuya/SmartLife WiFi window/door sensors, the WiFi module must be replaced with an ESP8266 compatible module (if necessary). +6. Highly recommended connect an external power supply during setup/upgrade. +7. Because this sensor is battery operated, it has an additional controller (MCU) that controls the power of the WiFi module (Module) and transmits data to it for transmission to the network. The communication is done via UART at 9600 speed. Make sure that the protocol is correct before flashing. Details [here](https://github.com/aZholtikov/ESP-NOW-Window-Door-Sensor/tree/main/doc). diff --git a/data/function.js b/data/function.js index edd2130..1758539 100755 --- a/data/function.js +++ b/data/function.js @@ -29,7 +29,7 @@ function loadBlock() { } document.getElementsByTagName('body')[0].innerHTML = newString; setFirmvareValue('version', 'firmware'); - setGpioValue('deviceSensorClassSelect', 'deviceSensorClass'); + setGpioValue('deviceClassSelect', 'deviceClass'); handleServerResponse(); } @@ -51,10 +51,9 @@ function sendRequest(submit, server) { } function saveSetting(submit) { - server = "/setting?deviceSensorName=" + getValue('deviceSensorName') - + "&deviceBatteryName=" + getValue('deviceBatteryName') + server = "/setting?deviceName=" + getValue('deviceName') + "&espnowNetName=" + getValue('espnowNetName') - + "&deviceSensorClass=" + getSelectValue('deviceSensorClassSelect'); + + "&deviceClass=" + getSelectValue('deviceClassSelect'); sendRequest(submit, server); alert("Please restart device for changes apply."); } diff --git a/data/index.htm b/data/index.htm index 90f9727..d9c2d5e 100644 --- a/data/index.htm +++ b/data/index.htm @@ -5,12 +5,12 @@ -