From 501bcf3e99dd7bd4e23bf4282c962920fb1ca0c3 Mon Sep 17 00:00:00 2001 From: tommarek <80095089+tommarekCZE@users.noreply.github.com> Date: Mon, 5 Aug 2024 20:23:16 +0200 Subject: [PATCH 01/31] Update ESP_Code.ino Fix the error ESP_CODE:350_16: error: macro names must be identifiers --- ESP_Code/ESP_Code.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 690f01f6..f34f6e56 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -347,7 +347,7 @@ namespace { wait_passes = 0; } } - #ifndef(ESP8266) + #if !defined(ESP8266) WiFi.config(WiFi.localIP(), WiFi.gatewayIP(), WiFi.subnetMask(), DNS_SERVER); #endif From 8b2dccba60c261b9627cbb2c10a3bf729dcd6ed3 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:40:34 +0200 Subject: [PATCH 02/31] Blushybox improvements --- ESP_Code/ESP_Code.ino | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index f34f6e56..c092842d 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -152,6 +152,13 @@ void RestartESP(String msg) { #endif } +#if defined(BLUSHYBOX) + Ticker blinker; + void changeState() { + digitalWrite(LED_BUILTIN, !(digitalRead(LED_BUILTIN))); + } +#endif + #if defined(ESP8266) // WDT Loop // See lwdtcb() and lwdtFeed() below @@ -651,14 +658,24 @@ void setup() { wifiManager.addParameter(&custom_duco_username); wifiManager.addParameter(&custom_duco_password); wifiManager.addParameter(&custom_duco_rigid); - - //blinker.attach_ms(200, changeState); + + #if defined(BLUSHYBOX) + blinker.attach_ms(200, changeState); + #endif wifiManager.autoConnect("Duino-Coin"); - //blinker.detach(); + #if defined(BLUSHYBOX) + blinker.detach(); + #endif #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) display_info("Waiting for node..."); #endif + #if defined(BLUSHYBOX) + blinker.attach_ms(500, changeState); + #endif SelectNode(); + #if defined(BLUSHYBOX) + blinker.detach(); + #endif #else #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) display_info("Waiting for WiFi..."); From f094b625603652a4ec0d33f73c09ee3e11f52a31 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:40:52 +0200 Subject: [PATCH 03/31] Blushybox improvements --- ESP_Code/MiningJob.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ESP_Code/MiningJob.h b/ESP_Code/MiningJob.h index 7384735c..bb200914 100644 --- a/ESP_Code/MiningJob.h +++ b/ESP_Code/MiningJob.h @@ -108,7 +108,14 @@ class MiningJob { int start_time = micros(); max_micros_elapsed(start_time, 0); #if defined(LED_BLINKING) - digitalWrite(LED_BUILTIN, LOW); + #if defined(BLUSHYBOX) + for (int i = 0; i < 72; i++) { + analogWrite(LED_BUILTIN, i); + delay(1); + } + #else + digitalWrite(LED_BUILTIN, LOW); + #endif #endif for (Counter<10> counter; counter < difficulty; ++counter) { DSHA1 ctx = *dsha1; @@ -132,7 +139,10 @@ class MiningJob { #if defined(LED_BLINKING) #if defined(BLUSHYBOX) - analogWrite(LED_BUILTIN, 200); + for (int i = 72; i > 0; i--) { + analogWrite(LED_BUILTIN, i); + delay(1); + } #else digitalWrite(LED_BUILTIN, HIGH); #endif From 2fe418c966e3d635e5914df4f972f9ca6899b1ba Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:50:38 +0200 Subject: [PATCH 04/31] Display IoT values in dashboard --- ESP_Code/ESP_Code.ino | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index c092842d..6e907d50 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -458,6 +458,26 @@ namespace { #else s.replace("@@RESET_SETTINGS@@", ""); #endif + + #if defined(USE_DS18B20) + sensors.requestTemperatures(); + float temp = sensors.getTempCByIndex(0); + s.replace("@@SENSOR@@", "DS18B20: " + String(temp) + "*C"); + #elif defined(USE_DHT) + float temp = dht.readTemperature(); + float hum = dht.readHumidity(); + s.replace("@@SENSOR@@", "DHT11/22: " + String(temp) + "*C, " + String(hum) + "rh%"); + #elif defined(USE_HSU07M) + float temp = read_hsu07m(); + s.replace("@@SENSOR@@", "HSU07M: " + String(temp) + "*C"); + #elif defined(USE_INTERNAL_SENSOR) + float temp = 0; + temp_sensor_read_celsius(&temp); + s.replace("@@SENSOR@@", "CPU: " + String(temp) + "*C"); + #else + s.replace("@@SENSOR@@", "None"); + #endif + server.send(200, "text/html", s); } #endif From a919f58f42d90aeba2022b5b4b748750dbe629bd Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:50:58 +0200 Subject: [PATCH 05/31] Place for IoT data --- ESP_Code/Dashboard.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ESP_Code/Dashboard.h b/ESP_Code/Dashboard.h index 1e737174..a0239213 100644 --- a/ESP_Code/Dashboard.h +++ b/ESP_Code/Dashboard.h @@ -112,6 +112,14 @@ const char WEBSITE[] PROGMEM = R"=====( Miner version +
+
= + @@SENSOR@@ +
+
+ Sensor reading(s) +
+
From e46c24e501d7798603037ded0b9524acfd534f0c Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:52:42 +0200 Subject: [PATCH 06/31] Fix a typo --- ESP_Code/Dashboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/Dashboard.h b/ESP_Code/Dashboard.h index a0239213..30c88924 100644 --- a/ESP_Code/Dashboard.h +++ b/ESP_Code/Dashboard.h @@ -113,7 +113,7 @@ const char WEBSITE[] PROGMEM = R"=====(
-
= +
@@SENSOR@@
From 60af53db133182b028604f401c27d0a7bc93cd51 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:11:58 +0200 Subject: [PATCH 07/31] Make DS18B20 work with ESP32 --- ESP_Code/Settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 13bc34fc..22fbaf03 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -121,7 +121,7 @@ extern unsigned int ping = 0; #include #include // Change 12 to the pin you've connected your sensor to - #define DSPIN 12 + const int DSPIN = 12; OneWire oneWire(DSPIN); DallasTemperature extern sensors(&oneWire); From 92623187239b98a902bef72b8a37da611ac69b9d Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:47:27 +0200 Subject: [PATCH 08/31] Improved http connection logic and blushybox ESP32 LED fix --- ESP_Code/ESP_Code.ino | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 6e907d50..4d7a170c 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -154,8 +154,10 @@ void RestartESP(String msg) { #if defined(BLUSHYBOX) Ticker blinker; + bool lastLedState = false; void changeState() { - digitalWrite(LED_BUILTIN, !(digitalRead(LED_BUILTIN))); + analogWrite(LED_BUILTIN, lastLedState ? 255 : 0); + lastLedState = !lastLedState; } #endif @@ -218,28 +220,31 @@ namespace { String httpGetString(String URL) { String payload = ""; - WiFiClientSecure *client = new WiFiClientSecure; - client->setInsecure(); - client->setTimeout(10000); - HTTPClient http; - http.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS); - - if (http.begin(*client, URL)) { - int httpCode = http.GET(); - - if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) - payload = http.getString(); - else + + WiFiClientSecure client; + HTTPClient https; + client.setInsecure(); + + https.begin(client, URL); + https.addHeader("Accept", "*/*"); + https.addHeader("User-Agent", "ESP8266"); + + int httpCode = https.GET(); + #if defined(SERIAL_PRINTING) + Serial.printf("HTTP Response code: %d\n", httpCode); + #endif + + if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) { + payload = https.getString(); + } else { #if defined(SERIAL_PRINTING) - Serial.printf("Error fetching node from poolpicker: %s\n", http.errorToString(httpCode).c_str()); + Serial.printf("Error fetching node from poolpicker: %s\n", https.errorToString(httpCode).c_str()); #endif #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) display_info(http.errorToString(httpCode)); #endif - - http.end(); } - delete client; + https.end(); return payload; } @@ -252,9 +257,10 @@ namespace { #if defined(SERIAL_PRINTING) Serial.println("Fetching mining node from the poolpicker in " + String(waitTime) + "s"); #endif + delay(waitTime * 1000); + input = httpGetString("https://server.duinocoin.com/getPool"); - delay(waitTime * 1000); // Increase wait time till a maximum of 32 seconds // (addresses: Limit connection requests on failure in ESP boards #1041) waitTime *= 2; From 5d646986c951fde18f5cb695f15f693f9aa6eda3 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 16 Aug 2024 22:48:12 +0200 Subject: [PATCH 09/31] Remove unused header --- ESP_Code/ESP_Code.ino | 1 - 1 file changed, 1 deletion(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 4d7a170c..86249421 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -227,7 +227,6 @@ namespace { https.begin(client, URL); https.addHeader("Accept", "*/*"); - https.addHeader("User-Agent", "ESP8266"); int httpCode = https.GET(); #if defined(SERIAL_PRINTING) From 735ae0e16e5a1c460e0b6bc25be7f0aeee887b7f Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sat, 17 Aug 2024 11:36:57 +0200 Subject: [PATCH 10/31] Possible esp32 wifi fix --- ESP_Code/ESP_Code.ino | 73 ++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 86249421..29f71200 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -218,6 +218,30 @@ namespace { #endif } + void VerifyWifi() { + #ifdef USE_LAN + while ((!eth_connected) || (ETH.localIP() == IPAddress(0, 0, 0, 0))) { + #if defined(SERIAL_PRINTING) + Serial.println("Ethernet connection lost. Reconnect..." ); + #endif + SetupWifi(); + } + #else + while (WiFi.status() != WL_CONNECTED + || WiFi.localIP() == IPAddress(0, 0, 0, 0) + || WiFi.localIP() == IPAddress(192, 168, 4, 2) + || WiFi.localIP() == IPAddress(192, 168, 4, 3)) { + #if defined(SERIAL_PRINTING) + Serial.println("WiFi reconnecting..."); + #endif + WiFi.disconnect(); + delay(200); + WiFi.reconnect(); + delay(200); + } + #endif + } + String httpGetString(String URL) { String payload = ""; @@ -238,6 +262,7 @@ namespace { } else { #if defined(SERIAL_PRINTING) Serial.printf("Error fetching node from poolpicker: %s\n", https.errorToString(httpCode).c_str()); + VerifyWifi(); #endif #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) display_info(http.errorToString(httpCode)); @@ -311,7 +336,6 @@ namespace { #endif void SetupWifi() { - #ifdef USE_LAN #if defined(SERIAL_PRINTING) Serial.println("Connecting to Ethernet..."); @@ -319,7 +343,6 @@ namespace { WiFi.onEvent(WiFiEvent); // Will call WiFiEvent() from another thread. ETH.begin(); - while (!eth_connected) { delay(500); #if defined(SERIAL_PRINTING) @@ -339,34 +362,18 @@ namespace { Serial.println("Connecting to: " + String(SSID)); #endif - WiFi.mode(WIFI_STA); // Setup ESP in client mode - #if defined(ESP8266) - WiFi.setSleepMode(WIFI_NONE_SLEEP); - #else - WiFi.setSleep(false); - #endif WiFi.begin(SSID, PASSWORD); + VerifyWifi(); - int wait_passes = 0; - while (WiFi.waitForConnectResult() != WL_CONNECTED || WiFi.localIP() == IPAddress(192, 168, 4, 2)) { - delay(500); - #if defined(SERIAL_PRINTING) - Serial.print("."); - #endif - if (++wait_passes >= 10) { - WiFi.disconnect(); - WiFi.begin(SSID, PASSWORD); - wait_passes = 0; - } - } #if !defined(ESP8266) WiFi.config(WiFi.localIP(), WiFi.gatewayIP(), WiFi.subnetMask(), DNS_SERVER); #endif #if defined(SERIAL_PRINTING) Serial.println("\n\nSuccessfully connected to WiFi"); - Serial.println("Local IP address: " + WiFi.localIP().toString()); Serial.println("Rig name: " + String(RIG_IDENTIFIER)); + Serial.println("Local IP address: " + WiFi.localIP().toString()); + Serial.println("Gateway: " + WiFi.gatewayIP().toString()); Serial.println("DNS: " + WiFi.dnsIP().toString()); Serial.println(); #endif @@ -415,20 +422,6 @@ namespace { ArduinoOTA.begin(); } - void VerifyWifi() { - #ifdef USE_LAN - while ((!eth_connected) || (ETH.localIP() == IPAddress(0, 0, 0, 0))) { - #if defined(SERIAL_PRINTING) - Serial.println("Ethernet connection lost. Reconnect..." ); - #endif - SetupWifi(); - } - #else - while (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IPAddress(0, 0, 0, 0)) - WiFi.reconnect(); - #endif - } - #if defined(WEB_DASHBOARD) void dashboard() { #if defined(SERIAL_PRINTING) @@ -635,6 +628,14 @@ void setup() { #endif #endif + WiFi.mode(WIFI_STA); // Setup ESP in client mode + WiFi.disconnect(true); + #if defined(ESP8266) + WiFi.setSleepMode(WIFI_NONE_SLEEP); + #else + WiFi.setSleep(false); + #endif + #if defined(CAPTIVE_PORTAL) preferences.begin("duino_config", false); strcpy(duco_username, preferences.getString("duco_username", "username").c_str()); @@ -688,9 +689,11 @@ void setup() { blinker.attach_ms(200, changeState); #endif wifiManager.autoConnect("Duino-Coin"); + VerifyWifi(); #if defined(BLUSHYBOX) blinker.detach(); #endif + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) display_info("Waiting for node..."); #endif From f8b62fcc7ef5fa8109db46ad144f4358957384d9 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:20:59 +0200 Subject: [PATCH 11/31] Fix ESP32C3 infinite reboot --- ESP_Code/Settings.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 22fbaf03..9a57d46a 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -92,11 +92,21 @@ extern const char PASSWORD[] = "PASSW0RD"; // ESP8266 #define LED_BUILTIN 2 #elif defined(CONFIG_FREERTOS_UNICORE) - // ESP32-S2 - #define LED_BUILTIN 15 + #if defined(CONFIG_IDF_TARGET_ESP32C3) + // ESP32-C3 + #define LED_BUILTIN 8 + #else + // ESP32-S2 + #define LED_BUILTIN 15 + #endif #else // ESP32 - #define LED_BUILTIN 2 + #ifndef LED_BUILTIN + #define LED_BUILTIN 2 + #endif + #if defined(BLUSHYBOX) + #define LED_BUILTIN 4 + #endif #endif #define BLINK_SETUP_COMPLETE 2 From b89c2d0e3049248d498784ac7c8b1f2748bc399d Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:06:50 +0200 Subject: [PATCH 12/31] Version bump --- ESP_Code/Settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 9a57d46a..70f39a4c 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -112,7 +112,7 @@ extern const char PASSWORD[] = "PASSW0RD"; #define BLINK_SETUP_COMPLETE 2 #define BLINK_CLIENT_CONNECT 5 -#define SOFTWARE_VERSION "4.2" +#define SOFTWARE_VERSION "4.3" extern unsigned int hashrate = 0; extern unsigned int hashrate_core_two = 0; extern unsigned int difficulty = 0; From 0b4f0b8eac5b1b526b3885952ce88f3491b398cc Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:07:16 +0200 Subject: [PATCH 13/31] Possible fix for #1813 --- ESP_Code/ESP_Code.ino | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 29f71200..e0fa6171 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -3,7 +3,7 @@ ( _ \( )( )(_ _)( \( )( _ )___ / __)( _ )(_ _)( \( ) )(_) ))(__)( _)(_ ) ( )(_)((___)( (__ )(_)( _)(_ ) ( (____/(______)(____)(_)\_)(_____) \___)(_____)(____)(_)\_) - Official code for all ESP8266/32 boards version 4.2 + Official code for all ESP8266/32 boards version 4.3 Main .ino file The Duino-Coin Team & Community 2019-2024 © MIT Licensed @@ -235,9 +235,9 @@ namespace { Serial.println("WiFi reconnecting..."); #endif WiFi.disconnect(); - delay(200); + delay(500); WiFi.reconnect(); - delay(200); + delay(500); } #endif } @@ -363,6 +363,10 @@ namespace { #endif WiFi.begin(SSID, PASSWORD); + while(WiFi.status() != WL_CONNECTED) { + Serial.print("."); + delay(100); + } VerifyWifi(); #if !defined(ESP8266) @@ -629,7 +633,7 @@ void setup() { #endif WiFi.mode(WIFI_STA); // Setup ESP in client mode - WiFi.disconnect(true); + //WiFi.disconnect(true); #if defined(ESP8266) WiFi.setSleepMode(WIFI_NONE_SLEEP); #else @@ -689,6 +693,7 @@ void setup() { blinker.attach_ms(200, changeState); #endif wifiManager.autoConnect("Duino-Coin"); + delay(1000); VerifyWifi(); #if defined(BLUSHYBOX) blinker.detach(); From 29b5766d97fd03b3de1c64536bb1ea78fbca9bd2 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:08:40 +0200 Subject: [PATCH 14/31] Update README.md --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a2cf0a5c..970ae86e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ -

