Notifications
Clear all

pi to control via internet  

  RSS
Tonino
(@tonino)
Eminent Member
pi to control via internet

Hello guys,

I need you help! 🙂 

I'm looking something to check my printer via internet, when I'm not at home. I bought a Pi Zero W and it works... via LAN, but not via web!

I would like to find something to check my printer, pause the print or stop it via internet (ie in case of warping)

Today I usually use an ip-camera to check the printer and a wifi switch to switch-off ...t I would like to upgrade this! 

Can any one help me? 

Thanks 

Posted : 12/06/2020 8:45 pm
bappiseo liked
jsw
 jsw
(@jsw)
Famed Member
RE: pi to control via internet

I assume that you are on a more or less standard residential cable or DSL type internet connection. I'm also assuming more or less standard legacy IPv4 addressing on both your outward-facing device and your internal LAN.

I've done this with several devices and yes, one Pi.

It basically involves finding a TCP port that your internet provider is not blocking for incoming connections and doing some configuration on your router to allow the connection.

It also implies that all of your network gear is configured to be resistant to abuse! If you are uncertain on how to do that, I strongly suggest that you do not proceed until you are confident.  Script kiddies are constantly scanning IP blocks for open ports and when they find one they hammer at it looking for such things as weak passwords and known security issues.

Most providers block TCP port 80, the usual web port, for incoming connections on all residential grade connections.  They usually allow many/most of the higher ports.  Pick one.  I suggest that you don't use the usual alternate web ports such as 8080, 28080, etc., as wannabe-hackers concentrate on those and other well-known ports.  Pick an arbitrary one high up in the port space.  45379 would be an example of one that might be a less-unsafe one to use.

Then configure your router to allow an incoming TCP connection on that port.

You have a choice to make.  You can either configure your Pi to respond to that port, or leave it at port 80 and do the translation in your router.

You will need to adjust the rules in your router/firewall to allow the incoming traffic, plus do a NAT (network address translation) to translate the incoming traffic on that port which is destined for your internet-facing IP address to the local IP address of your Pi, which will usually be 192.168.1.x or something similar.  Also, optionally do the port translation.  The better routers allow this.

That's the basic idea.  I know quite a few people using this technique to get incoming traffic from the Internet to their home network devices.

