Getting error while compile sketch for local server

Hi, I am using Arduino Uno and ESP8266. I tested my project before with Blynk cloud and it was working fine. Now I was trying it with local blynk server on my laptop. I started Blynk server and logged into Blynk app using IP address.

In next step I was trying to update existing sketch to include IP address. However, I was getting error while compiling sketch as below.
Below lines were changed in sketch.
// Blynk.begin(auth, wifi, ssid, pass);
Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,0,103));
Error is ‘IPAddress’ was not declared in this scope.

Could anyone please help ?

Thanks,
Krunal

I just replaced it with
Blynk.begin(auth, wifi, ssid, pass,“192.168.0.103”);
and it is working now.

However when I am trying to open admin page it is not opening. My browser says, cant reach the page after trying few minutes.

Thanks,
Krunal

Exactly what url are you using for the admin page?

Hi @Costas,
I am using https://192.168.0.103:8443/admin.

Also how I can call HTTP RESTful APIs for local server. I tried to call APIs for Blynk cloud and it works fine.

Thanks,
Krunal

change the second 8 to a 7.

It’s all covered in the docs, Port forwarding for HTTP/S API:

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

It is giving same error. However, when I try with 8443, I get certification error and tries for few minutes. However, when I try with 7443 it directly gives me error.

Thanks,
Krunal

Sorry Costas, I am little weak in networking.

Could you please confirm if these commands are for Unix or Windows ? I am using Windows 10. Do I need to run both the commands from cmd window ?

Thanks,
Krunal

Commands are for Unix.

:frowning: any similar commands for Windows ?

Thanks,
Krunal

then you haven’t set up your system correctly as it must be port 7443.

Hi,

I can see application port is 8443 and hardware port is 8442. Hence should it be different while opening admin page ?

Thanks,
Krunal

Yes because admin has a dedicated port as specified in server.properties

Try:

https://127.0.0.1:7443/admin

Thanks Costas, it worked. Hence it looks like steps for server.properties are mandatory.

Also last thing regarding, REST APIs, any similar commands to be used in Windows to use REST APIs with local server ?

Thanks,
Krunal

Not mandatory but highly recommended as there are a lot of parameters that Blynkers should review.
Second to last parameter is access to admin panel which is just available from 127.0.0.1 unless you add other IP addresses.

Or 0.0.0.0/0 to allow all IP’s. As long as you don’t forward the 7443 port from your public router IP to your machine, you are safe. Admin page should only be reachable from the internal network, from a security perspective anyway :slight_smile:

1 Like

for that i have setup Team Viewer unattended password on my Raspberry Pi 3 so i can safely any time access it
and use Admin WebUI.
because i hate ssh and CLI and headless machines

here is the link to Team viewer for RPI for who didn’t know it.

2 Likes

Awesome! I was wondering when they were gonna support the ARM. Thanks for the link!