Where do I insert Auth tokens in Blynk local server, raspi?

Hi Costas, I have looked into what might be needed in the startup script and have came up empty. Would you be as kind to point me in the direction of a resource to help figure out what this script might look like.

Also I have found many different methods of sending sensor data from RPI to Blynk app. In your opinion what is the best way? Can we talk about this here or should I start a new topic? Thanks!

@Shane_Pennington try something like this (with the current server version of 0.21.6):

sudo nano blynksetup

paste in the following and then press CTRL X and Y for Yes to save (obviously including your ip and token details).

 #!/bin/sh
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 9443
java -jar /home/pi/server-0.21.6.jar -dataFolder /home/pi/Blynk &
sudo ~/blynk-library/linux/./blynk --server=xxx.xxx.xxx.xxx --token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx &

then issue the following one time command to make the script executable

sudo chmod +x blynksetup

and finally this command

crontab -e

and enter the following and then save and exit crontab

@reboot sh blynksetup &

I’m not qualified to say as all my sensor work is done with ESP’s and Arduino’s. Perhaps start a new thread.

1 Like

Thanks Costas, I appreciate it.