Added BOX Balkon, LightTBL D1-Mini

This commit is contained in:
2025-01-18 16:43:46 +03:00
parent a84b1f5ef1
commit 12312977df
6 changed files with 147 additions and 67 deletions

View File

@@ -1,7 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

View File

@@ -7,6 +7,8 @@
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = wemos-d1
[env:esp07]
platform = espressif8266
@@ -15,4 +17,15 @@ framework = arduino
board_build.f_cpu = 26000000L
board_build.ldscript = eagle.flash.1m.ld
upload_protocol = espota
upload_port = 192.168.1.135
upload_port = 192.168.1.135
[env:wemos-d1]
framework = arduino
platform = espressif8266
board = d1_mini
upload_protocol = espota
upload_port = 192.168.1.135
lib_deps =
# RECOMMENDED
# Accept new functionality in a backwards compatible manner and patches
heman/AsyncMqttClient-esphome @ ^2.1.0

View File

@@ -110,13 +110,14 @@ void loop() {
nSec++;
//led_wrk = !led_wrk;
//digitalWrite(LED_WRK, led_wrk);
if(nSec > 59){
if(nSec > 29){
if(mqttClient.connected()){
char v[11];
ultoa(millis(), v, 10);
dtostrf(millis() / 60000.0, 7, 1, v);
//ultoa(millis(), v, 10);
digitalWrite(LED_WRK, LOW);
led_ms = millis();
mqttClient.publish(TOPIC"kuh/ltblmillis", 0, false, v);
mqttClient.publish(TOPIC"kuh/ltblminuts", 0, false, v);
}
nSec = 0;
}
@@ -141,6 +142,7 @@ void connectToWifi() {
void connectToMqtt() {
mqttClient.connect();
mqttClient.setWill(TOPIC"kuh/lighttblOnline", 1, false);
}
void onWifiConnect(const WiFiEventStationModeGotIP& event) {