• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32-CAM-PanTilt control externally

Q&A Forum › ESP32-CAM-PanTilt control externally
0 Vote Up Vote Down
uengel asked 4 years ago

Hi Sara,
now that the PanTilt project with the ESP32-Cam PanTilt works great in the home network, I wanted to use port sharing, as with my other sensor projects, to enable control using my No-IP account outside of my home network. This works great for the other projects. Only here I can’t get a connection. I can’t explain myself. I only use a decentralized URL with a corresponding port instead of the local IP.

Do you have an explanation for me?

Many greetings, ULLI

13 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Without further details, it is very difficult to find out what might be wrong.
Did you succeed with using that method with other ESP32-CAM projects?
Regards,
Sara

0 Vote Up Vote Down
uengel answered 4 years ago
Hello Sara, I also have the option of receiving data externally on my mobile phone via port sharing on my ESP weather station. It works very well.
Now I wanted to make the ESP32-CAM applications (Photo Manager and Pan Tilt) externally operable via port sharing.
Unfortunately, this does not work with all my CAM applications. Is that because of the ESP cams? Unfortunately I couldn't find a solution. Many greetings, ULLI
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
I’m not sure, but it can be because of the video streaming.
But without further details, it is very difficult to find out what might be wrong.
Regards,
Sara

0 Vote Up Vote Down
uengel answered 4 years ago

Hello Sara, what additional information do you need?

Here is my problem:

It works like this on my weather station:

I have an IP 192.168.178.xxx under which I can reach my weather server in the home network. From outside I use a no-IP address with port sharing on my router:

xxxxxxxxx.ddns.net:83. This works fine.

Now I have also created a port release for ESP32-CAM-PanTilt from your eBook. I can control the servos locally and also see the stream. But not outside of my WiFi.

The IP is there with port forwarding: xxxxxxxxx.ddns.net:89. Unfortunately, this does not work.

Message: “Firefox cannot establish a connection to the server at xxxxxxxxx.ddns.net:89.”

Unfortunately I have no explanation.
Many greetings,

ULLI

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Hello, I haven’t used those services to configure the ESP to do port forwarding in a while. I’m not sure what’s missing in your setup.
The ESP32-CAM web server is like any other web server, so it should work fine if you assign the correct web server port to the port forwarding service.

  • Are you following the exact same steps that you’ve followed for the weather station?
  • What’s your ESP32-CAM IP address?
  • Is it still running locally? 
  • Are you connecting multiple clients at once to your ESP32-CAM web server?

Regards,
Rui

0 Vote Up Vote Down
uengel answered 4 years ago

Hello Rui,
in your sketch ESP32-Cam Pantilt I find two places where ports are specified:
window.onload = document.getElementById (“photo”). src = window.location.href.slice (0, -1) + “: 80 / stream”;
and
config.server_port = 81;

With the port forwarding I released port 81. If I now enter the URL xxxxxengel.ddns.net:81 in the mobile phone browser, I see the PanTilt control and I can move the cam from outside my WiFi. But I do not see the stream of the cam.

With the URL 192.168.178.31, I can control the cam within my WiFi and also see the stream.

I am not sure which port to open now?

Many greetings, ULLI

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
I don’t know if this helps, but the streaming is running on port 81 while the web server with controls + photo(streaming) is on port 80.
Regards,
Sara

0 Vote Up Vote Down
uengel answered 4 years ago

Hi Sara,
many thanks for the answer.
I already found this information in your sketch.
I am looking for a solution for a surveillance camera where the Pan Tilt control and the video stream run via one server. Then I can release the port of this server in the Fritz Box and can then control the cam from anywhere via mobile phone and see the stream.
e.g. with a URL like xxxxengel.ddns.net:88

Do you know such a solution?

Many greetings, ULLI

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Unfortunately we don’t have such project configured using ddns.net… 

  • What happens if you configure it to port 81, can you see the stream?

I think that a project that requires two ports in a single web server might not be compatible with that port forwarding setup.

0 Vote Up Vote Down
uengel answered 4 years ago

Hello Rui, if I set up port forwarding for port 81 and then call the URL xxxxxengel.ddns.net:81, I only get the message: This URI doesn’t exist.

I also suspect that projects with 2 ports cannot be controlled externally with ddns and port sharing.
That’s why I also had the question of whether there is a possibility of combining the stream and the control and sending them to an APP.
With this APP on the mobile phone you could then control the servos and see the stream. (MIT App Inventor).
Or is this also possible with Node-RED?

I don’t know that much about it, I only read about it briefly.

Many greetings, ULLI

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Hello, Unfortunately I don’t know a good solution either or how to configure it with the two ports. 
Yes, it’s possible exposing the Node-RED web page to multiple streams at once. 

  • In Build ESP32-CAM projects eBook PDF on version 1.2
  • PAGE 343 – Unit 6: ESP32-CAM IP Camera Access from Anywhere in the World

In this Unit, you’re going to make your ESP32-CAM IP Cameras accessible from anywhere in the world. In previous projects, the ESP32-CAM web servers were only accessible when connected to your local network. With this project, you’ll be able to create a surveillance camera network to monitor your home from anywhere.
I hope that helps!

0 Vote Up Vote Down
uengel answered 4 years ago
Hello Rui,
A few months ago I created a sensor project with BLYNK. There you could display the data worldwide using BLYNK on your mobile phone. In this context I had also read that you can also do ESP32-CAM streams and Pan Tilt control with slider.
Can't this also be used in your "Pan Tilt ESP32-Cam" project to control the ESP32-Cam from the Internet using BLYNK and to display the stream on the mobile phone?

Can you maybe show me how to incorporate this into your sketch?

Many greetings, ULLI
 
0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Hello again,
I haven’t used Blynk for a long time, but the app is already accessible from anywhere, however I don’t have any examples on how to integrate the ESP32-CAM with Blynk…
Regards,
Rui

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.