BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

My problem connecting RPi to Cloud

sir my problem is still there same as your’s was … please help me what should i do ??
i am using Node Js program to read from blynk app

Please don’t add your issue onto others topics.

Please supply clear and complete details of YOUR issue so we might be able to assist. Thank you.

Connecting to: blynk-cloud.com 8441
{ Error: connect ECONNREFUSED 188.166.206.43:8441
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '188.166.206.43',
  port: 8441 }

this is the error i am getting with my Node js code given below… All these on raspberry pi 3B

var Blynk = require('/usr/local/lib/node_modules/blynk-library');
var fs =require('fs');
var AUTH = '6de1f179a83d462f9dc009b9c6d92dbb';

var blynk = new Blynk.Blynk(AUTH);

var v1 = new blynk.VirtualPin(1);
var v2 = new blynk.VirtualPin(2);

v1.on('write', function(param) {
  console.log('V1:', param[0]);
fs.writeFileSync('X-axis.txt',param[0]);
});

v2.on('write', function(para) {
  console.log('V2:', para[0]);
  //v2.write(new Date().getSeconds());
fs.writeFileSync('Y-axis.txt',para[0]);
});

Sorry for inconvenience before … and thank you for replying

I think your problem is the old port…

Sir can u please elaborate how can i update port.

Check out the examples for Blynk NodeJS

Instead of the usual
var blynk = new Blynk.Blynk(AUTH);
You could use this:
var blynk = new Blynk.Blynk(AUTH, options={addr:“blynk-cloud.com”, port:443});

Take a look at the scripts example for client-ssl-local.js as mentioned by Gunner and
blynk-library-js/examples/nodejs/ client-ssl-local.js

FYI… those examples, like the one referenced above, https://github.com/vshymanskyy/blynk-library-js/blob/master/examples/nodejs/client-ssl-local.js have not been updated in years… so you will need to account for the new port 443 (for cloud) instead of the example’s 8441