You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,30 +40,33 @@ network={
40
40
41
41
## Software Install Instructions
42
42
43
-
SSH into the Raspberry Pi after powering it. Make sure you are in the same Wifi network to SSH. The default hostname will be `raspberrypi` so you can login via `ssh [email protected]`. The default password is `raspberry`
43
+
Run the following commands in the Terminal. To remote log in you will need to SSH into the Raspberry Pi after powering it. Make sure you are in the same Wifi network to SSH. The default hostname will be `raspberrypi` so you can login via `ssh [email protected]`. The default password is `raspberry`.
44
44
45
45
1. First change the password using `passwd`
46
46
1. Then install docker using this command `curl -sSL https://get.docker.com | sh`
47
47
1. Then make the pi user be able to executa commands as sudo user inside of the docker container via this command `sudo usermod -aG docker pi`
48
48
1. Reboot raspberry pi using `sudo shutdown -r now`
49
-
1. Then pull the docker container containing our code `docker pull encoreptl/thermostat-sensor:latest`
50
-
1. Add the following to the `/etc/rc.local` before the `exit 0` line
51
-
```
49
+
1. Then ssh into the raspberry pi again and pull the docker container containing our code `docker pull encoreptl/thermostat-sensor:latest`
50
+
1. Finally start the container using the command below and it will always run the container even when raspberry pi gets restarted
51
+
52
+
```sh
52
53
docker run \
53
-
--privileged \
54
-
-e PYTHONUNBUFFERED=1 \
55
-
-e SERVER_DOMAIN=thermostat.encoredevlabs.com \
56
-
-e BUTTON_PIN=25 \
57
-
-e TEMP_SENSOR_PIN=4 \
58
-
-e REPORT_INTERVAL=60 \
59
-
-v /sys:/sys \
60
-
-d \
61
-
encoreptl/thermostat-sensor
54
+
--privileged \
55
+
--restart=unless-stopped
56
+
-e PYTHONUNBUFFERED=1 \
57
+
-e SERVER_DOMAIN=thermostat.encoredevlabs.com \
58
+
-e BUTTON_PIN=25 \
59
+
-e TEMP_SENSOR_PIN=4 \
60
+
-e REPORT_INTERVAL=60 \
61
+
-v /sys:/sys \
62
+
-d \
63
+
encoreptl/thermostat-sensor
62
64
```
63
65
66
+
64
67
## Configure where to send Temperature Data, Reading Frequency and GPIO PIN numbers
65
68
66
-
You can configure by setting the following environment variables in the docker run command to your liking:
69
+
You can configure the container by setting the following environment variables in the docker run command to your liking:
67
70
68
71
*`SERVER_DOMAIN` - Setting this will post the reading to this domain and it can container port number as well
69
72
*`REPORT_INTERVAL` - Frequency of how often you want to send temperature readings in seconds
0 commit comments