Advertisement
overvolt

Domotica #1

Mar 18th, 2018
2,824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. # Contenuto wpa_supplicant.conf:
  2.  
  3. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
  4. update_config=1
  5. network={
  6.     ssid="YOUR_SSID_HERE"
  7.     psk="YOUR_SECRET_PASSPHRASE_HERE"
  8.     id_str="SOME_DESCRIPTIVE_NAME"
  9. }
  10.  
  11.  
  12.  
  13.  
  14. # PER LA CONFIGURAZIONE IP STATICO:
  15.  
  16. #1) Uno di queste due comandi, a seconda se state usando ethernet o wifi
  17. ip -4 addr show dev eth0 | grep inet
  18. ip -4 addr show dev wlan0 | grep inet
  19.  
  20. #2) Scopriamo l'ip interno del router
  21. ip route | grep default | awk '{print $3}'
  22.  
  23. #3) I DNS...
  24. cat /etc/resolv.conf
  25.  
  26. #4) E questa รจ la roba da scrivere nel file
  27.     interface eth0
  28.     static ip_address=
  29.     static routers=
  30.     static domain_name_servers=
  31.  
  32.     interface wlan0
  33.     static ip_address=
  34.     static routers=
  35.     static domain_name_servers=
  36.  
  37.  
  38.  
  39.  
  40. # INSTALLARE SWITCHANDO
  41.  
  42. wget https://www.switchando.com/switchando/install-switchando.sh && chmod +x install-switchando.sh && ./install-switchando.sh
  43.  
  44.  
  45.  
  46.  
  47. # FIRMWARE SONOFF
  48.  
  49. # scaricare lo zip da https://github.com/mirko/SonOTA
  50.  
  51. # sul computer (non sul raspberry):
  52. py -3.5 -m pip install --upgrade pip
  53. py -3.5 -m pip install --user -r requirements.txt
  54. py -3.5 sonota.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement