Advertisement
overvolt

Megaepisodio Domotica

Dec 4th, 2017
1,356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.07 KB | None | 0 0
  1. wget http://direct.fantasy2001.com/switchando-server-SW-BU4.5b04S.zip
  2. sudo apt-get install mosquitto mosquitto-clients mono-complete screen
  3. rm -rf HomeAutomation
  4. rm switchando-server-SW-BU4.5b04S.zip
  5.  
  6. cd /var/www/html
  7. sudo rm -rf ./*
  8.  
  9. cd ~
  10. nano mqtt.txt
  11.  
  12. mosquitto_passwd -U mqtt.txt
  13.  
  14. cd /etc/mosquitto
  15. sudo nano mosquitto.conf
  16. allow_anonymous false
  17. password_file /home/pi/mqtt.txt
  18. sudo service mosquitto restart
  19.  
  20. cd ~/Switchando\ Server
  21. mono HomeAutomation\ 4\ Server.exe
  22.  
  23. # scaricare lo zip da https://github.com/mirko/SonOTA
  24.  
  25. # sul computer (non sul raspberry):
  26. py -3.5 -m pip install --upgrade pip
  27. py -3.5 -m pip install --user -r requirements.txt
  28. py -3.5 sonota.py
  29.  
  30. # autorun:
  31. cd ~/Switchando\ Server/
  32. nano run
  33.  
  34. #!/bin/bash
  35. sudo pigpiod
  36. while :
  37. do
  38.   mono "/home/pi/Switchando Server/HomeAutomation 4 Server.exe"
  39.   sleep 1
  40.   echo "Restarting..."
  41. done
  42.  
  43. chmod +x run
  44. cd /etc/init.d
  45. sudo rm bootHA
  46. sudo nano bootSwitchando
  47.  
  48. #!/bin/bash
  49. cd "/home/pi/Switchando Server"
  50. screen -d -m "/home/pi/Switchando Server/run"
  51.  
  52. sudo chmod +x bootSwitchando
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement