Browse Source

INSTALL instructions

nas 3 years ago
parent
commit
32190e18f8
1 changed files with 59 additions and 0 deletions
  1. 59
    0
      staging/dev/INSTALL

+ 59
- 0
staging/dev/INSTALL View File

@@ -0,0 +1,59 @@
1
+# Install instructions
2
+
3
+## Resources
4
+
5
+You'll need a rasbpiOs image, and the kernel and dtb for qemu 
6
+
7
+## Procedure
8
+
9
+### Enlarge img
10
+
11
+The downloaded img is resized on the SD card during the installation. We will need more space on the img. Qemu has command for that :
12
+
13
+```
14
+qemu-img resize rpi.img +1G
15
+```
16
+
17
+Install dependencies :
18
+
19
+```
20
+apt install git sqlite3 python3-pip python3-click python3-requests python3-netifaces python3-serial
21
+```
22
+
23
+Deploy pyHeatpump. Replace MONITORING_SERVER with the address of your server :
24
+```
25
+mkdir /var/lib/pyheatpump
26
+echo 'pip3 install --upgrade git+https://git.yannweb.net/maxime-alves/pyHeatpump.git' > /var/lib/pyheatpump/pyheatpump_upgrade.sh
27
+chmod +x /var/lib/pyheatpump/pyheatpump_upgrade.sh
28
+/var/lib/pyheatpump/pyheatpump_upgrade.sh
29
+
30
+sqlite3 -init /var/lib/pyheatpump/pyheatpump.sql /var/lib/pyheatpump/pyheatpump.sqlite3
31
+
32
+cat << EOF > /var/lib/pyheatpump/pyheatpump.ini
33
+[heatpump]
34
+database = /var/lib/pyheatpump/pyheatpump.sqlite3
35
+
36
+[supervisor]
37
+scheme = https
38
+host = MONITORING_SERVER
39
+port = 8081
40
+post_path = /Symfony/web/app_dev.php/boardws/insert
41
+get_path = /Symfony/web/app_dev.php/boardws/orders
42
+interval = 60
43
+heatpump_id = 42
44
+
45
+[api]
46
+host = 0.0.0.0
47
+port = 80
48
+EOF
49
+
50
+cd /etc/systemd/system
51
+ln -s /var/lib/pyheatpump/pyheatpump_api.service
52
+ln -s /var/lib/pyheatpump/pyheatpump_fetch.service
53
+ln -s /var/lib/pyheatpump/pyheatpump_fetch.timer
54
+ln -s /var/lib/pyheatpump/pyheatpump_supervise.service
55
+ln -s /var/lib/pyheatpump/pyheatpump_supervise.timer
56
+
57
+systemctl daemon-reload
58
+systemctl enable pyheatpump_api.service pyheatpump_fetch.timer pyheatpump_supervise.timer
59
+```

Loading…
Cancel
Save