Skip to content

Commit d04dc4c

Browse files
committed
update instructions
1 parent 086562b commit d04dc4c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Remote switch to turn on, off, reset or kill PC via a web interface.
44

5-
This project is based on a Arduino with a ethernet shield and a small daugtherboard to connect to PC headers by decoupling the two circuits with optocouplers. The power for the Arduino is sourced from the PC's motherboard USB header. The switch interface is hosted on the ethernet shield as a website and can be accessed from anywhere on the network via a webbrowser.
5+
This project is based on a Arduino with a ethernet shield and a small daughter board to connect to PC headers by decoupling the two circuits with optocouplers. The power for the Arduino is sourced from the PC's motherboard USB header. The switch interface is hosted on the ethernet shield as a website and can be accessed from anywhere on the network via a web browser.
66

77
![Web interface](./web.png)
88

docs/BuildInstructions.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,20 @@ Recommended way is to deploy the website on a dedicated webserver due to problem
5151
- Comment in `#define WEBSITE_ON_EXTERNAL_WEBSERVER`
5252
- Set the IP address in the `src.ino` file and save.
5353

54-
2. In `web/src/index.htm`
54+
2. Create a directory on your server e.g. `remote-switch` and copy `web/src/config.json` to it
5555

56-
- Set the `URL` constant to the IP address of the arduino ethernet shield
56+
- `mkdir remote-switch`
57+
58+
3. In `remote-switch/config.json`
59+
60+
- Set the `apiUrl` constant to the IP address of the arduino ethernet shield
61+
- (optional) Change the `title`
5762

5863
3. Deploy the webserver using docker
5964

60-
- docker build -t remote-switch .
61-
- docker run -p 80:80 remote-switch
65+
- `cd` into `remote-switch` directory
66+
- docker pull ghcr.io/matiasg19/remote-switch:latest
67+
- docker run -p 80:80 -v ./config.json:/usr/share/nginx/html/config.json remote-switch
6268

6369
4. Test if the website can be reached by typing the IP into the web browser.
6470

0 commit comments

Comments
 (0)