element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Forum How to communicate to a Arduino behind firewall or router from a website
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 13 replies
  • Answers 1 answer
  • Subscribers 511 subscribers
  • Views 3654 views
  • Users 0 members are here
  • internet of things dashboard
  • blynk
  • internet control
  • arduino
Related

How to communicate to a Arduino behind firewall or router from a website

krrishh
krrishh over 8 years ago

I have developed a arduino application which listens to http connections but I need help in controlling the device through internet like how Blynk does. I have bought a website domain hosting which supports php webpages and python app. If anybosy could point me to a right direction to develop a script which can be hosted to the internet it will be helpful.

P.S : I don't want to use the services like thingspeak or Blynk but i want to develop one like them. Please guide me.

  • Sign in to reply
  • Cancel

Top Replies

  • BigG
    BigG over 8 years ago +2 suggested
    This is my suggestion. You could have saved yourself some money by using Google's Firebase service instead of paying for web hosting, as there is a free tier option. You can also use something like Cloudflare…
  • rob65
    rob65 over 8 years ago in reply to krrishh +1
    You can be sneaky about the way you manage it. You build the intelligence into your arduino app to handle it. The web interface contains the state of your arduino. The arduino then just reads the information…
  • BigG
    BigG over 7 years ago +1
    Suggest searching online. Another useful source of info is youtube. The Google Firebase team have created there own youtube channel. Loads of stuff on there to help (almost too much stuff): https://www…
Parents
  • rob65
    0 rob65 over 8 years ago

    The subject line you have is different to the content of your message.

    Your subject line is about NAT, port forwarding & firewall ALLOW rules.

    That's how you solve the problem of communicating with an arduino behind a firewall.

     

    The content of your message is about building an application in python to control the arduino.

    Google should be able to provide more than enough reference material on this. The above also

    links to an Instructable article showing you how.

     

    Normally you would use a web framework like Flask to help create the application.

    Python lives under/integrates with Flask.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • rob65
    0 rob65 over 8 years ago

    The subject line you have is different to the content of your message.

    Your subject line is about NAT, port forwarding & firewall ALLOW rules.

    That's how you solve the problem of communicating with an arduino behind a firewall.

     

    The content of your message is about building an application in python to control the arduino.

    Google should be able to provide more than enough reference material on this. The above also

    links to an Instructable article showing you how.

     

    Normally you would use a web framework like Flask to help create the application.

    Python lives under/integrates with Flask.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • krrishh
    0 krrishh over 8 years ago in reply to rob65

    Hi Robert, Thank you for your reply. Your link sure would help me. But i am a bit new to python. I will definitely give it a try. I know about NAT , port forwarding and Firewall options in router but unfortunately i wont have access to router in some places. So I want to develop a server hosted in internet which acts as a bridge between application in system and Arduinio. so that both system and arduino connects to the server as a client and communicate between each other. I have seen the same happening when i use Amazon Echo to turn on a emulated device in Arduino. I can see the TCP connection coming inside the network and turning on the device on command. I hope your link help me develop a server application which can be hosted in a normal internet web server.

     

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rob65
    0 rob65 over 8 years ago in reply to krrishh

    You can be sneaky about the way you manage it.

    You build the intelligence into your arduino app to handle it.

     

    The web interface contains the state of your arduino.

    The arduino then just reads the information on the web interface/service and replicates the state it reads.

    The web server never actually has to send commands to the arduino. This also eases the constraints on firewall and rules.

     

    For example. if I toggle a value on the web interface. The web interface updates its state.

    The arduino then calls in say every 10 seconds (or some other predetermined time) to see if the state on the website still matches its state.

    If it doesn't then it updates itself.


    If your app isn't real time critical/sensitive this is an easy way to handle it.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • krrishh
    0 krrishh over 7 years ago in reply to rob65

    Hi robert, I have installed python with FLASK in my cPanel. Is it possible to create a server in python which runs and listens to a specific port which does the peer to peer forwarding as a middle man? I have achieved this in C#.NET application but unfortunately it cant be hosted in a web server(LOL). I am also looking onto the Firebase from google but would like to know as much as possible on my own to create my own server to do the forwarding of ports like how teamviewer does.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube