As I’ve explained before, it’s because your client is trying to connect to the cloud server, and the Auth token from your local server isn’t valid on the cloud server. To overcome this you need to edit your script to tell the client to connect to your local server.
I’ve linked you to a tutorial that shows you how to do that, but you not only don’t understand the tutorial, you don’t know what a script is. This is despite you saying that you’ve followed the Blynk step by step instruction (also included in the link I provided) which clearly refers to the script in which you need to change the Auth code.
I think that programming in NodeJS is beyond your current capabilities.
So ok I just don’t know where i have to make script. With esp8266 i have to send script on it ok.
But with Raspberry i don’t know. ( and i think i don’t need some programming for control gpio on raspberry with blynk )
I think you can just say me where i have to put this :
For Local Server:
const Blynk = require('blynk-library'); // Links variable 'Blynk' to the Blynk Library
const AUTH = 'xxxxxxxxxx'; // Your top secret auth code
const blynk = new Blynk.Blynk(AUTH, options = {
connector : new Blynk.TcpClient( options = { addr: "xxx.xxx.xxx.xxx", port: 8080 } ) // This takes all the info and directs the connection to you Local Server.
});
I don’t make script from my own, it’s during instalation on wich step of your link i have to make script ?
Really i don’t understand maybe you can show me screen shot or other ?
@CharlesTestas please stop creating new topics about the same issue.
All the answers you require are in this one post, all you need to do is to study the documentaion.
So you say node is not better way for me and my project and is no other solution than node ?
for conclusion is not possible to use blynk by this way. I’m disapointed for that. Maybe later on otherplace i find some help with a clear explication to do my project.
it’s never easy when you have reduced comprehension skills.
No, I didn’t say that, I said that C++ isn’t an appropriate solution.
It’s perfectly possible to use Blynk with NodeJS and local server, and I’ve linked you to a topic which shows how to do that, it’s just that you appear to be more comfortable following unofficial YouTube videos than reading the document which is shown in that video or reading topics from a respected community member who has taken the time to put together a NodeJS help topic.
const Blynk = require(‘/home/pi/my-awesome-project/node_modules/blynk-library’); // Links variable ‘Blynk’ to the Blynk Library
const AUTH = ‘lu45Oqq80QUverQPDItJEX9EukGwMG7t’; // Your top secret auth code
const blynk = new Blynk.Blynk(AUTH, options = {
connector : new Blynk.TcpClient( options = { addr: “192.168.1.35”, port: 9443 } ) // This takes all the info and directs the connection to you Local Server.
});
var AUTH = ‘lu45Oqq80QUverQPDItJEX9EukGwMG7t’;
var blynk = new Blynk.Blynk(AUTH);
var v1 = new blynk.VirtualPin(1);
var v9 = new blynk.VirtualPin(9);
pi@raspberrypi:~/my-awesome-project $ node index.js
/home/pi/my-awesome-project/index.js:7
var AUTH = ‘lu45Oqq80QUverQPDItJEX9EukGwMG7t’;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Identifier ‘AUTH’ has already been declared
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
const Blynk = require('blynk-library'); // Links variable 'Blynk' to the Blynk Library
const AUTH = 'xxxxxxxxxx'; // Your top secret auth code
const blynk = new Blynk.Blynk(AUTH, options = {
connector : new Blynk.TcpClient( options = { addr: "xxx.xxx.xxx.xxx", port: 8080 } ) // This takes all the info and directs the connection to you Local Server.
});
It’s not just a case of adding it to the script, it’s a case of changing the original script to use these settings instead of the one from the original script.