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

Changing the node SSL port to point to Blynk local server

rpi
#1

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

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

#4

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

0 Likes

#5

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

#6

whats the diffirence between the two

0 Likes

#7

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

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

0 Likes

#8

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

0 Likes

#9

I followed your commands and ended with this lol

0 Likes

#10

try this? (then retry)

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

#11

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

0 Likes

#12

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.

0 Likes