How to Install a Blynk Local Server on Raspberry Pi
Install a local Blynk server on Raspberry Pi

The Blynk server is developed in Java so the first thing to do is to check that Java 8 is installed on your Raspberry Pi using the below command:
"java -version"
If it is not installed then run the following command to install Java 8.
"sudo apt install openjdk-8-jdk openjdk-8-jre"
Then download the Blynk server JAR file using the below command:
"wget "https://github.com/blynkkk/blynk-server/releases/download/v0.41.12/server-0.41.12-java8.jar"
Once that is done, the server is ready to run out of the box, all we need to do is start the server using the below command:
"java -jar server-0.41.13-java8.jar -dataFolder /home/pi/Blynk"
As output you will see something like that:
Or you can start the server automatically at boot. For that use the below command to open up crontab:
"crontab –e"
And add the below command at the end of the file. Change the file path to match your installation directory.
"@reboot java -jar /home/pi/server-0.23.0.jar -dataFolder /home/pi/Blynk &"
Save the changes by typing CTRL+X, then Y, then pressing the ENTER key.
Configuring the mail.properties file:
The Blynk server sends an email with the authentication token every time you create a new project. For that, we need to configure the mail settings by creating a new file named mail.properties and save it to the same folder as the server. That can be done by running the following command:
"sudo nano mail.properties"
Then add the below lines in the mail.properties file. Don’t forget to add your Email id and Password in the last two lines.
"mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=Your EMAIL ID
mail.smtp.password=Password"
Save the changes by typing CTRL+X, then Y, then pressing the ENTER key.
With this done the Blynk Server setup is over. Reboot the Pi using the below command:
"sudo reboot"
Configure the Blynk App
Now download the Blynk app from Play Store or App Store and click on create a new account option.
Then click on the icon at the bottom of the screen. Click the button to activate the Custom mode. Enter the IP address of the local Blynk server i.e. IP address of the Raspberry Pi and then click OK.
On the next screen, enter a valid email and password to create an account on your local server.
Posting Komentar untuk "How to Install a Blynk Local Server on Raspberry Pi "