From 6f21fe72520d463313043e93b3d66a860b335322 Mon Sep 17 00:00:00 2001 From: hans-jurgen Date: Sat, 28 Sep 2024 15:17:09 +0200 Subject: [PATCH] 2024-09-2800 --- platformio.ini | 11 ++++++----- src/main.cpp | 14 +++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/platformio.ini b/platformio.ini index c1a3100..a6a4bec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,9 +12,10 @@ platform = espressif8266 board = d1 framework = arduino -monitor_port = COM6 +monitor_port = /dev/ttyUSB0 monitor_speed = 74800 monitor_filters = time +upload_port = /dev/ttyUSB0 board_build.filesystem = littlefs lib_deps = knolleary/PubSubClient @ 2.8 @@ -35,12 +36,12 @@ build_flags = build_flags = ${env.build_flags} -DDEBUG=0 -DNOADS=1 - -DNAME=\"WETTERSTATIONEPPINGEN\" - -DSTASSID=\"St.-Peters-Gasse-Post\" - -DSTAPSK=\"1952994784599318\" + -DNAME=\"WETTERSTATIONEPPINGEN2\" + -DSTASSID=\"MagentaWLAN-RGDO\" + -DSTAPSK=\"93329248424922704583\" -DGATEWAY=\"192.168.127.1\" -DDNS=\"192.168.127.1\" - -DKMYIP=\"192.168.127.48\" + -DKMYIP=\"192.168.127.45\" -Dmqtt_server=\"hjkmqtt.dedyn.io\" -Dmqtt_port=61883 -DTERROR=5 diff --git a/src/main.cpp b/src/main.cpp index f716233..3ca25ce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ void pulse_pin(uint8_t pin); WiFiClientSecure espClient; PubSubClient client(espClient); -#include +//#include #include @@ -109,14 +109,14 @@ void setup() { //digitalWrite(BUILTIN_LED, HIGH); //Serial.print("STATUS (Systemmeldung): "); Serial.println(SystemStatus); #if (MQTT == 0) - init_HTU21(); - Init_BMP280(); + //init_HTU21(); + //Init_BMP280(); initADS(); init_MCP9808(); #endif //AKKU = getBattery(korectur); // ca. 170 ms // ca. 280 ms - read_HTU21D(); + //read_HTU21D(); read_BMP_280(); //MessungADS(); setup_wifi(); // ca. 4,5 s @@ -131,7 +131,7 @@ void setup() { Serial.print("ID: \t\t"); Serial.println(deviceId); // ca. 5 s - espClient.setFingerprint(mqtt_fprint); + //espClient.setFingerprint(mqtt_fprint); client.setServer(mqtt_server, mqtt_port); client.setCallback(callback); //---------- @@ -147,7 +147,7 @@ void loop() { int currentMillis = millis(); if (currentMillis - previousMillis >= 10000) { previousMillis = currentMillis; - read_HTU21D(); + //read_HTU21D(); read_BMP_280(); valTemp = getTemperature_MCP9808(); #if(NOADS== 1) @@ -158,7 +158,7 @@ void loop() { client.publish(topic, ADSData.Solar, true); #endif #if(MQTT == 0) - M2M_HTU21D(hostname.c_str()); + //M2M_HTU21D(hostname.c_str()); M2M_BMP280(hostname.c_str()); M2M_Temperatur_MCP9808(hostname.c_str()); #endif