Changing the node SSL port to point to Blynk local server

Hi guys
I have created the Blynk local server on an RPi3+B managed to connect without an internet connection
Capture
Now I’m at the stage where the node.js needs to setup/configured halfway through it gives back an error about an “INVALID_TOKEN”
so I found some forums about this topic that the ports have been changed and that I need to be on 9443 for it to connect to the local server but I just can’t find how these forums are meant to help
Capture
so is this possible to change the SSL port to point to the Blynk local server in the RPi3 command line

Thanks in advance

Run these (note this is a hack)

sudo sed -i '134s/blynk-cloud.com/localhost/' /usr/local/lib/node_modules/blynk-library/blynk-node.js
sudo sed -i '135s/8441/9443/' /usr/local/lib/node_modules/blynk-library/blynk-node.js 

Retry your blynk-client command

I also re-wrote my blynk-client command.

This might help as well… adjust for your needs IP & Port

Thanks
Gunner I have been following Vshymanskyy docimentaion but it got me no way the commands not found

I can’t find it, but I recall recently reading something in this forum about trying without the -g

Also found this…

sudo apt-get install npm
then retry

BTW, I never bother with onoff… I prefer pigpio and coding with virtual pins

1 Like

whats the diffirence between the two

https://www.google.com/search?q=apt-get

I don’t really know how to explain it, I am just learning linux myself.

I see pigpio is more than just 0s and 1s
what I need to trim fuel and air
thanks you saved me alot of heart later on

I followed your commands and ended with this lol

try this? (then retry)

sudo sed -i '135s/443/9443/' /usr/local/lib/node_modules/blynk-library/blynk-node.js 

for some reason the blynk library are stored in the project folder and cant be moved
is it possible to manually edit the ports with in the .js file and run in the project file

sed is just editing lines 134 and 135 of the library. because at first you were only gonna run the client, that was the easiest way.

now its easier to just put it in the js script when you launch it.

Sorry for off-topic, but just for clarification:

apt-get and mpm. Both are package managers. They are responsible for installing, removing, and managing packages. These packages are, simply put, applications you can run after you install them. One package manager can often install another package manager. That is exactly what the apt-get install npm command does.

Also, there is also newer version of apt-get. apt-get is older version, and newer is just apt. You can use these pretty much interchangeably.

That I hadn’t discovered in the last 5 months :wink: Thanks, I will look into it.

1 Like