Let me again emphasize. Be VERY careful with your Pi and router configuration.  There are all kinds of script kiddies with too much time on their hands who would LOVE to access your device and (if you're lucky) either just dork around with your local network or worse, use your system for any of several not-so-nice purposes.

I hope this helps, but please be careful!

Posted : 12/06/2020 10:02 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE: pi to control via internet
Posted by: @antonio-d6

Hello guys,

I need you help! 🙂 

I'm looking something to check my printer via internet, when I'm not at home. I bought a Pi Zero W and it works... via LAN, but not via web!

I would like to find something to check my printer, pause the print or stop it via internet (ie in case of warping)

Today I usually use an ip-camera to check the printer and a wifi switch to switch-off ...t I would like to upgrade this! 

Can any one help me? 

Thanks 

Maybe you could give teamviewer a try: https://pimylifeup.com/raspberry-pi-teamviewer/

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 12/06/2020 10:54 pm
kirby
(@kirby)
Trusted Member
RE: pi to control via internet

You may get more help on the Octoprint forums. This question and the possible solutions have more to do with Octoprint than the do the printer.

Posted : 13/06/2020 2:50 am
Peter in Katy
(@peter-in-katy)
Estimable Member
RE: pi to control via internet

The Octoprint plugin SpaghettiDetective will do what you need.

You can monitor your print, upload and start gcode, and it will even alert you if it thinks a print is failing. It's not free for the normal installation, but you can set up a local linux box to do all the backend stuff.  

You'll also need something with a bit more power than the RPi0.

Posted : 14/06/2020 12:04 pm
towlerg
(@towlerg)
Noble Member
RE: pi to control via internet

a. take krb's advice - it a good board with lots of patient knowledgeable peeps 

b. if you are trying http://octopi.local/ then try just the IP address.

c. Static address are easier to resolve than dynamic. Just a single entry in a text file.

d. if you are using dynamic address, are you running Bonjour?

e. lose the zero, it really is no longer fit for purpose.

Posted : 14/06/2020 12:32 pm
Tonino
(@tonino)
Eminent Member
Topic starter answered:
RE: pi to control via internet
Posted by: @peter-k42

The Octoprint plugin SpaghettiDetective will do what you need.

You can monitor your print, upload and start gcode, and it will even alert you if it thinks a print is failing. It's not free for the normal installation, but you can set up a local linux box to do all the backend stuff.  

You'll also need something with a bit more power than the RPi0.

Hello. Thanks... Which one should be fine for the purpose? 

 

Thanks 

Posted : 14/06/2020 1:02 pm
kirby
(@kirby)
Trusted Member
RE: pi to control via internet
Posted by: @antonio-d6
Posted by: @peter-k42

... 

You'll also need something with a bit more power than the RPi0.

Hello. Thanks... Which one should be fine for the purpose? 

 

Thanks 

I think the common wisdom is at least a RPi 3B if you're going to be doing anything with streaming video. It only has 1GB of RAM, but I don't think mine has hit the swap space yet, so 1GB appears to be fine. If I were buying new right now I would buy a RPi 4 with 2GB of RAM, just so I could use it for more things in the future. Or, if you're comfortable with this, you can go down the rabbit hole of Raspberry Pi competitors, I haven't tried any of them, but I've heard several are really good value.

Posted : 14/06/2020 2:42 pm
Tonino
(@tonino)
Eminent Member
Topic starter answered:
RE: pi to control via internet

Thanks. I'm looking for solutions. A Pi4 costs about 80€? A netbook 150... But it's almost perfect and can run multiple instances of octopi. Am I wrong?

 

Which are the comptetior of raspebbery? 

 

Thanks

Posted : 14/06/2020 6:08 pm
kirby
(@kirby)
Trusted Member
RE: pi to control via internet

80EUR is too much. Unless you're talking about a kit with other things in it. Start here:
https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ Select your 2GB and your country. In the US, I can get a 2GB RPi 4B for about 35USD (31-32EUR)  A netbook will almost certainly be more powerful, but it will be bigger and powering it will be a dedicated power adapter or maybe USB-C. 

As for competitors, you'll need to do some research to find one comparable to an RPi 3 or 4. One advantage to staying with a Raspberry Pi is the community and support. If you run into trouble or have a question many more RPis are out there in the world. I would only recommend a competitor if either you're following a guide for getting OctoPrint installed and working, or you're comfortable getting a Linux system up and running and have some basic electronics knowledge. 

A few competitors I have heard of (I have not tried any of these):

  • Orange Pi
  • Banana Pi
  • ODroid N2
  • RockPro64
  • Nano Pi M4

Again, I really think you'll get better help at the OctoPrint forums, nothing about these questions are specific to Prusa printers, and the folks on the OctoPrint forums have a much wider range of  experience with running OctoPrint in a variety of situations. 

 

This post was modified 4 years ago 2 times by kirby
Posted : 14/06/2020 7:39 pm
HeneryH
(@heneryh)
Estimable Member
RE: pi to control via internet

This sounds like basic Port forwarding on your home router.  All you need to do is forward incoming Web IP connections to your home router to your OctoPi device.

 

There are ways to make it more secure such as running a reverse proxy to broker incoming connections but that could be step-2.

Posted : 22/06/2020 3:44 pm
bobstro
(@bobstro)
Illustrious Member
RE: pi to control via internet
Posted by: @heneryh

This sounds like basic Port forwarding on your home router.  All you need to do is forward incoming Web IP connections to your home router to your OctoPi device.

No no no! Please read the Octoprint page on securing remote access.

There are ways to make it more secure such as running a reverse proxy to broker incoming connections but that could be step-2.

You need to secure your system first, before opening it up. With the probing that goes on these days, an insecure system will be discovered and exploited very quickly. Follow the best practices to avoid heartbreak.

 

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 22/06/2020 5:18 pm
HeneryH
(@heneryh)
Estimable Member
RE: pi to control via internet

Yes, devices get probed all of the time.  But a Raspberry Pi running a modern web browser with user credentials should be on the safer side as compared to a WebCam with default admin/admin credentials.

To each his own, I am running a reverse proxy behind an Nginx/Ubuntu VM that brokers all of my inbounds and have a mix of user credentials and user certificates.

People get into religious battles when it comes to this.  Some will say VPN is the only way to go.  Some say a Reverse Proxy is preferred.  Some say a modern web browser on a modern OS with user credentials is OK.  Nobody should ever say that default credentials or an unknown Chinese IoT device is OK.

Posted : 22/06/2020 5:25 pm
jsw
 jsw
(@jsw)
Famed Member
RE: pi to control via internet

At least the current Raspberry Pi makes you change the default password.  For a long time, that was not enforced, and it's amazing how many of them are out there with defaults.  🙁

Posted : 22/06/2020 5:40 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE: pi to control via internet

@bobstro

Maybe this could ba an interesting article for you 👍 https://www.zdnet.com/article/thousands-of-3d-printers-may-be-leaking-private-product-designs-online/

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 22/06/2020 6:06 pm
bappiseo liked
bobstro
(@bobstro)
Illustrious Member
RE: pi to control via internet
Posted by: @heneryh

Yes, devices get probed all of the time.  But a Raspberry Pi running a modern web browser with user credentials should be on the safer side as compared to a WebCam with default admin/admin credentials.

Please note that I linked to the official Octoprint guidelines as put forth by the developer

To each his own, I am running a reverse proxy behind an Nginx/Ubuntu VM that brokers all of my inbounds and have a mix of user credentials and user certificates.

That sounds great. I was just alarmed when I read "that could be step 2". Unfortunately, it always seems to get put off until something unfortunately happens.

People get into religious battles when it comes to this.  Some will say VPN is the only way to go.  Some say a Reverse Proxy is preferred.  Some say a modern web browser on a modern OS with user credentials is OK.  Nobody should ever say that default credentials or an unknown Chinese IoT device is OK.

The problem I see in a lot of the 3D printing (and other) groups is that new users get enthusiastic about something, implement it without understanding the risks thinking "nobody will notice" and are often surprised when someone notices within hours. Unfortunately, fingerprinting raspberry pis is one of the top scanning activities these days, so obvious ones (default ports, accounts) get sniffed out quickly. If you're at the point of doing ssh, reverse proxy or VPN, you're ahead of most of the new users at least!

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 22/06/2020 6:40 pm
bobstro
(@bobstro)
Illustrious Member
RE: pi to control via internet
Posted by: @karl-herbert

@bobstro

Maybe this could ba an interesting article for you 👍 https://www.zdnet.com/article/thousands-of-3d-printers-may-be-leaking-private-product-designs-online/

I believe that's the same incident that Gina refers to on the Octoprint page. She was not happy to find herself defending the security of a package that was never meant to be exposed to the internet in the first place.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 22/06/2020 6:41 pm
HeneryH
(@heneryh)
Estimable Member
RE: pi to control via internet

OK, you want people who don't even take the time to create/reset user credentials to perform even more complex tasks?  Sure.  I read that article and expected to find some undisclosed vulnerability to be the culprit.  Nope.

I consider basic user hygiene table stakes but I suppose I could be more explicit in my comments in the future.

Posted : 23/06/2020 1:32 am
Share: