Skip to content

Commit

Permalink
Перевод. Кнопка обновлений
Browse files Browse the repository at this point in the history
  • Loading branch information
Zud71 committed Nov 25, 2022
1 parent fee6c5c commit ba0385e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 17 deletions.
Binary file modified bin/ZigStarGWRUS.bin
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/Version.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

// AUTO GENERATED FILE, DO NOT EDIT
#ifndef VERSION
#define VERSION "0.1.2"
#define VERSION "0.1.3"
#endif
#ifndef BUILD_TIMESTAMP
#define BUILD_TIMESTAMP "2022-11-24 20:00:00.540593"
#define BUILD_TIMESTAMP "2022-11-25 12:00:00.540593"
#endif

9 changes: 5 additions & 4 deletions src/html.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const char HTTP_ROOT[] PROGMEM =
"<div class='card-header'>Основные</div>"
"<div class='card-body'>"
"<div id='genConfig'>"
"<strong>Сокет : </strong>{{connectedSocket}}"
"<strong>Подключений : </strong>{{connectedSocket}}"
"<br><strong>В работе : </strong>{{uptime}}"
"<br><strong>ESP температура : </strong>{{deviceTemp}} &deg;C"
"{{dsTemp}}"
Expand Down Expand Up @@ -270,8 +270,8 @@ const char HTTP_ROOT[] PROGMEM =
const char HTTP_UPDATE[] PROGMEM =
"<form method='POST' action='#' enctype='multipart/form-data' id='upload_form'>"
"<input type='file' name='update' id='file' onchange='sub(this)' style=display:none accept='.bin'>"
"<label id='file-input' for='file'> Выбрать файл...</label>"
"<input type='submit' class='btn btn-danger mb-2' value='Обновить'>"
"<label id='file-input' for='file'>&nbsp;&nbsp;&nbsp;Выбрать файл...</label>"
"<input type='submit' class='btn btn-danger mb-2' id='updatebtn' value='Обновить' disabled>"
"<br><br>"
"<div id='prg'></div>"
"<br><div id='prgbar'><div id='bar'></div></div><br></form>"
Expand All @@ -288,7 +288,7 @@ const char HTTP_UPDATE[] PROGMEM =
"<button type='button' class='btn btn-warning'>Онлайн-обновление</button>"
"</a>"
"<a style='margin-left: 40px;' class='pull-right' id='downloadupdate'>"
"<button type='button' class='btn btn-success'>Загрузить</button>"
"<button type='button' class='btn btn-success'>Скачать прошивку</button>"
"</a>"
"</div>"
"</div>"
Expand All @@ -306,6 +306,7 @@ const char HTTP_UPDATE[] PROGMEM =
"function sub(obj){"
"var fileName = obj.value.split('\\\\');"
"document.getElementById('file-input').innerHTML = ' '+ fileName[fileName.length-1];"
"$('#updatebtn').prop('disabled', false);"
"};"
"$('form').submit(function(e){"
"e.preventDefault();"
Expand Down
26 changes: 16 additions & 10 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void mqttPublishDiscovery()
#endif

