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 ?
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.
Exactly what url are you using for the admin page?
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.
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.
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 ?
any similar commands for Windows ?
then you haven’t set up your system correctly as it must be port 7443.
I can see application port is 8443 and hardware port is 8442. Hence should it be different while opening admin page ?
Yes because admin has a dedicated port as specified in server.properties
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 ?
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
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.
Awesome! I was wondering when they were gonna support the ARM. Thanks for the link!