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.
That isn’t the original script, it’s the script that you’ve incorrectly modified by adding-in some additional code without removing parts of the original code.
So now i’m connecting Raspberry on my smartphone hotspot. I can see serveur administration dashboard by this way ( on browser ) https://myip:9443/admin
But it don’t work with Blynk application. It can’t fond server.
So in your other topic you said something different…
And I replied…
Are you now saying that the issue is different, or that using the actual IP address of the server (192.168.1.35) rather than the loopback IP (127.0.0.1)?
So i use server and client on same device. My client conatct server on 127.0.0.1. it work.
On blynk app on custom i use RaspberryPi IP and don’t find server. I don’t understand it work like that to my router but no to the hotspot from my smartphone