Blynk-client invalid token

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.

Pete.

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.
	 });

Into your current script, but I can’t tell you where within that script until you work our what current script you are using, and share it here.

Pete.

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 ?

I’m sorry but i don’t understand

Pete.

maybe solution is more like this ? Raspi3 run client on local sever

But is not the solutions.

Hi community i restart a post here for find help.

I’ve one Raspberry Pi with blynk local server and i want is client to.

No problem for server install, is running
For client i’m using this http://help.blynk.cc/en/articles/583104-how-to-install-node-js-library-on-linux

And now i’m looking for command who start client and add token. I try this command : Raspi3 run client on local sever

But don’t work ( maybe to old )

Some body can help me ?

( i’ve mild autism syndrome please be understanding, and give clear and easy reponses )

Thanks (:slightly_smiling_face:

Salut la communauté, je redémarre un message ici pour trouver de l’aide.

J’ai un Raspberry Pi avec un serveur local et un client blynk.

Aucun problème pour l’installation du serveur, tout fonctionne.
Pour le client, j’utilise ce tuto http://help.blynk.cc/en/articles/583104-how-to-install-node-js-library-on-linux

Et maintenant, je recherche une commande qui démarre le client et ajoute le token. J’ai essaye cette commande: Raspi3 run client on local sever

Mais ca ne fonctionne pas (peut-être trop vieux) retour de la commande ::

>     pi @ raspberrypi: ~ / Blynk $ blynk-client --server = 192.168.1.35 --token = ASShFmM8n-eTRqeWxbVKtSr4RoCLguDz
> 
>     ___ __ __
> 
>     / _) / / _ _____ / / __
>     / _ / / // / _ / '/
>     /// _, ///// _
>     / __ /
> 
>     Offrez à Blynk une star de Github! => https://github.com/vshymanskyy/blynk-library-js
> 
>     Mode marche / arrêt
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté
>     Connexion à: blynk-cloud.com 443
>     Autorisation SSL…
>     Connecté

On dirait que ca se connecte au serveur blynk et non pas a mon serveur local

Quelqu’un peut m’aider?

(Je souffre d’un syndrome d’autisme léger, soyez compréhensif et donnez des réponses claires et faciles)

Merci :slightly_smiling_face:

@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.

Pete.

Soi think i understand, how i can install client with C++ library ? wiringpi is out
If it’s more easy ( as i look on different post ) i take this way

To run C++ on the Pi you need to install WiringPi, but WiringPi is now deprecated so you should not go down that route.

Pete.

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.

Thanks.

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.

Pete.

I take time for this but i don’t understand. If i understand i don’t open a topic for.

ok something like this don’t work :

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);

v1.on(‘write’, function(param) {
console.log(‘V1:’, param[0]);
});

v9.on(‘read’, function() {
v9.write(new Date().getSeconds());
});

It giving me :

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

That’s fairly self explanatory.

Maybe if you used the example from @Gunner that I linked you to earlier then it would be simpler.

Pete.

I’ve used it and i add this to the script :

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.
	 });

It don’t work like this ?

I think i don’t know what he’s mean with your top secret auth code

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.

Pete.