Help me understand using local-server

Hi,
Greetings from Australia…

After much anguish - with getting around Oracle’s new rules re Java downloads now requiring a Login - I finally found a work-around.
– Not to mention the Blynk pages, where one says “you MUST have Java 11…” which led me to UNinstall Java-8 and another that provides a link to a[server-0.41.14-java8.jar] download !!

I am using Windows 10, Arduino 1.8.13 and an iPhone.

Anyway, I now have a freshly minted Blynk local-server setup and running in Firefox from the generated IP address.
– I can’t find anything regarding it logging into my local WiFi network… which does not make sense to this old EX-sys-admin “computer guy”.

I cannot find info on the workflow between the server and my script(s) and/or the iOS App.
– Nor info on connecting my regular Blynk (App) account and the local server.

I installed the Blync library to Arduino IDE from the Ardo’ installer - should I have done that manually?

Please point me in right direction or advise if I missed something.

TIA…

It’s not clear from your description what hardware you’re running your local server on. I assumed that it was a Windows 10 machine from what you said, but then this question about logging-in to the local WiFi network threw me.
Your server needs to connect to your network in some way, either by Ethernet or WiFi, but the server doesn’t need a separate login, it simply uses the existing network connection for its communication.

If you’ve been using Blynk cloud servers then there is no connection whatsoever between an account there and on your local server. You could clone a cloud project and use it with your local server, but that’s getting ahead of ourselves at this stage.

Data flow when everything (server, app and device(s)) are connected to the same network are fairly simple. You fire-up your server and find it’s IP address. You then log-out of any cloud server accounts on your app and enter the local server’s IP in the custom server settings screen…
image

image

You then register an account on your local server which will take you into the app. You create a project and add devices and email the auth codes to yourself. If you’ve not gotten your server email working correctly yet then you can either copy the auth codes from the app and send them from the iPhone’s email client, or view then from your server admin screen at:

https://your_ip:9443/admin

default credentials are:

  admin.email=admin@blynk.cc
  admin.pass=admin

In your sketch you tell the device to connect to the local server:

Blynk.begin(auth, ssid, pass, IPAddress(192,168,0,53), 8080);

and to use the Auth code from your local server, then everything should work.

You’ll obviously want to use your Blynk app at times when you aren’t connected to your home network, and in that case you’ll either need a static public IP address or a DDNS service. The public IP or DDNS URL is used in the Custom Server screen of the app. You also need to forward traffic on port 9443 to your local server. If you want to use devices outside of your local network then they would need to have the public IP or DDNS URL in the Blynk.begin command instead of the local IP.

Another option is to use a service like ZeroTier instead of port forwarding. This is something I’ve recently started doing and I much prefer this approach.

Hopefully that gets you to a point where you can start to use your local server.

Pete.

Hi Pete,
Thanks for your thorough response.
I have followed it to the letter… as far as I was able.

Yes, I noticed the lack of system detail and edited my post.

Anyhow, I have now :
Logged out of blynk App on iPhone.

tried to “setup new account” as per your instruction
– put in the IP :9443
… the app then wants an email/pw

1st attempt: “…cannot connect to server”.
– I check my iPhone WiFi network, Mobile internet… connect to Blynk website via iPhone Firefox… to check 'Net connection…All OK.

2nd attempt using:
a. admin@blynk.cc - | No go
b. previous cwm...@gmail.com - no go (app tried to connect then says " no such email on our database".
c. NEW cwm...x@gmail.com and new PW
App logs in…
but (I presume) that is now logged into cloud again.
and it sends me a “welcome” email… NO new credentials as I received first time around.
– I log out.

How do I "register an account on your local server " ? I can’t get past the App.
– putting 192.168.254.187:9443 in there seems to do nothing.
– I have deleted the App and reloaded - twice .
– I am using an iPhone SE (2nd gen) on IOS 14.

Having started the server at CMD prompt, are there command-line facilities available to me?

from browser https://192.168.254.187:9443/admin
… All I get is login screen to which I am unable to login.
I tried 1. clearing cookies from; opened (rarely used) palemoon browser … same IP/admin;
same login screen .

From a sketch (Arduino) point of view I no longer have an [char auth = “…”] code.

Having now spent TWO approx. 10 hour sessions on this…
I am now fed-up with the whole exercise and need to take break from Blynk and get back my other projects. I may return at some future point.

BTW, am I able send an email to someone who could delete ALL references to the two email addresses, including auth codes etc. I have used and cancel account(s). So I can start from scratch (again).

I have kept a link to your post and will go through it again - though I do think there are couple of gaps :wink:

Happy New Year for 2021.

Thanks again,
Chris


Click “Create new account”

I’m not sure when using Windows, my server runs on a Pi, but there’s plenty of info here…

https://github.com/blynkkk/blynk-server

Maybe try Chrome. It will warn you that the site is unsafe, but continue to the login screen.

Are you referring to cloud server accounts? If so, I’m not sure why you would need to do this.

Pete.

Also, if your still having problems with logging-in to the admin screen then there are a couple of things to check in your server.properties file…

# default admin name and password. that will be created on initial server start
admin.email=admin@blynk.cc
admin.pass=admin

Check that the admin email and password are the default ones as above.

#comma separated list of administrator IPs. allow access to admin UI only for those IPs.
#you may set it for 0.0.0.0/0 to allow access for all.
#you may use CIDR notation. For instance, 192.168.0.53/24
allowed.administrator.ips=0.0.0.0/0,::/0

Check that you haven’t restricted the IP addresses that can log in to the admin console.

The server.properties file normally sits in the same location as your server-xxxxx.jar file, unless you are specifying a different path in your startup command like this UNIX example…

java -jar server-0.41.13-java8.jar -dataFolder /home/pi/Blynk -serverConfig /home/pi/someFolder/server.properties

Pete.