Projet de remplacement du "RPiPasserelle" d'Otec.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

INSTALL 1.6KB

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