Help needed : raspberry pi for WOL with html

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Help needed : raspberry pi for WOL with html

Post by /RaspberryPi »


So I am trying to set my Raspberry pi up so I can WOL my pc OUTSIDE of my house. Meaning, when I am far away and not in the same connection. As you can tell I am a noob when it comes to technical terms and /or anything remotlely to do with coding

What I tried so far:
  • I installed raspberrian (the os, i hope thats what its called. )
  • Tried this tutorial (sorry its german) https://youtu.be/TsPg7UEmrZk?si=IMXe4u1vAd6ap7QS where you basically turn your raspberry into a LAN server. The python script never worked so I tried etherwake instead.
  • now if I type the command >sudo etherwake 00:11:22:33:44:55) my pc starts wohoo... that was the first thing. But I do not need it at home, i need to start my pc outside of my network.
  • I made a site (dont know the right name for that, sorry) on . made the port forwarding in my router and the site told me it works.
  • I installed PIVPN. and as far as i can tell it works. (can I test it if it works?) Since then if i connect my PI to a screen, it just shows the console (so maybe it did not work?)
  • I can enter the site (will come to that shortly) if I enter it in my cell (not in home-network).

The site has a button and if i press the button, wol will be sent but it does not. It just shows what is written in the .sh file without running it.

So I need help with making the website work, so it will send the command to the raspberry to make the raspberry send the magic packet (= etherwake) to my pc.

Here is how the html is written :









Wake on LAN Server



body {

font-family: Arial, Helvetica, sans-serif; }







Wake on LAN Server

sowpc


Image








The content of the sh file is as follows:

sudo etherwake 00:11:22:33:44:55

Running the command in cmd does start my pc.

Could anyone be so kind as to help me? What do I write in the html file? Do I need another file to make it run (like python or so)? Is my sh file even right? Is there another way to enter the command when not in my home-network?

Thank you!
submitted by /u/Lady_sunshines
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... with_html/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”