- [https://www.raspberrypi.org/software/] (url)
- Create an empty file with the name SSH in the root of the Micro SD.
- Create wpa_supplicant.conf with below content in the root of the Micro SD.
country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="yourSSID"
psk="xxxxxxxx"
key_mgmt=WPA-PSK
}
- Insert the MicroSD in the Raspberry and start.
- Log in and update below.
sudo apt update
sudo apt full-upgrade
sudo rpi-update
sudo reboot
sudo rpi-eeprom-update -d -a
- raspi-config
- Advanced Options
- Bootloader Version
- [Boot ROM Version]
- [Latest Use the latest version boot ROM software]
- [Reset to Default] - [No]
- [Boot ROM not reset to defaults] - [Ok]
- [Latest Use the latest version boot ROM software]
- Advanced Options
- [Boot Order]
- [USB Boot]
- [USB device is default boot device] - [Ok]
- [USB Boot]
- [Boot Order]
- [Boot ROM Version]
- [Finish]
- [Would you like to reboot now] - [Yes]
- Bootloader Version
- Check /boot/vcgencmd bootloader_config
- Last row should be:
BOOT_ORDER=0xf41
- Last row should be:
- Advanced Options
sudo apt-get install git
https://github.com/billw2/rpi-clone
git clone https://github.com/billw2/rpi-clone.git
cd rpi-clone
sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
rpi-clone -f -p 240M sda
# This takes a while
Shut down
sudo shutdown -h now
- Remove the Micro SD and start.
# change the name in /etc/hostname
sudo nano /etc/hostname
# edit /etc/hosts
sudo nano /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 hostname
reboot
sudo reboot
curl https://download.argon40.com/argon1.sh | bash
Instruction - https://www.waveshare.com/wiki/PI4-CASE-ARGON-ONE
#settings
argonone-config
http://kamilslab.com/2016/12/11/how-to-install-fail2ban-on-the-raspberry-pi
Also check out https://www.domoticz.com/wiki/Setup_fail2ban on how to add Domoticz to fail2ban.
sudo apt install ntpdate
sudo nano /etc/rc.local
Add ntpdate -s pool.ntp.org last row before exit 0.
Save and close
Reboot
curl -L https://install.domoticz.com | bash
sudo nano /etc/logrotate.d/domoticz
/var/log/domoticz.log {
rotate 7
daily
minsize 1M
missingok
notifempty
copytruncate
compress
delaycompress
postrotate
invoke-rc.d sudo systemctl restart domoticz.service > /dev/null
endscript
}
sudo nano /etc/init.d/domoticz.sh
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
export DEB_DISTRO=$(lsb_release -sc)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | sudo tee /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get install speedtest
sudo apt-get install ddclient
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
daemon=600
# check every 600 seconds
syslog=yes
# log update msgs to syslog
mail-failure=your.mail.com # Mail failed updates to user
pid=/var/run/ddclient.pid
# record PID in file.
ssl=yes
# use HTTPS
## Detect IP with our CheckIP server
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
## DynDNS username and password here
login=your_username
password=your_password
## Default options
protocol=dyndns2
#server=members.dyndns.org
## Dyn Standard DNS hosts
custom=yes, your.domain.com
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
# List alternatives
update-alternatives --list python
# Change version
update-alternatives --config python
For some reason Domoticz wont start after a power failure. Add below line to crontab.
@reboot sleep 180;sudo systemctl restart domoticz.service