Step 1 :
Download Java SE Development Kit from : https://www.oracle.com/in/java/technologies/javase-jdk16-downloads.html#license-lightbox
Download the server file from : https://osoyoo.com/driver/blynk/blynk-server.jar
Make a Folder for the data files of the server and save the Java server file in that folder.
Step 2 :
Copy the path of the folder where you saved the.
Open Command Prompt or Terminal and type the following command with the your path and press enter.
cd "<server file path>"
Ex : cd "C:\Users\devat\OneDrive\Documents\Blynk Server"
Step
3
:
Now enter the following command initiate the server and create directories.
java -jar <Name of the Server File for Blynk.jar> -dataFolder <Folder name where main files will be stored>
Ex : java -jar blynk-server.jar -dataFolder Server_Data
Your Local Blynk Server has successfully started, now you can use the Admin URL on any web browser to monitor and manage your Local Server. If you're using chrome, you might get a security message, to continue click Proceed to.
Step 4 :
Type in the login Email and the Password to enter
Now you can manage clients, users, boards widgets, change energy and lots more
Step 5 :
To access this server on the Blynk app, use the account that you used to login on the Server Management Page and select custom server. Enter the IP address of the Computer on which the Blynk Server is running.
Step 6 :
To find the IP Address of your Computer, open Command Prompt or Terminal and enter ipconfig
Enter the IP Address along with the port number displayed on Comand Prompt when you started the server.
Enjoy Unlimited Energy
The problem with this is that the server closes as soon as you close the Command Prompt or the Terminal and also you need to write the command every time you boot your Computer.
cd "C:\Users\devat\OneDrive\Documents\Blynk Server"
java -jar blynk-server.jar -dataFolder Server_Data
How to start your server automatically when your Computer boots :We need to create a Batch Script to start the server just like we did.
Open notepad and type in
@echo off
echo Starting Blynk Server...
echo Your working directory is=C:\Users\devat\OneDrive\Documents\Blynk Server
cd "<server file path>"
java -jar <Name of the Server File for Blynk.jar> -dataFolder <Folder name where main files will be stored> &
IF /I "%ERRORLEVEL%" NEQ "0" (
ECHO Server failed to started
)
echo Server started successfully.......
|
Ex : Mine looks like :
@echo off
echo Starting Blynk Server...
echo Your working directory is=C:\Users\devat\OneDrive\Documents\Blynk Server
cd "C:\Users\devat\OneDrive\Documents\Blynk Server"
java -jar blynk-server.jar -dataFolder Server_Files &
IF /I "%ERRORLEVEL%" NEQ "0" (
ECHO Server failed to started
)
echo Server started successfully.....
Click Save As.
Save it where your server directories are and save it as Unkown and then <File_Name>.bat
Now by opening this script your server will start but it will still not be in the background.
To make this file start with Windows, we make a Visual Basic Script(.vbs). Press Win + R to open Run Command and type in shell:startup to open the startup folder. Make a text document and open it on notepad and then type in the following command.
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "Path to the .bat file" & Chr(34), 0
Set WinScriptHost = Nothing
|
Ex : For
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\Users\devat\OneDrive\Documents\Blynk Server\Server Start.bat" & Chr(34), 0
Set WinScriptHost = Nothing
Save as <File_Name>.vbs
Now your Server will start as soon as your Windows is booted. Hope it helps :)
Comments