topic = "homeassistant/button/" + deviceName + "/rst_esp/config";
buffJson["name"] = "Restart ESP";
buffJson["name"] = "Перезагрузить ESP";
buffJson["uniq_id"] = deviceName + "/rst_esp";
buffJson["stat_t"] = mtopic + "/io/rst_esp";
buffJson["cmd_t"] = mtopic + "/cmd";
Expand All @@ -291,7 +291,7 @@ void mqttPublishDiscovery()
case 1:
{
topic = "homeassistant/button/" + deviceName + "/rst_zig/config";
buffJson["name"] = "Restart Zigbee";
buffJson["name"] = "Перезагрузить Zigbee";
buffJson["uniq_id"] = deviceName + "/rst_zig";
buffJson["stat_t"] = mtopic + "/io/rst_zig";
buffJson["cmd_t"] = mtopic + "/cmd";
Expand All @@ -305,7 +305,7 @@ void mqttPublishDiscovery()
case 2:
{
topic = "homeassistant/button/" + deviceName + "/enbl_bsl/config";
buffJson["name"] = "Enable BSL";
buffJson["name"] = "Включить BSL";
buffJson["uniq_id"] = deviceName + "/enbl_bsl";
buffJson["stat_t"] = mtopic + "/io/enbl_bsl";
buffJson["cmd_t"] = mtopic + "/cmd";
Expand All @@ -319,7 +319,7 @@ void mqttPublishDiscovery()
case 3:
{
topic = "homeassistant/binary_sensor/" + deviceName + "/socket/config";
buffJson["name"] = "Socket";
buffJson["name"] = "Сокет";
buffJson["uniq_id"] = deviceName + "/socket";
buffJson["stat_t"] = mtopic + "/io/socket";
buffJson["avty_t"] = mtopic + "/avty";
Expand All @@ -330,7 +330,7 @@ void mqttPublishDiscovery()
case 4:
{
topic = "homeassistant/binary_sensor/" + deviceName + "/emrgncMd/config";
buffJson["name"] = "Emergency mode";
buffJson["name"] = "Аварийный режим";
buffJson["uniq_id"] = deviceName + "/emrgncMd";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
Expand All @@ -344,7 +344,7 @@ void mqttPublishDiscovery()
case 5:
{
topic = "homeassistant/sensor/" + deviceName + "/uptime/config";
buffJson["name"] = "Uptime";
buffJson["name"] = "В работе";
buffJson["uniq_id"] = deviceName + "/uptime";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
Expand All @@ -370,20 +370,23 @@ void mqttPublishDiscovery()
case 7:
{
topic = "homeassistant/sensor/" + deviceName + "/temperature/config";
buffJson["name"] = "ESP temperature";
buffJson["name"] = "ESP температура";
buffJson["uniq_id"] = deviceName + "/temperature";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
buffJson["val_tpl"] = "{{ value_json.temperature }}";
buffJson["json_attr_t"] = mtopic + "/state";
buffJson["icon"] = "mdi:coolant-temperature";
buffJson["dev"] = via;
buffJson["dev_cla"] = "temperature";
buffJson["stat_cla"] = "measurement";
buffJson["unit_of_meas"] = "°C";
break;
}
case 8:
{
topic = "homeassistant/sensor/" + deviceName + "/hostname/config";
buffJson["name"] = "Hostname";
buffJson["name"] = "Имя хоста";
buffJson["uniq_id"] = deviceName + "/hostname";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
Expand All @@ -396,7 +399,7 @@ void mqttPublishDiscovery()
case 9:
{
topic = "homeassistant/sensor/" + deviceName + "/connections/config";
buffJson["name"] = "Socket connections";
buffJson["name"] = "Подключений";
buffJson["uniq_id"] = deviceName + "/connections";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
Expand All @@ -409,14 +412,17 @@ void mqttPublishDiscovery()
case 10:
{
topic = "homeassistant/sensor/" + deviceName + "/ow_temperature/config";
buffJson["name"] = "OW temperature";
buffJson["name"] = "OW температура";
buffJson["uniq_id"] = deviceName + "/ow_temperature";
buffJson["stat_t"] = mtopic + "/state";
buffJson["avty_t"] = mtopic + "/avty";
buffJson["val_tpl"] = "{{ value_json.ow_temperature }}";
buffJson["json_attr_t"] = mtopic + "/state";
buffJson["icon"] = "mdi:coolant-temperature";
buffJson["dev"] = via;
buffJson["dev_cla"] = "temperature";
buffJson["stat_cla"] = "measurement";
buffJson["unit_of_meas"] = "°C";
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/websrc/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,4 @@ function getLatestReleaseInfo() {
$("#releaseinfo").fadeIn("slow");
});
}

2 changes: 1 addition & 1 deletion tools/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3

0 comments on commit ba0385e

Please sign in to comment.