Which Hardware device is the best for local blynk server. Because Raspberry Pi is not able to handle the multiple devices. Specially when I increase my devices from 3 to 5
I have had easily 6-8 devices running simultaneously on my RPi3 Blynk server, along with lots of available headroom for an image server and also running a couple of Blynk clients via NodeJS and Pythonā¦
I see no reason why t couldnāt handle dozens of devicesā¦ I suspect the WiFi would be the bottleneck before the RPi. But on that note, I used the Ethernet on my RPi3.
I am using RPi 3 with ethernetā¦ but some times my devices disconnectsā¦ I think wifi modem is doing issueā¦ do you have any idea which modem whould be better
I would suspect that your disconnections are caused by badly written/structured code.
Pete.
No its notā¦ I checkedā¦ when I connect my node mcu with the modem directly connected to my RPi 3 then the rate of disconnectivity is minor but when I connect my device with modem which is connected to rpi3 through another modem then disconnectivity happens alot
I donāt quite understand the networking setup youāre describing, but clearly youāre saying itās not the RPI where the issue lies but this other āmodemā (router maybe?).
Pete.
My netwrok is like this:
Modem 1 -----> Modem 2 ------> RPi3
Modem 1 has Wifi and Connected to Modem 2 with ethernet
Modem 2 is the Continuing the IP of Modem 1 and it has its own Wifi
RPI3 using ethernet with Modem 2
Is āModem1ā a router and āModem2ā a wireless access point of some sort?
Pete.
no both are router I am just using modem 2 to extent my internet rangeā¦ because using single modem wifi range is lowā¦ and here my code tooā¦
/*
DIM: V0,V1,V2
Dim ON/OFF: V13,V14,V15
Relay: V3,V4,V7,V8,V9,V10,V11,V12
Temp: V6
Humidity: V5
*/
#define BLYNK_PRINT Serial
#define BLYNK_HEARTBEAT 20
#define BLYNK_TIMEOUT_MS 10000UL
#include <SoftwareSerial.h>
//#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>
#include <DNSServer.h> //Local DNS Server used for redirecting all requests to the configuration portal
#include <ESP8266WebServer.h> //Local WebServer used to serve the configuration portal
#include <WiFiManager.h>
SoftwareSerial mySerial(D0, D3);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "u0oXHmpzG3PH4XunFtaqImPJL3j5LCCD";
char IP_Address[] = "192.168.18.50";
#define DHTPIN 2 // D4 digital pin we're connected to
// Uncomment whatever type you're using!
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22, AM2302, AM2321
//#define DHTTYPE DHT21 // DHT 21, AM2301
DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
dht.begin();
WiFi.hostname("Omecta Device");
WiFiManager wifiManager;
wifiManager.autoConnect("Home Automation", "12345678");
//Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
// Blynk.begin(auth), WiFi.SSID().c_str(), WiFi.psk().c_str(), IPAddress(192, 168, 18, 50), 8080);
String dots = ".";
WiFi.begin(WiFi.SSID().c_str(), WiFi.psk());
// Serial.print("Connecting to ");
// Serial.print(getConnectDetail(1024));
while (WiFi.status() != WL_CONNECTED) {
delay(100);
Serial.print(".");
dots += ".";
if (dots.length() == 7 ) {
dots = ".";
Serial.print("\nConnecting to ");
Serial.print(WiFi.SSID().c_str());
}
}
Blynk.config(auth, IP_Address, 8080);
Blynk.connect();
// Setup a function to be called every second
timer.setInterval(5000L, sendSensor);
}
BLYNK_CONNECTED() {
Blynk.syncAll();
}
void loop()
{
Blynk.run();
timer.run();
}
void sendSensor() {
float h = dht.readHumidity();
float t = dht.readTemperature();
Blynk.virtualWrite(V5, int(h));
Blynk.virtualWrite(V6, int(t));
}
BLYNK_WRITE(V15) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(16);
// }
}
BLYNK_WRITE(V14) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(15);
// }
}
BLYNK_WRITE(V13) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(14);
}
BLYNK_WRITE(V12) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(13);
}
//
//
BLYNK_WRITE(V11) {
int Value = param.asInt();
mySerial.write(Value);
//delay(10);
mySerial.write(12);
}
BLYNK_WRITE(V10) {
int Value = param.asInt();
mySerial.write(Value);
//delay(10);
mySerial.write(11);
}
//
BLYNK_WRITE(V9) {
int Value = param.asInt();
mySerial.write(Value);
//delay(10);
mySerial.write(10);
}
BLYNK_WRITE(V8) {
int Value = param.asInt();
mySerial.write(Value);
//delay(10);
mySerial.write(9);
}
//
BLYNK_WRITE(V7) {
int Value = param.asInt();
mySerial.write(Value);
//delay(10);
mySerial.write(8);
}
//
BLYNK_WRITE(V4) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(7);
}
BLYNK_WRITE(V3) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(6);
}
BLYNK_WRITE(V2) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(5);
}
BLYNK_WRITE(V1) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(4);
}
BLYNK_WRITE(V0) {
int Value = param.asInt();
mySerial.write(Value);
// delay(10);
mySerial.write(3);
}
Then it depends how youāve configured your second router to act as a wireless extender. You could be running into double NAT, or double DHCP server issues, or simply have a connectivity issue with the two devices.
Pete.
Everything works fine when I have 2-3 nodeMCU connectedā¦
Maybe when you add more youāre getting overlapping up addresses if you have two DHCP servers running on your system.
Kill the second router and try it that way.
Pete.
First one is from the ISB Provider and it has only 16 Device connected Optionā¦ The Other one has 32. Donāt you think its better to buy a separate modem for Blynk and Use the Internet without any interruption
Iām not going to try to advise you on how to structure your home network, but I think your current issue is probably caused by overlapping DHCP servers. If thatās the case then you need to fix that, and understand more about networking, before heading-off in a different direction.
Pete.
Thanks Pete For your time. The error was actually ping between two modems. It was due to extra Lan wire leghth. Thanks for your helpš
Pete.