+

@@ -52,7 +52,7 @@ -

+ @@ -236,7 +236,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r ## License -Duino-Coin is mostly distributed under the MIT License. See the `LICENSE` file for more information. +Duino-Coin is mostly distributed under the MIT License. See the `LICENSE` file for more information.
Some third-party included files may have different licenses - please check their `LICENSE` statements (usually at the top of the source code files). @@ -253,17 +253,8 @@ Our disclaimer is available here:
dui ## Active project maintainers -* [@revoxhere](https://github.com/revoxhere/) - robik123.345@gmail.com (Lead Python dev, project founder) -* [@Bilaboz](https://github.com/bilaboz/) (Lead NodeJS dev) -* [@Tech1k](https://github.com/Tech1k/) - hello@kristiankramer.net (Lead Webmaster and DUCO Developer) -* [@ygboucherk](https://github.com/ygboucherk) ([wDUCO](https://github.com/ygboucherk/wrapped-duino-coin-v2) dev) - - - - - - -Big thanks to all the [contributors](https://github.com/revoxhere/duino-coin/graphs/contributors) that helped to develop the Duino-Coin project. +Originally created and maintained by [@revoxhere](https://github.com/revoxhere).
+Big thanks to all the [contributors](https://github.com/revoxhere/duino-coin/graphs/contributors) that helped to develop the Duino-Coin project.
Visit [duinocoin.com/team](https://duinocoin.com/team.html) to view more information about the Duino Team.
From df17374fd8234f4bfaeeda3ab4f0852ee0f9bb75 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:13:06 +0200 Subject: [PATCH 15/31] Fix http to https typo --- ESP_Code/ESP_Code.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index e0fa6171..bca421c3 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -265,7 +265,7 @@ namespace { VerifyWifi(); #endif #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) - display_info(http.errorToString(httpCode)); + display_info(https.errorToString(httpCode)); #endif } https.end(); From 5d93c4ba87854b97571463dd0fe4509701f89203 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:10:29 +0200 Subject: [PATCH 16/31] Update wallet string --- Resources/PC_Miner_langs.json | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Resources/PC_Miner_langs.json b/Resources/PC_Miner_langs.json index 63e225f1..362c1eb6 100644 --- a/Resources/PC_Miner_langs.json +++ b/Resources/PC_Miner_langs.json @@ -24,8 +24,8 @@ "basic_config_tool": "\nDuino-Coin basic configuration tool\nEdit ", "edit_config_file_warning": "/Miner_config.cfg file later if you want to change it.", "dont_have_account": "Don't have an Duino-Coin account yet? Use ", - "wallet": "Wallet", - "register_warning": " to register on server.\n", + "wallet": "https://wallet.duinocoin.com", + "register_warning": " to register on the network.\n", "ask_username": "Enter your Duino-Coin username: ", "ask_intensity": "Set mining intensity (1-100)% (recommended: 95): ", "ask_threads": "Set mining threads (recommended for your system: ", @@ -136,7 +136,7 @@ "basic_config_tool": "\nalat konfigurasi dasar Duino-Coin \nRubah ", "edit_config_file_warning": "file /Miner_config.cfg jika ingin merubahnya nanti.", "dont_have_account": "Belum memiliki akun Duino-Coin? Gunakan ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " untuk mendaftar ke server.\n", "ask_username": "Masukan username Duino-Coinmu: ", "ask_intensity": "Atur intensitas miningmu (1-100)% (direkomendasikan: 95): ", @@ -232,7 +232,7 @@ "basic_config_tool": "\nDuino-Coin 기본 도구\n", "edit_config_file_warning": "/Miner_config.cfg 파일을 변경하려면 나중에 편집 하세요.", "dont_have_account": "아직 Duino-Coin 계정이 없으신가요? ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": "을 사용해서 계정을 생성(register)하세요.\n", "ask_username": "Duino-Coin 사용자 이름을 입력하세요: ", "ask_intensity": "채굴 강도 설정 (1-100)% (추천 : 95): ", @@ -323,7 +323,7 @@ "basic_config_tool": "ابزار پیکربندی اولیه دوین کوین\n ویرایش ", "edit_config_file_warning": "/Miner_config.cfg اگر بعداًبخواهید آن را تغییر دهید.", "dont_have_account": "هنوز حساب دوین کوین ندارید؟ استفاده کنید", - "wallet": "حساب", + "wallet": "https://wallet.duinocoin.com", "register_warning": " برای ثبت نام در سرور.\n", "ask_username": " نام کاربری دوین کوین خود را وارد کنید: ", "ask_intensity": " تنظیم شدت استخراج (1-100)% (توصیه می شود: 95): ", @@ -414,7 +414,7 @@ "basic_config_tool": "\nZákladný konfiguračný nástroj Duino-Coin\nUpravte ", "edit_config_file_warning": "/Súbor Miner_config.cfg neskôr, ak ho chcete zmeniť.", "dont_have_account": "Ešte nemáte Duino-Coin účet? Použite ", - "wallet": "Peňaženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " na zaregistrovanie sa na serveri.\n", "ask_username": "Zadajte svoje používateľské meno Duino-Coin: ", "ask_intensity": "Nastaviť intenzitu ťažby (1 – 100) % (odporúčané: 95): ", @@ -505,7 +505,7 @@ "basic_config_tool": "\nStrumento base di configurazione Duino-Coin\nModifica ", "edit_config_file_warning": "/Miner_config.cfg più tardi se vuoi cambiarlo.", "dont_have_account": "Non hai ancora un account Duino-Coin? Usa ", - "wallet": "Portafoglio (Wallet)", + "wallet": "https://wallet.duinocoin.com", "register_warning": " per registrarti sul server.\n", "ask_username": "Inserisci il tuo nome utente di Duino-Coin: ", "ask_intensity": "Imposta l'intensità di mining (1-100)% (raccomandato: 95): ", @@ -578,8 +578,8 @@ "rig_identifier": "Identyfikator koparki: ", "basic_config_tool": "\nKreator pliku konfiguracyjnego Duino-Coin\nEdytuj plik ", "edit_config_file_warning": "/Miner_config.cfg jeżeli chcesz coś poźniej zmienić.", - "dont_have_account": "Nie posiadasz konta Duino-Coin? Użyj ", - "wallet": "Wallet (Portfel)", + "dont_have_account": "Nie posiadasz konta Duino-Coin? Wejdź na ", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby zarejestrować się na sieci.\n", "ask_username": "Wprowadź swoją nazwę użytkownika Duino-Coin: ", "ask_intensity": "Wprowadź intensywność kopania (1-100)% (zalecane: 95): ", @@ -685,7 +685,7 @@ "basic_config_tool": "\nBásica herramienta de configuración de Duino-Coin\nEdita ", "edit_config_file_warning": "el archivo /Miner_config.cfg después si quieres cambiar algo..", "dont_have_account": "No tienes una cuenta Duino-Coin todavía? Usa ", - "wallet": "Monedero", + "wallet": "https://wallet.duinocoin.com", "register_warning": " para registrarse en el servidor.\n", "ask_username": "Introduce tu usuario de Duino-Coin: ", "ask_intensity": "Ajusta la intensidad de minado (1-100)% (recomendado: 95): ", @@ -755,7 +755,7 @@ "basic_config_tool": "\nEditeur de configuration Duino-Coin\nEditez ", "edit_config_file_warning": "le fichier /Miner_config.cfg si vous voulez changer votre configuration ultérieurement.", "dont_have_account": "Vous n'avez pas encore de compte Duino-Coin ? Utilisez ", - "wallet": "Portefeuille", + "wallet": "https://wallet.duinocoin.com", "register_warning": " pour en créer un.\n", "ask_username": "Entrez votre nom d'utilisateur Duino-Coin : ", "ask_intensity": "Choisissez l'intensité de minage (1-100)% (recommandé: 95) : ", @@ -848,7 +848,7 @@ "basic_config_tool": "\nИнструмент базовой настройки Duino-Coin\nОтредактируйте файл ", "edit_config_file_warning": "/Miner_config.cfg если вы захотите их изменить.", "dont_have_account": "Еще нет аккаунта Duino-Coin? Используйте ", - "wallet": "Кошелек", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для регистрации на сервере.\n", "ask_username": "Введите ваше имя пользователя Duino-Coin: ", "ask_intensity": "Установите мощность майнинга (1-100)% (рекомендуется: 95): ", @@ -919,7 +919,7 @@ "basic_config_tool": "\nІнструмент базових налаштувань Duino-Coin\nВідредагуйте файл ", "edit_config_file_warning": "/Miner_config.cfg якщо ви захочете їх змінити.", "dont_have_account": "Ще немає акаунту Duino-Coin? Використовуйте ", - "wallet": "Гаманець", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для реєстрації на сервері.\n", "ask_username": "Введіть ім'я користувача Duino-Coin: ", "ask_intensity": "Встановіть потужність майнінгу (1-100)% (рекомендовано: 95): ", @@ -1015,7 +1015,7 @@ "basic_config_tool": "\nDuino-Coin simples Konfigurationstool\nBearbeite ", "edit_config_file_warning": "/Miner_config.cfg wenn du später Einstellungen verändern möchtest.", "dont_have_account": "Du hast noch keinen Duino-Coin Account? Benutze ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " um dich zu registrieren.\n", "ask_username": "Gib deinen Duino-Coin Nutzernamen ein: ", "ask_intensity": "Wie viel Prozent der Leistung soll Duino-Coin verwenden? (1-100)% (empfohlen: 95): ", @@ -1121,7 +1121,7 @@ "basic_config_tool": "\nDuino-Coin 基础配置工具\n编辑 ", "edit_config_file_warning": "/如果要更改 Miner_config.cfg 文件,请稍后。", "dont_have_account": "还没有Duino-Coin帐户吗? 使用 ", - "wallet": "钱包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在服务器上注册个。\n", "ask_username": "输入您的 Duino-Coin 用户名: ", "ask_intensity": "设定挖矿强度(1-100)%(建议:95): ", @@ -1192,7 +1192,7 @@ "basic_config_tool": "\nDuino-Coin 基本設定工具\n編輯 ", "edit_config_file_warning": "/如果要修改 Miner_config.cfg 文件,請稍等。", "dont_have_account": "還沒有Duino-Coin帳號嗎? 使用 ", - "wallet": "錢包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在伺服器上註冊。\n", "ask_username": "輸入您的 Duino-Coin 用户名稱: ", "ask_intensity": "設定挖礦難度(1-100)%(建議:95): ", @@ -1263,7 +1263,7 @@ "basic_config_tool": "\nDuino-Coin yapılandırma aracı\nDüzenleyin ", "edit_config_file_warning": "/Miner_config.cfg dosyasını eğer daha sonra değiştirmek istiyorsanız.", "dont_have_account": "Henüz bir Duino-Coin hesabınız yok mu? Kullanın ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": " sunucuya kayıt olmak için.\n", "ask_username": "Duino-Coin kullanıcı adınızı girin: ", "ask_intensity": "Madencilik gücünü seçin (1-100)% (önerilen: 95): ", @@ -1334,7 +1334,7 @@ "basic_config_tool": "\nFerramenta de configuração básica do Duino-Coin\nEdita ", "edit_config_file_warning": "Se você quiser trocar as configurações mais tarde /Miner_config.cfg é o arquivo.", "dont_have_account": "Você já tem uma conta no Duino-Coin? Se sim use-a.", - "wallet": "Carteira", + "wallet": "https://wallet.duinocoin.com", "register_warning": " Pare se registrar no servidor.\n", "ask_username": "Seu nome na Duino-Coin: ", "ask_intensity": "Intensidade da Mineração (1-100)% (recomendado: 95): ", @@ -1418,7 +1418,7 @@ "basic_config_tool": "\nWizard tal-Fajl tal-Konfigurazzjoni tad-Duino-Coin \nEdit File", "edit_config_file_warning": "/Miner_config.cfg jekk trid tibdel xi ħaġa aktar tard.", "dont_have_account": "M'għandekx kont Duino-Coin? Uża", - "wallet": "Kartiera (Kartiera)", + "wallet": "https://wallet.duinocoin.com", "register_warning": "biex tirreġistra fuq il-web. \n", "ask_username": "Daħħal l-username ta 'Duino-Coin tiegħek:", "ports_message": "Il-wizard tal-konfigurazzjoni sab il-portijiet li ġejjin:", @@ -1491,7 +1491,7 @@ "basic_config_tool": "\nDuino-Coin เครื่องมือการตั้งค่าพื้นฐาน\nแก้ไข ", "edit_config_file_warning": "ไฟล์ /Miner_config.cfg ภายหลังหากคุณต้องการเปลี่ยนแปลง", "dont_have_account": "ยังไม่มีบัญชี Duino-Coin? ใช้ ", - "wallet": "วอลเล็ท", + "wallet": "https://wallet.duinocoin.com", "register_warning": " เพื่อลงทะเบียนบนเซิร์ฟเวอร์\n", "ask_username": "ใส่ชื่อผู้ใช้ Duino-Coin: ", "ask_intensity": "ตั้งค่าความแรงในการขุดS (1-100)% (แนะนำ: 95): ", @@ -1582,7 +1582,7 @@ "basic_config_tool": "\nDuino-Coin बुनियादी विन्यास उपकरण\nपरिवर्तन ", "edit_config_file_warning": "/Miner_config.cfg बाद में फ़ाइल करें यदि आप इसे बदलना चाहते हैं.", "dont_have_account": "क्या आपके पास अभी तक डुइनो-कॉइन खाता नहीं है? इस का उपयोग करें ", - "wallet": "वॉलेट", + "wallet": "https://wallet.duinocoin.com", "register_warning": " सर्वर पर रजिस्टर करने के लिए।\n", "ask_username": "अपना डुइनो-कॉइन उपयोगकर्ता नाम दर्ज करें: ", "ask_intensity": "खनन तीव्रता (1-100)% सेट करें (अनुशंसित: 95): ", @@ -1678,7 +1678,7 @@ "basic_config_tool": "\nDuino-Coin základní konfigurační nástroj\nUprav ", "edit_config_file_warning": "/Miner_config.cfg soubor můžeš editovat později, pokud ho budeš chtít změnit.", "dont_have_account": "Ještě nemáš Duino-Coin účet? Použij ", - "wallet": "Peněženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " registruj se na serveru.\n", "ask_username": "Zadej své Duino-Coin uživatelské jméno: ", "ask_intensity": "Nastav intenzitu těžby (1-100)% (doporučeno: 95): ", @@ -1789,7 +1789,7 @@ "basic_config_tool": "\nDuino-Coin基本設定ツール\n編集 ", "edit_config_file_warning": "/Miner_config.cfgファイルを後で変更したい場合。", "dont_have_account": "をまだお持ちでない方はこちらを使用 ", - "wallet": "ウォレット", + "wallet": "https://wallet.duinocoin.com", "register_warning": " をクリックしてサーバーに登録します。\n", "ask_username": "Duino-Coinのユーザー名を入力します: ", "ask_intensity": "マイナー強度(1~100)%(推奨:95)を設定: ", @@ -1894,7 +1894,7 @@ "basic_config_tool": "\nDuino-Coin perusasetustyökalu\nMuokkaa ", "edit_config_file_warning": "/Miner_config.cfg -tiedostoa myöhemmin, jos haluat muuttaa asetuksia.", "dont_have_account": "Eikö sinulla ole vielä Duino-Coin-tiliä? Käytä ", - "wallet": "Lompakko", + "wallet": "https://wallet.duinocoin.com", "register_warning": " rekisteröityäksesi palvelimelle.\n", "ask_username": "Syötä Duino-Coin-käyttäjätunnuksesi: ", "ask_intensity": "Aseta louhintaintensiteetti (1-100)% (suositus: 95): ", From e81c8d591293dfe3b572d25d7823592d4580b7bd Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:11:34 +0200 Subject: [PATCH 17/31] Update wallet string --- Resources/AVR_Miner_langs.json | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Resources/AVR_Miner_langs.json b/Resources/AVR_Miner_langs.json index c7fd5c43..1bb2db73 100644 --- a/Resources/AVR_Miner_langs.json +++ b/Resources/AVR_Miner_langs.json @@ -16,8 +16,8 @@ "basic_config_tool": "\nDuino-Coin basic configuration tool\nEdit ", "edit_config_file_warning": "/Miner_config.cfg file later if you want to change it.", "dont_have_account": "Don't have an Duino-Coin account yet? Use ", - "wallet": "Wallet", - "register_warning": " to register on server.\n", + "wallet": "https://wallet.duinocoin.com", + "register_warning": " to register on the network.\n", "ask_username": "Enter your Duino-Coin username: ", "ports_message": "Configuration tool has found the following ports:", "ports_notice": "If you can't see your board here, make sure the it is properly connected and the program has access to it (admin/sudo rights).", @@ -115,7 +115,7 @@ "basic_config_tool": "\nalat konfigurasi dasar Duino-Coin \nRubah ", "edit_config_file_warning": "file /Miner_config.cfg jika ingin merubahnya nanti.", "dont_have_account": "Belum memiliki akun Duino-Coin? Gunakan ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " untuk mendaftar ke server.\n", "ask_username": "Masukan username Duino-Coinmu: ", "ports_message": "Alat konfigurasi telah menemukan port berikut:", @@ -200,7 +200,7 @@ "basic_config_tool": "\nDuino-Coin základní konfigurační nástroj\nEdit ", "edit_config_file_warning": "/Miner_config.cfg soubor můžeš editovat později.", "dont_have_account": "Ještě nemáš Duino-Coin účet? Použij ", - "wallet": "Peněženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby ses registroval se na serveru.\n", "ask_username": "Zadej své Duino-Coin uživatelské jméno: ", "ports_message": "Konfigurační nástroj našel desky na následujících portech:", @@ -299,7 +299,7 @@ "basic_config_tool": "\nDuino-Coin 기본 도구\n", "edit_config_file_warning": "/Miner_config.cfg 파일을 변경하려면 나중에 편집 하십시오.", "dont_have_account": "아직 Duino-Coin 계정이 없으신가요?", - "wallet": " Wallet", + "wallet": " https://wallet.duinocoin.com", "register_warning": "을 사용해서 계정을 생성(register)하세요.\n", "ask_username": "Duino-Coin 사용자 이름 입력하세요: ", "ports_message": "도구에서 다음 포트를 찾았습니다:", @@ -379,8 +379,8 @@ "rig_identifier": "Identyfikator koparki: ", "basic_config_tool": "\nKreator pliku konfiguracyjnego Duino-Coin\nEdytuj plik ", "edit_config_file_warning": "/Miner_config.cfg jeżeli chcesz coś poźniej zmienić.", - "dont_have_account": "Nie posiadasz konta Duino-Coin? Użyj ", - "wallet": "Wallet (Portfel)", + "dont_have_account": "Nie posiadasz konta Duino-Coin? Wejdź na ", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby zarejestrować się na sieci.\n", "ask_username": "Wprowadź swoją nazwę użytkownika Duino-Coin: ", "ports_message": "Kreator konfiguracji znalazł następujące porty:", @@ -475,7 +475,7 @@ "basic_config_tool": "\nИнструмент базовой настройки Duino-Coin\nОтредактируйте файл ", "edit_config_file_warning": "/Miner_config.cfg если вы захотите их изменить.", "dont_have_account": "Еще нет аккаунта Duino-Coin? Используйте ", - "wallet": "Кошелек", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для регистрации на сервере.\n", "ask_username": "Введите ваше имя пользователя Duino-Coin: ", "ports_message": "Инструмент настройки нашел следующие порты:", @@ -540,7 +540,7 @@ "basic_config_tool": "\nHerramienta de configuración básica de Duino-Coin\nEdita ", "edit_config_file_warning": "el archivo /Miner_config.cfg si deseas cambiar después la configuración.", "dont_have_account": "¿No tienes una cuenta Duino-Coin todavía? Usa ", - "wallet": "Monedero", + "wallet": "https://wallet.duinocoin.com", "register_warning": " para registrarte en el servidor.\n", "ask_username": "Introduce tu usuario Duino-Coin: ", "ports_message": "La herramienta de configuración ha descubierto estos puertos:", @@ -605,7 +605,7 @@ "basic_config_tool": "\nDuino-Coin simples Konfigurationstool\nBearbeite ", "edit_config_file_warning": "/Miner_config.cfg wenn du Einstellungen ändern möchtest.", "dont_have_account": "Du hast noch keinen Duino-Coin Account? Benutze ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " um dich zu registrieren.\n", "ask_username": "Gib deinen Duino-Coin Benutzernamen ein: ", "ports_message": "Das Konfigurationstool hat Arduinos auf folgenden Ports gefunden:", @@ -704,7 +704,7 @@ "basic_config_tool": "\nEditeur de configuration Duino-Coin\nEditez ", "edit_config_file_warning": "le fichier /Miner_config.cfg si vous voulez changer votre configuration ultérieurement.", "dont_have_account": "Vous n'avez pas encore de compte Duino-Coin? Utilisez ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " pour en créer un.\n", "ask_username": "Entrez votre nom d'utilisateur Duino-Coin: ", "ports_message": "L'outil de configuration a trouvé les ports suivants:", @@ -770,7 +770,7 @@ "basic_config_tool": "\nDuino-Coin základne nastavenie\nEdit ", "edit_config_file_warning": "/Miner_config.cfg súbor neskôr pre zmenu.", "dont_have_account": "Nemáš Duino-Coin účet? Použi ", - "wallet": "Peňaženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " na zaregistrovanie na serveri.\n", "ask_username": "Zadaj svoje Duino-Coin meno: ", "ports_message": "Nástroj našiel na nasledujúcich portoch:", @@ -835,7 +835,7 @@ "basic_config_tool": "\nStrumento base di configurazione Duino-Coin\nModifica ", "edit_config_file_warning": "/Miner_config.cfg più tardi se vuoi cambiarlo.", "dont_have_account": "Non hai ancora un account Duino-Coin? Usa ", - "wallet": "Portafoglio (Wallet)", + "wallet": "https://wallet.duinocoin.com", "register_warning": " per registrarti sul server.\n", "ask_username": "Inserisci il tuo nome utente di Duino-Coin: ", "ports_message": "Lo strumento di configurazione ha trovato le seguenti porte:", @@ -902,7 +902,7 @@ "basic_config_tool": "\nDuino-Coin 基础配置工具\n编辑 ", "edit_config_file_warning": "/如果要更改 Miner_config.cfg 文件,请稍后。", "dont_have_account": "还没有Duino-Coin帐户吗? 使用 ", - "wallet": "钱包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在服务器上注册个。\n", "ask_username": "输入您的 Duino-Coin 用户名: ", "ports_message": "配置工具找到了如下端口:", @@ -969,7 +969,7 @@ "basic_config_tool": "\nFerramenta de configuração básica do Duino-Coin\nEdita ", "edit_config_file_warning": "Se você quiser trocar as configurações mais tarde /Miner_config.cfg é o arquivo.", "dont_have_account": "Você já tem uma conta no Duino-Coin? Se sim use-a.", - "wallet": "Carteira", + "wallet": "https://wallet.duinocoin.com", "register_warning": " Para se registrar no servidor.\n", "ask_username": "Seu nome na Duino-Coin: ", "ports_message": "Duranta a configuração foram descobertas essas portas:", @@ -1050,7 +1050,7 @@ "basic_config_tool": "\nDuino-Coin yapılandırma aracı\nEğer daha sonra ayarları değiştirmek isterseniz ", "edit_config_file_warning": "/Miner_config.cfg dosyasını düzenleyin.", "dont_have_account": "Henüz bir Duino-Coin hesabınız yok mu? ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": " ile sunucuya kayıt olun.", "ask_username": "Duino-Coin kullanıcı adınızı girin: ", "ports_message": "Yapılandırma aracı belirtilen portları buldu:", @@ -1133,7 +1133,7 @@ "basic_config_tool": "\nDuino-Coin konfiqurasiya aracı\nAyarları daha sonra dəyişdirmək istəyirsinizsə", "edit_config_file_warning": "/Miner_config faylını dəyişdirin.", "dont_have_account": "Hələ Duino-Coin hesabınız yoxdur? ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": "ilə serverdə qeydiyyatdan keçin.", "ask_username": "Duino-Coin istifadəçi adınızı daxil edin: ", "ports_message": "Konfiqurasiya vasitəsi göstərilən portları tapdı:", @@ -1199,7 +1199,7 @@ "basic_config_tool": "\nDuino-Coin เครื่องมือการตั้งค่าพื้นฐาน\nแก้ไข ", "edit_config_file_warning": "ไฟล์ /Miner_config.cfg ภายหลังหากคุณต้องการแก้ไข", "dont_have_account": "ยังไม่มีบัญชี Duino-Coin ใช้งาน? ใช้ ", - "wallet": "วอลเล็ท", + "wallet": "https://wallet.duinocoin.com", "register_warning": " ลงทะเบียนบนเซิร์ฟเวอร์\n", "ask_username": "ใส่ชื่อผู้ใช้งาน Duino-Coin ของคุณ: ", "ports_message": "เครื่องมือการตั้งค่าถูกพบที่พอร์ตต่อไปนี้:", @@ -1280,7 +1280,7 @@ "basic_config_tool": "\nDuino-Coin basis configuratiehulpprogramma\nBewerk ", "edit_config_file_warning": "het bestand /Miner_config.cfg later.", "dont_have_account": "Nog geen Duino-Coin account? Ga naar ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " voor het registeren van een account.\n", "ask_username": "Vul je Duino-Coin gebruikersnaam in: ", "ports_message": "Het configuratiehulpprogramma heeft de volgende poorten gevonden:", @@ -1361,7 +1361,7 @@ "basic_config_tool": "\nDuino-Coin基本設定ツール\n編集 ", "edit_config_file_warning": "/Miner_config.cfgファイルを後で変更したい場合。", "dont_have_account": "をまだお持ちでない方はこちらを使用 ", - "wallet": "ウォレット", + "wallet": "https://wallet.duinocoin.com", "register_warning": " をクリックしてサーバーに登録します。\n", "ask_username": "Duino-Coinのユーザー名を入力します: ", "ports_message": "コンフィグレーションツールは、以下のポートを検出しました:", @@ -1455,7 +1455,7 @@ "basic_config_tool": "\nDuino-Coinin perusasetusten työkalu\nMuokkaa ", "edit_config_file_warning": "/Miner_config.cfg-tiedostoa myöhemmin, jos haluat muuttaa sitä.", "dont_have_account": "Eikö sinulla ole vielä Duino-Coin-tiliä? Käytä ", - "wallet": "Lompakko", + "wallet": "https://wallet.duinocoin.com", "register_warning": " rekisteröityäksesi palvelimelle.\n", "ask_username": "Syötä Duino-Coin-käyttäjätunnuksesi: ", "ports_message": "Asetustyökalu on löytänyt seuraavat portit:", From 653c13bcea3c07805866b6bf3ee92f3b9825efbc Mon Sep 17 00:00:00 2001 From: JK-Rolling <89238608+JK-Rolling@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:15:17 +0800 Subject: [PATCH 18/31] feed wdt when waiting for server response --- ESP_Code/MiningJob.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ESP_Code/MiningJob.h b/ESP_Code/MiningJob.h index bb200914..be205211 100644 --- a/ESP_Code/MiningJob.h +++ b/ESP_Code/MiningJob.h @@ -266,7 +266,7 @@ class MiningJob { void waitForClientData() { client_buffer = ""; - + unsigned int stopWatch = millis(); while (client.connected()) { if (client.available()) { client_buffer = client.readStringUntil(END_TOKEN); @@ -274,6 +274,13 @@ class MiningJob { client_buffer = "???\n"; // NOTE: Should never happen break; } + if (max_micros_elapsed(micros(), 100000)) { + handleSystemEvents(); + } + if (millis()-stopWatch>120000) { + Serial.println("Timeout after 120s. Forced restart.."); + ESP.restart(); + } } } @@ -301,7 +308,9 @@ class MiningJob { " share #" + String(share_count) + " (" + String(counter) + ")" + " hashrate: " + String(hashrate / 1000, 2) + " kH/s (" + - String(elapsed_time_s) + "s)\n"); + String(elapsed_time_s) + "s) " + + "Ping: " + String(ping) + "ms " + + "(" + node_id + ")\n"); #endif } From 019153ec5191f8b314cba7d5f794fae0cbfd1994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ra=C3=9Fmann?= Date: Thu, 31 Oct 2024 15:03:47 +0100 Subject: [PATCH 19/31] bugfix: bring rig id to the dashboard for blushy boxes --- ESP_Code/ESP_Code.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index bca421c3..c5161a84 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -649,6 +649,7 @@ void setup() { configuration->DUCO_USER = duco_username; configuration->RIG_IDENTIFIER = duco_rigid; configuration->MINER_KEY = duco_password; + RIG_IDENTIFIER = duco_rigid; String captivePortalHTML = R"( Duino BlushyBox From 7e63446ecffc9d562d3be5a43e4b2efd064f671e Mon Sep 17 00:00:00 2001 From: -akku- <151517253+akku1139@users.noreply.github.com> Date: Wed, 6 Nov 2024 22:31:01 +0900 Subject: [PATCH 20/31] fix: Raspberry Pi Pico hashrate With following commit, the hash rate of Raspberry Pi Pico increased from 5KH/s to 18KH/s. https://github.com/revoxhere/duino-coin/commit/0bdc7e3f6781b9206bc8bb46fac8e3881924f325 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 970ae86e..4216fba5 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Captured at normal multiplier (no weekend boost) Please note the DUCO/day column has been removed since version 4.0 changed the reward system. | Device/CPU/SBC/MCU/chip | Average hashrate
(all threads) | Mining
threads | Power
usage | |-----------------------------------------------------------|-----------------------------------|-------------------|----------------| -| Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | +| Raspberry Pi Pico | 18 kH/s | 1 | 0.3 W | | Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | | Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | | Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | From e91dc42e75b4a16b40d24f0d3d0e747a4746cad1 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 1 Dec 2024 15:27:05 +0100 Subject: [PATCH 21/31] Fix a slow memory leak (fixed list size) --- AVR_Miner.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index e242ce3b..0273ee09 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Duino-Coin Official AVR Miner 4.2 © MIT licensed +Duino-Coin Official AVR Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin Duino-Coin Team & Community 2019-2024 @@ -27,6 +27,7 @@ from datetime import datetime from statistics import mean from signal import SIGINT, signal +from collections import deque from time import ctime, sleep, strptime, time import pip @@ -109,7 +110,7 @@ def port_num(com): class Settings: - VER = '4.2' + VER = '4.3' SOC_TIMEOUT = 15 REPORT_TIME = 120 AVR_TIMEOUT = 10 @@ -467,8 +468,8 @@ def start(donation_level): shares = [0, 0, 0] -hashrate_mean = [] -ping_mean = [] +hashrate_mean = deque(maxlen=25) +ping_mean = deque(maxlen=25) diff = 0 donator_running = False job = '' @@ -1178,7 +1179,7 @@ def mine_avr(com, threadid, fastest_pool, thread_rigid): hashrate_t = round(num_res / computetime, 2) hashrate_mean.append(hashrate_t) - hashrate = mean(hashrate_mean[-5:]) + hashrate = mean(hashrate_mean) hashrate_list[threadid] = hashrate total_hashrate = sum(hashrate_list) except Exception as e: @@ -1208,7 +1209,7 @@ def mine_avr(com, threadid, fastest_pool, thread_rigid): time_delta = (responsetimestop - responsetimetart).microseconds ping_mean.append(round(time_delta / 1000)) - ping = mean(ping_mean[-10:]) + ping = mean(ping_mean) diff = get_prefix("", int(diff), 0) debug_output(com + f': retrieved feedback: {" ".join(feedback)}') except Exception as e: From 61913bf731d23e66c909d39898e2cdfa53a444a5 Mon Sep 17 00:00:00 2001 From: kaytipooficial Date: Fri, 6 Dec 2024 21:05:38 +0100 Subject: [PATCH 22/31] Updated es_LATAM readme --- .../README_TRANSLATIONS/README_es_LATAM.md | 95 ++++++++++--------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/Resources/README_TRANSLATIONS/README_es_LATAM.md b/Resources/README_TRANSLATIONS/README_es_LATAM.md index c312eb6b..0e3c22d5 100644 --- a/Resources/README_TRANSLATIONS/README_es_LATAM.md +++ b/Resources/README_TRANSLATIONS/README_es_LATAM.md @@ -2,7 +2,7 @@ *** Official Duino Coin LATAM README *** by revoxhere, 2019-2022 *** translated by Technopy311 -*** Last update by Erick2317 +*** Last update by kaytipooficial -->
@@ -137,42 +137,54 @@ Cualquier contribución que haces al proyecto de Duino-Coin son gratamente aprec El código fuente del servidor, documentación para las peticiones a la API y librerías oficiales para desarrollar tus propias apps para Duino-Coin están disponibles están disponibles en la rama de [herramientas útiles](https://github.com/revoxhere/duino-coin/tree/useful-tools) -## Pruebas de rendimiento de dispositivos y placas probados oficialmente +## Version 4.0 objetivo de recompensas -### Ten en cuenta que las recompensas dependen de muchos factores y la tabla de abajo es solo para propositos de orientación. +Capturado con un multiplicador normal (no multiplicador de fin de semana) +| Dispositivo | Hashrate | Hilos | DUCO/día | Potencia usada | +|--------------------------------|------------------------|---------|----------|----------------| +| Arduino | 343 H/s | 1 | 12 | <0.5 W +| ESP32 | 170-180 kH/s | 2 | 10 | 1.5-2 W +| ESP32-S2/C3 | 85-96 kH/s | 1 | 8 | 1-1.5 W +| ESP8266 | 66 kH/s | 1 | 6 | 1-1.5 W +| Raspberry Pi 4 (Bajo) | 1 MH/s (no hash rápido)| 4 | 6-7 | 6.5 W +| Raspberry Pi 4 (Medio) | 5.4 MH/s (has rápido) | 4 | 7-8 | 6.5 W +| Computadores de bajos recursos | | 4 | 4-6 | - +| Computadores de medios recursos| | 4-8 | 6-10 | - +| Computadores de altos recursos | | 8+ | 10-12 | - + +
+ Otros dispositivos testeados y sus benchmarks - | Dispositivo/CPU/SBC/MCU/chip | Hashrate promedio
(todos los hilos) | Hilos de
minado | Consumo de
energía | Promedio
DUCO/día | - |-----------------------------------------------------------|-----------------------------------|-------------------|----------------|---------------------| - | Arduino Pro Mini, Uno, Nano etc.
(Atmega 328p/pb/16u2) | 258 H/s | 1 | 0.2 W | 15-20 | - | Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | 10 | - | Teensy 4.1 (soft cryptography) | 80 kH/s | 1 | 0.5 W | ? | - | NodeMCU, Wemos D1 etc.
(ESP8266) | 9-10 kH/s (160MHz) 5 kH/s (80Mhz) | 1 | 0.6 W | 3-6 | - | ESP32 | 40-42 kH/s | 2 | 1 W | 6-9 | - | Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | ? | - | Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | 4-5 | - | Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | ? | - | Raspberry Pi 4 **(64bit, fasthash)** | 6.8 MH/s | 4 | 6.4 W | 5 | - | ODROID XU4 | 1.0 MH/s | 8 | 5 W | 6 | - | Atomic Pi | 690 kH/s | 4 | 6 W | ? | - | Orange Pi Zero 2 | 740 kH/s | 4 | 2.55 W | ? | - | Khadas Vim 2 Pro | 1.12 MH/s | 8 | 6.2 W | ? | - | Libre Computers Tritium H5CC | 480 kH/s | 4 | 5 W | ? | - | Libre Computers Le Potato | 410 kH/s | 4 | 5 W | ? | - | Pine64 ROCK64 | 640 kH/s | 4 | 5 W | ? | - | Intel Celeron G1840 | 1.25 MH/s | 2 | 53 W | 3.3 | - | Intel Core i5-2430M | 1.18 MH/s | 4 | 35 W | 6.5 | - | Intel Core i5-3230M | 1.52 MH/s | 4 | 35 W | 7.2 | - | Intel Core i5-5350U | 1.35 MH/s | 4 | 15 W | 6.0 | - | Intel Core i5-7200U | 1.62 MH/s | 4 | 15 W | 7.5 | - | Intel Core i5-8300H | 3.67 MH/s | 8 | 45 W | 9.1 | - | Intel Core i3-4130 | 1.45 MH/s | 4 | 54 W | 3.7 | - | AMD Ryzen 5 2600 | 4.9 MH/s | 12 | 65 W | 15.44 | - | AMD Ryzen R1505G **(fasthash)** | 8.5 MH/s | 4 | 35 W | - | - | Intel Core i7-11370H **(fasthash)** | 17.3 MH/s | 8 | 35 W | 4.28 | - | Realtek RTD1295 | 490 kH/s | 4 | - | - | - | Realtek RTD1295 **(fasthash)** | 3.89 MH/s | 4 | - | - | - -Todas las pruebas se realizaron utilizando el algoritmo DUCO-S1 **sin aceleraciones fasthash**, a menos que se indique lo contrario. Esta tabla se actualizará activamente. +Tenga en cuenta que la columna DUCO/día se ha eliminado desde que la versión 4.0 cambió el sistema de recompensas. +| Dispositivp/CPU/SBC/MCU/chip | Tasa de hash promedio
(todos los hilos) | Hilos de minado | Potencia usada | +|-----------------------------------------------------------|--------------------------------------------|-------------------|----------------| +| Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | +| Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | +| Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | +| Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | +| Raspberry Pi 4 **(64bit, hash rápido)** | 6.8 MH/s | 4 | 6.4 W | +| ODROID XU4 | 1.0 MH/s | 8 | 5 W | +| Atomic Pi | 690 kH/s | 4 | 6 W | +| Orange Pi Zero 2 | 740 kH/s | 4 | 2.55 W | +| Khadas Vim 2 Pro | 1.12 MH/s | 8 | 6.2 W | +| Libre Computers Tritium H5CC | 480 kH/s | 4 | 5 W | +| Libre Computers Le Potato | 410 kH/s | 4 | 5 W | +| Pine64 ROCK64 | 640 kH/s | 4 | 5 W | +| Intel Celeron G1840 | 1.25 MH/s | 2 | 53 W | +| Intel Core i5-2430M | 1.18 MH/s | 4 | 35 W | +| Intel Core i5-3230M | 1.52 MH/s | 4 | 35 W | +| Intel Core i5-5350U | 1.35 MH/s | 4 | 15 W | +| Intel Core i5-7200U | 1.62 MH/s | 4 | 15 W | +| Intel Core i5-8300H | 3.67 MH/s | 8 | 45 W | +| Intel Core i3-4130 | 1.45 MH/s | 4 | 54 W | +| AMD Ryzen 5 2600 | 4.9 MH/s | 12 | 65 W | +| AMD Ryzen R1505G **(hash rápido)** | 8.5 MH/s | 4 | 35 W | +| Intel Core i7-11370H **(hash rápido)** | 17.3 MH/s | 8 | 35 W | +| Realtek RTD1295 | 490 kH/s | 4 | - | +| Realtek RTD1295 **(hash rápido)** | 3.89 MH/s | 4 | - | + +
+ @@ -207,6 +219,7 @@ Todas las pruebas se realizaron utilizando el algoritmo DUCO-S1 **sin aceleracio * [Teensy 4.1 code for Arduino IDE](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Teensy_code/Teensy_code.ino) por joaquinbvw ### Otras herramientas: + * [Duinogotchi](https://github.com/OSRdesign/duinogotchi) - Proyecto de Duino-Coin mascotas virtuales por ricaun * [Duino Miner](https://github.com/g7ltt/Duino-Miner) - Archivos y documentación del minero DUCO basado en Arduino Nano por g7ltt * [DUINO Mining Rig](https://repalmakershop.com/pages/duino-mining-rig) - Archivos 3D, diseños de PCB e instrucciones para crear tu propio Duino rig por ReP_AL * [DuinoCoin-balance-Home-Assistant](https://github.com/NL647/DuinoCoin-balance-Home-Assistant) - add-on para Home Assistant mostrando tu saldo por NL647 @@ -246,17 +259,9 @@ Nuestro aviso legal está disponible aquí:
Date: Tue, 10 Dec 2024 20:57:20 +0100 Subject: [PATCH 26/31] Update duco_hash.cpp --- Arduino_Code/duco_hash.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Arduino_Code/duco_hash.cpp b/Arduino_Code/duco_hash.cpp index f5d1cc16..48113816 100644 --- a/Arduino_Code/duco_hash.cpp +++ b/Arduino_Code/duco_hash.cpp @@ -77,9 +77,7 @@ void duco_hash_block(duco_hash_state_t * hasher) { } void duco_hash_init(duco_hash_state_t * hasher, char const * prevHash) { - for (uint8_t i = 0; i < 40; i++) { - hasher->buffer[i] = prevHash[i]; - } + memcpy(hasher->buffer, prevHash, 40); if (prevHash == (void*)(0xffffffff)) { // NOTE: THIS IS NEVER CALLED From fe49c99e303d34b0dcb7c3a11d5b95fe39faf243 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:08:57 +0100 Subject: [PATCH 27/31] Changed default timeouts and fixed wrong mining key error --- AVR_Miner.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 0273ee09..204dea91 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -111,8 +111,8 @@ def port_num(com): class Settings: VER = '4.3' - SOC_TIMEOUT = 15 - REPORT_TIME = 120 + SOC_TIMEOUT = 10 + REPORT_TIME = 300 AVR_TIMEOUT = 10 BAUDRATE = 115200 DATA_DIR = "Duino-Coin AVR Miner " + str(VER) @@ -291,6 +291,7 @@ def check_mining_key(user_settings): + key, timeout=10 ).json() + debug_output(response) if response["success"] and not response["has_key"]: # if the user doesn't have a mining key user_settings["mining_key"] = "None" @@ -305,6 +306,10 @@ def check_mining_key(user_settings): return if not response["success"]: + if response["message"] == "Too many requests": + debug_output("Skipping mining key check - getting 429") + return + if user_settings["mining_key"] == "None": pretty_print( "sys0", @@ -748,10 +753,10 @@ def load_config(): 'language': lang, 'identifier': rig_identifier, 'debug': 'n', - "soc_timeout": 45, + "soc_timeout": 10, "avr_timeout": 10, "discord_presence": "y", - "periodic_report": 60, + "periodic_report": 300, "mining_key": mining_key} with open(str(Settings.DATA_DIR) From 391b8240e53656a0375f4b6a3f04e55b8f33aa46 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:25:12 +0100 Subject: [PATCH 28/31] Improved printlock and mining key check failsafes --- PC_Miner.py | 88 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/PC_Miner.py b/PC_Miner.py index 2d728844..87a22e47 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Duino-Coin Official PC Miner 4.2 © MIT licensed +Duino-Coin Official PC Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin Duino-Coin Team & Community 2019-2024 @@ -12,7 +12,7 @@ from multiprocessing import cpu_count, current_process from multiprocessing import Process, Manager, Semaphore -from threading import Thread +from threading import Thread, Lock from datetime import datetime from random import randint @@ -42,8 +42,10 @@ import io +debug = "n" running_on_rpi = False configparser = ConfigParser() +printlock = Lock() # Python <3.5 check f"Your Python version is too old. Duino-Coin Miner requires version 3.6 or above. Update your packages and try again" @@ -78,6 +80,13 @@ def handler(signal_received, frame): shell=True, stdout=PIPE) +def debug_output(text: str): + if debug == 'y': + print(Style.RESET_ALL + Fore.WHITE + + now().strftime(Style.DIM + '%H:%M:%S.%f ') + + Style.NORMAL + f'DEBUG: {text}') + + def install(package): """ Automatically installs python pip package and restarts the program @@ -142,7 +151,7 @@ class Settings: """ ENCODING = "UTF8" SEPARATOR = "," - VER = 4.2 + VER = 4.3 DATA_DIR = "Duino-Coin PC Miner " + str(VER) TRANSLATIONS = ("https://raw.githubusercontent.com/" + "revoxhere/" @@ -152,11 +161,12 @@ class Settings: SETTINGS_FILE = "/Settings.cfg" TEMP_FOLDER = "Temp" - SOC_TIMEOUT = 20 - REPORT_TIME = 5*60 + SOC_TIMEOUT = 10 + REPORT_TIME = 300 DONATE_LVL = 0 RASPI_LEDS = "y" RASPI_CPU_IOT = "y" + disable_title = False try: # Raspberry Pi latin encoding users can't display this character @@ -181,24 +191,26 @@ class Settings: def title(title: str): - if osname == 'nt': - """ - Changing the title in Windows' cmd - is easy - just use the built-in - title command - """ - ossystem('title ' + title) - else: - """ - Most *nix terminals use - this escape sequence to change - the console window title - """ - try: - print('\33]0;' + title + '\a', end='') - sys.stdout.flush() - except Exception as e: - debug_output("Error setting title: " +str(e)) + if not Settings.disable_title: + if osname == 'nt': + """ + Changing the title in Windows' cmd + is easy - just use the built-in + title command + """ + ossystem('title ' + title) + else: + """ + Most *nix terminals use + this escape sequence to change + the console window title + """ + try: + print('\33]0;' + title + '\a', end='') + sys.stdout.flush() + except Exception as e: + debug_output("Error setting title: " +str(e)) + Settings.disable_title = True def check_updates(): @@ -695,9 +707,10 @@ def print_queue_handler(print_queue): while True: if len(print_queue): message = print_queue[0] - del print_queue[0] - print(message) - sleep(0.1) + with printlock: + print(message) + print_queue.pop(0) + sleep(0.01) def get_string(string_name): @@ -713,12 +726,16 @@ def get_string(string_name): def has_mining_key(username): - response = requests.get( - "https://server.duinocoin.com/mining_key" - + "?u=" + username, - timeout=10 - ).json() - return response["has_key"] + try: + response = requests.get( + "https://server.duinocoin.com/mining_key" + + "?u=" + username, + timeout=10 + ).json() + return response["has_key"] + except Exception as e: + debug_output("Error checking for mining key: " + str(e)) + return False def check_mining_key(user_settings): @@ -733,6 +750,7 @@ def check_mining_key(user_settings): + key, timeout=Settings.SOC_TIMEOUT ).json() + debug_output(response) if response["success"] and not response["has_key"]: # If user doesn't have a mining key @@ -747,6 +765,9 @@ def check_mining_key(user_settings): return if not response["success"]: + if response["message"] == "Too many requests": + debug_output("Skipping mining key check - getting 429") + return if user_settings["mining_key"] == "None": pretty_print(get_string("mining_key_required"), "warning") mining_key = input("\t\t" + get_string("ask_mining_key") @@ -1197,8 +1218,7 @@ def mine(id: int, user_settings: list, + f"{single_miner_id}") time_start = time() - feedback = Client.recv( - ).split(Settings.SEPARATOR) + feedback = Client.recv().split(Settings.SEPARATOR) ping = (time() - time_start) * 1000 if feedback[0] == "GOOD": From 15efa28859804ffc2d3b5c15da225a803b5cfb48 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:26:28 +0100 Subject: [PATCH 29/31] Better printlock and set title failsafes --- AVR_Miner.py | 55 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 204dea91..43c93297 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -32,14 +32,11 @@ import pip from subprocess import DEVNULL, Popen, check_call, call -from threading import Thread -from threading import Lock as thread_lock -from threading import Semaphore - +from threading import Thread, Lock import base64 as b64 - import os -printlock = Semaphore(value=1) + +printlock = Lock() # Python <3.5 check @@ -119,6 +116,7 @@ class Settings: SEPARATOR = "," ENCODING = "utf-8" TEMP_FOLDER = "Temp" + disable_title = False try: # Raspberry Pi latin users can't display this character @@ -600,24 +598,26 @@ def debug_output(text: str): def title(title: str): - if osname == 'nt': - """ - Changing the title in Windows' cmd - is easy - just use the built-in - title command - """ - ossystem('title ' + title) - else: - """ - Most *nix terminals use - this escape sequence to change - the console window title - """ - try: - print('\33]0;' + title + '\a', end='') - sys.stdout.flush() - except Exception as e: - debug_output("Error setting title: " +str(e)) + if not Settings.disable_title: + if osname == 'nt': + """ + Changing the title in Windows' cmd + is easy - just use the built-in + title command + """ + ossystem('title ' + title) + else: + """ + Most *nix terminals use + this escape sequence to change + the console window title + """ + try: + print('\33]0;' + title + '\a', end='') + sys.stdout.flush() + except Exception as e: + debug_output("Error setting title: " +str(e)) + Settings.disable_title = True def handler(signal_received, frame): @@ -1318,9 +1318,10 @@ def print_queue_handler(): while True: if len(print_queue): message = print_queue[0] - del print_queue[0] - print(message) - sleep(0.1) + with printlock: + print(message) + print_queue.pop(0) + sleep(0.01) if __name__ == '__main__': From 3a38e3ea1d9640c944e43dcf966fb1d9b7e41e6b Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:15:30 +0100 Subject: [PATCH 30/31] Add WifiManager note --- ESP_Code/Settings.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 70f39a4c..41d0948a 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -41,6 +41,7 @@ extern const char PASSWORD[] = "PASSW0RD"; // Uncomment to enable WiFiManager captive portal in AP mode // The board will create its own network you connect to and change the settings +// REQUIRES WiFiManager library by tzapu (https://github.com/tzapu/WiFiManager) // #define CAPTIVE_PORTAL // -------------------------------------------------------------- // From 1514d35a1bcf15710f15ccf09de4682185efe9b6 Mon Sep 17 00:00:00 2001 From: Thomas Wenzlaff Date: Mon, 20 Jan 2025 09:53:57 +0100 Subject: [PATCH 31/31] Update README.md Add new Tool URL --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 59a342e2..7d8cf9b8 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [Duino Miner Hassio Add-on](https://github.com/mavotronik/hassio-addons/tree/main/duino_miner_hassio_addon) by mavotronik * [Home Assistant sensors package](https://github.com/mavotronik/Duinocoin_homeassistant) by mavotronik * [ESPGUITOOL](https://github.com/CGameDev/ESPGUITOOL) by kazutokirigaya + * [DUCO Hashrate Monitor](https://gitlab.com/IT-Berater/twhashrate) hashrate java swing speedometer gui by IT-Berater You may also view a similar list on the [website](https://duinocoin.com/apps).