Giter Club home page Giter Club logo

local-windows-blynk-server's Introduction

Local-windows-Blynk-server

This is an up to date tutorial on how to set up a local windows Blynk server with a mention of some issues, giving you more security and inf. energy points.

Getting Started

these insturction will guide you on how to build your own windows local Blynk server, other online tutorials found to be out of date or not mentioning some special cases, it is highly recommended to start using blynk cloud at first to get an overview about blynk platform, then move to the local server -it's a bit buggy-.

PS1: you will find other tutorials on how to build it on Mac and Linux, it's easy.

PS2: if you have some experiance in the field, follow the original repository.

Requirements

  • Blynk Library.

  • Blynk APP: Google Play , Apple Store.

  • Java 9.

  • Open ports 8443 (for app), 8442 (for hardware without ssl), 8441 (for hardware with ssl), Open by default.

  • The latest Blynk local server to be found here.

  • Mail and Server properties to be found in this repository.


Installing

  • Install Java v9 via a normal double click, you can check your existing version by opening the cmd and typing:
java -version

You should get the following output:

java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
  • Create a folder, let say for example C:/BlynkServer, put the installed server, the downloaded mail and server properties files in it.

  • Right click the mail file, add your email and password in where requested:

[email protected]
mail.smtp.password=xxxx
  • Make sure your E-mail accepts unknown apps requests, to do that go to your email's security, if you have a two way authentication you have to add Blynk to the approved apps, else just go here and allow less secure apps.

Running the Server

  • Start the cmd as administartor: to start a command prompt as an administrator, you can search for cmd, rightclick it and run at as administrator, or: Click Start, click All Programs, and then click Accessories. Right-click Command prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  1. Now we need to go to the path where we created the folder, simply type cd and the folder path after it, for example:
cd c:/BlynkServer
  1. Run the server:
  java -jar server-0.28.6.jar -dataFolder /Path

You should get the following:

Blynk Server 0.28.6 successfully started.
All server output is stored in folder 'c:\BlynkStuff\.\logs' file.
  1. Thats it, now you should see two new folders being created, Keep it running, if you want to stop it just Ctrl + C.
  • Get your local IP by by going to cmd and type:
ipconfig

this should return lots of info including your local IP that looks something like this:

IPv4 Address. . . . . . . . . . . : 192.168.1.55

Save it somewhere, you are going to need it later.


Connecting to the Server

  • Run the Blynk Application, and go to Create New account, follow the picture by adding your own local IP, and enter any email and password.

  • You should be logged in, Create a project and check if you recived an auto token via your E-mail, if not; check your email security as said above or disable antivirus SSL sheild in your mail scanning, if the problem remains, you can still get it via the admin panel as we will see later.

  • After creating the project you will have 100,000 Energy points to use and you will be connected to the local server.


Uploading a sketch

  • After downloading the Blynk library and extracting it to the Arduino's library folder -usually located under Documents\Arduino\Libraries, open the Arduino IDE.

  • pick any sketch, the only thing it change will be as follows:

OLD


  Blynk.begin(auth);
  // You can also specify server:
  //Blynk.begin(auth, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, IPAddress(192,168,1,100), 8442);
  

NEW


//Blynk.begin(auth); , //We will comment this
// You can also specify server:
//Blynk.begin(auth, "blynk-cloud.com", 8442);
Blynk.begin(auth, IPAddress(192,168,1,100), 8442);  //Uncomment this, enter your local server's IP

that's all, Upload the sketch, you're ready to go.


Accessing the admin panel

  • Usually when you start the server for the first time, it will give you admin email and password as follows:

Email : [email protected]

Password: admin

  • Go to:
https://your_ip:9443/admin

OR

https://localhost:9443/admin

From there you will monitor your server, access signed users, check their projects and auth tokens.

That's All.

Good luck tinkering around!

local-windows-blynk-server's People

Contributors

maohasan avatar

Stargazers

 avatar  avatar Shaima Al-Shaibani avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.