Skip to content

Commit

Permalink
blynk removed
Browse files Browse the repository at this point in the history
Removed Blynk support - servers shut down on 31st Dec 2022.
  • Loading branch information
softhack007 committed May 10, 2023
1 parent c90af72 commit 79b996f
Show file tree
Hide file tree
Showing 39 changed files with 6 additions and 5,307 deletions.
28 changes: 0 additions & 28 deletions usermods/blynk_relay_control/README.md

This file was deleted.

96 changes: 0 additions & 96 deletions usermods/blynk_relay_control/wled06_usermod.ino

This file was deleted.

97 changes: 0 additions & 97 deletions wled00/blynk.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,6 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(macroAlexaOn, interfaces["va"]["macros"][0]);
CJSON(macroAlexaOff, interfaces["va"]["macros"][1]);

#ifndef WLED_DISABLE_BLYNK
const char* apikey = interfaces["blynk"][F("token")] | "Hidden";
tdd = strnlen(apikey, 36);
if (tdd > 20 || tdd == 0)
getStringFromJson(blynkApiKey, apikey, 36); //normally not present due to security

JsonObject if_blynk = interfaces["blynk"];
getStringFromJson(blynkHost, if_blynk[F("host")], 33);
CJSON(blynkPort, if_blynk["port"]);
#endif

#ifdef WLED_ENABLE_MQTT
JsonObject if_mqtt = interfaces["mqtt"];
Expand Down Expand Up @@ -840,13 +830,6 @@ void serializeConfig() {
if_va_macros.add(macroAlexaOn);
if_va_macros.add(macroAlexaOff);

#ifndef WLED_DISABLE_BLYNK
JsonObject if_blynk = interfaces.createNestedObject("blynk");
if_blynk[F("token")] = strlen(blynkApiKey) ? "Hidden":"";
if_blynk[F("host")] = blynkHost;
if_blynk["port"] = blynkPort;
#endif

#ifdef WLED_ENABLE_MQTT
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
if_mqtt["en"] = mqttEnabled;
Expand Down Expand Up @@ -996,13 +979,6 @@ bool deserializeConfigSec() {

JsonObject interfaces = doc["if"];

#ifndef WLED_DISABLE_BLYNK
const char* apikey = interfaces["blynk"][F("token")] | "Hidden";
int tdd = strnlen(apikey, 36);
if (tdd > 20 || tdd == 0)
getStringFromJson(blynkApiKey, apikey, 36);
#endif

#ifdef WLED_ENABLE_MQTT
JsonObject if_mqtt = interfaces["mqtt"];
getStringFromJson(mqttPass, if_mqtt["psk"], 65);
Expand Down Expand Up @@ -1042,10 +1018,6 @@ void serializeConfigSec() {
ap["psk"] = apPass;

JsonObject interfaces = doc.createNestedObject("if");
#ifndef WLED_DISABLE_BLYNK
JsonObject if_blynk = interfaces.createNestedObject("blynk");
if_blynk[F("token")] = blynkApiKey;
#endif
#ifdef WLED_ENABLE_MQTT
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
if_mqtt["psk"] = mqttPass;
Expand Down
5 changes: 3 additions & 2 deletions wled00/data/settings_sync.htm
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,16 @@ <h3>Alexa Voice Assistant</h3>
Emulate Alexa device: <input type="checkbox" name="AL"><br>
Alexa invocation name: <input type="text" name="AI" maxlength="32">
</div>
<h3>Blynk</h3>
<br />
<div id="blyOnOff2">
<em style="color:darkorange">This firmware build does not include Blynk support. <br></em>
</div>
<b>Blynk, MQTT and Hue sync all connect to external hosts!<br>
<b>Network protocols like MQTT and Hue sync all connect to external hosts!<br>
This may impact the responsiveness of the ESP microcontroller.</b><br> <!-- WLEDSR does not support 8266 -->
For best results, only use one of these services at a time.<br>
(alternatively, connect a second ESP to them and use the UDP sync)<br><br>
<div id="blyOnOff">
<h3>Blynk</h3>
Host: <input type="text" name="BH" maxlength="32">
Port: <input name="BP" type="number" min="1" max="65535" value="80" class="d5"><br>
Device Auth token: <input name="BK" maxlength="33"><br>
Expand Down
7 changes: 0 additions & 7 deletions wled00/fcn_declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ void alexaInit();
void handleAlexa();
void onAlexaChange(EspalexaDevice* dev);

//blynk.cpp
#ifndef WLED_DISABLE_BLYNK
void initBlynk(const char* auth, const char* host, uint16_t port);
void handleBlynk();
void updateBlynk();
#endif

//button.cpp
void shortPressAction(uint8_t b=0);
void longPressAction(uint8_t b=0);
Expand Down
3 changes: 0 additions & 3 deletions wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,6 @@ void serializeInfo(JsonObject root)
#ifndef WLED_DISABLE_ALEXA
os += 0x40;
#endif
#ifndef WLED_DISABLE_BLYNK
os += 0x20;
#endif
#ifdef USERMOD_CRONIXIE
os += 0x10;
#endif
Expand Down
7 changes: 0 additions & 7 deletions wled00/led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ void updateInterfaces(uint8_t callMode)
espalexaDevice->setColor(col[0], col[1], col[2]);
}
#endif
#ifndef WLED_DISABLE_BLYNK
if (callMode != CALL_MODE_BLYNK &&
callMode != CALL_MODE_NO_NOTIFY) updateBlynk();
#endif
doPublishMqtt = true;
}

Expand Down Expand Up @@ -282,9 +278,6 @@ void handleNightlight()
applyFinalBri();
}
}
#ifndef WLED_DISABLE_BLYNK
updateBlynk();
#endif
if (macroNl > 0)
applyPreset(macroNl);
nightlightActiveOld = false;
Expand Down
9 changes: 0 additions & 9 deletions wled00/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
alexaEnabled = request->hasArg(F("AL"));
strlcpy(alexaInvocationName, request->arg(F("AI")).c_str(), 33);

#ifndef WLED_DISABLE_BLYNK
strlcpy(blynkHost, request->arg("BH").c_str(), 33);
t = request->arg(F("BP")).toInt();
if (t > 0) blynkPort = t;

if (request->hasArg("BK") && !request->arg("BK").equals(F("Hidden"))) {
strlcpy(blynkApiKey, request->arg("BK").c_str(), 36); initBlynk(blynkApiKey, blynkHost, blynkPort);
}
#endif
t = request->arg(F("ASE")).toInt();
if (t == 0) {
// 0 == udp audio sync off
Expand Down
Loading

0 comments on commit 79b996f

Please sign in to comment.