How to connect RPI to local blynk server using NodeJs

I created a local blynk server in Windows 7 using the jar file. Initially I was running node js script in rpi to connect to Cloud server. Now i cant find the way to connect the same script to local server. In docs section its written that we need to enter the local ip of server beside AUTH.

Initial code to connect cloud
var blynk = new Blynk.Blynk(AUTH, options = {connector : new Blynk.TcpClient()}); [WORKED FINE]
I tried this:
var blynk = new Blynk.Blynk(AUTH, β€œ192.168.0.101”); //where 192.168.0.101= local server IP.
But it is still trying to connect to cloud server.

Can somebody tell me what is the syntax to connect it to local server.

I found the answer

var blynk = new Blynk.Blynk(AUTH, options= {addr:β€œ192.168.0.101”});

2 Likes

Hi,
Where did you edit this line of code ?
Can you kindly send me the screenshot of the the path in your pi ??
Struggling from past 2 weeks.

I think it’s the example blynk.js file.