The Dog Box

This is a project to build a 12V leisure battery. The cells are manufactured by CATL and are made from lithium iron phosphate (LiFePO4). The cells are supported by a 150A BMS (Battery Management System). A suitable box was found locally at The Range and just about houses the battery, BMS and various gubbins. The Dog Box – our new ’pet’ – is ready for camping in 2022!

QuantityDescriptionSource
4310Ah 3.2V rechargeable lithium ion cells produced by CATLOgreen Lifepo4 Cell Store, Aliexpress.com
1QUCC 150A Smart BMS 4S LiFePO4 12V Battery Pack Protection BoardQUCC Official Store, Aliexpress.com
10Copper busbarShop9113349052, Aliexpress.com
54S 22AWG 100mm JST-XH Balancer CableHoenvesta Official Store, Aliexpress.com
Single Core Thin Wall Cable – 10.0mm² 70A12voltplanet.co.uk
Single Core Thin Wall Cable – 1.5mm² 21A12voltplanet.co.uk
Copper Tube Terminals – 10mm² Cable
Stud Hole Diameter: 8mm
12voltplanet.co.uk
1Thermoresistant shink wrap kitHe Cheng World, Aliexpress.com
112V FuseboxCar Runing Autoparts, Aliexpress.com
150A DC Circuit BreakerG-products, Aliexpress.com
1200A DC Circuit Breaker G-products, Aliexpress.com
112V-60V 100A-300A Battery Isolator SwitchDynoracing Official Store, Aliexpress.com
1312091 KATSU 58W Soldering Station KitAmazon.co.uk
1AstroAI Digital MultimeterAmazon.co.uk
1DURATOOL D03233 18V, 3A DC Adjustable Regulated Linear Bench Power SupplyCpc.co.uk
1NOCO Genius G15000UK 12V and 24V 15 Amp Pro-Series Smart Battery Charger and MaintainerHardwarexpress.co.uk
1Multifunctional wire stripper and crimping tool, 22-10 AWGTC Quality Tool, Aliexpress.com

Build Your Own

These are the steps to create a WordPress website and webserver on a Raspberry Pi.

DescriptionSource
Format SD card to FAT32https://www.sdcard.org/downloads/formatter/
Install Raspberry Pi Imager for Windowshttps://www.raspberrypi.com/software/
Select OS and SD Card then click “Write” to copy image to SD cardRaspberry Pi installation
Insert the SD card into the Raspberry Pi and power it up; Enter user = “pi”, password (default) = “raspberry”Raspberry Pi documentation
Change the default password
Enable SSHhttps://en.wikipedia.org/wiki/Secure_Shell
Find the IP address on your local networkRaspberry Pi remote access
Connect to Raspberry Pi from PuTTYhttps://www.putty.org/
Create a LAMP server (Linux, Apache, MySQL, PHP/Perl/Python)LAMP Server
Choose a WordPress theme and create some content
Test accessing the website on your local networkhttp://192.168.xxx.xxx
Set up a fixed IP on your home network; set up port forwarding for Port 80 & 443 on your broadband router.Port Forwarding
Set up the DNS entries. This is usually where you purchased your domain name.Type = A; Name = @; Value = [External IP address]; TTL [Leave blank]

Type = CNAME; Name = www; Value = strover.com; TTL [Leave blank]
Check Port 80 is open; Port 443 cannot be confirmed until SSL is set up later in the processhttps://www.yougetsignal.com/tools/open-ports/
[Optional] Request a fixed external IP address from your broadband provider. This avoids having to use a DNS re-direction service. If not, you will need to maintain periodic updates to your external IP address at the domain manager whenever your broadband provider changes your external IP address.
Amend Settings/General in WordPress: WordPress Address (URL) and Site Address (URL) to “http://strover.com”This converts the URL from being identified with 192.168.xxx.xxx to your chosen domain name
Use Better Search Replace plugin in WordPress to fix broken links when moving from local IP to strover.comhttps://wordpress.org/plugins/better-search-replace/
Set up SSL Encryption to change the http:// to https://https://pimylifeup.com/raspberry-pi-ssl-lets-encrypt/
Amend Settings/General in WordPress: WordPress Address (URL) and Site Address (URL) to “https://strover.com”https://wordpress.org/support/article/changing-the-site-url/
Use Better Search Replace plugin in WordPress to fix any broken links
Install Akismet Antispam plugin to WordPresshttps://wordpress.org/plugins/akismet/
Back up the website via SSH connection using PuTTY and create the back up files. cd /var/www/html
ls
sudo mysqldump -u root -p wordpress > wordpress.sql
sudo tar -cpvzf strover.tar.gz /var/www/html/
Use FileZilla via SFTP to copy the backup files to your PC. Connect to IP address on port 22; Navigate to /home/pihttps://filezilla-project.org/
Restore the database back upsudo mysql -u root -p wordpress < wordpress.sql
Unzip back up to a new directorysudo mkdir -p /var/www/html/restore/
sudo tar -xvpzf /var/www/html/strover.tar.gz -C /var/www/html/restore/
Verify the files in the new directoryls -l /var/www/html/restore/
Remove previous files from website back-up processsudo rm wordpress.sql
sudo rm strover.tar.gz

Useful Linux Commands

DescriptionSource
View filesudo cat <filename>
Edit file (via nano text editor)sudo apt install nano
sudo nano <filename>
Update the Raspberry Pi build versionsudo apt-get update
sudo apt-get upgrade
sudo reboot
Always use the halt command before powering down to avoid corrupting the SD cardsudo halt
Check and renew the SSL certificatesudo certbot certificates
sudo service apache2 stop
sudo certbot renew
sudo systemctl reload apache2

More details:
https://upcloud.com/community/tutorials/install-lets-encrypt-apache/
Confirm php versionphp -v
sudo update-alternatives –config php
Create info.php for troubleshooting. Remove after using.<?php phpinfo(); ?>
Restart mysql following “Error establishing a database connection”sudo service mysql restart
Missing gd librarysudo apt-get install php7.4-gd
SoftwareLinux CommandVersion
RaspberryPicat /proc/cpuinfoPi 3 Model B
SD Cardcat /sys/block/mmcblk0/device/cidSanDisk Ultra 128GB microSDXC Class 10, U1, A1
Linuxcat /etc/os-release10 (Buster)
Apache2apache2 -v2.4.38 (Raspbian)
MariaDBsudo mariadb –version15.1
PHPphp –version7.4
WordPresscd /var/www/html/
grep wp_version wp-includes/version.php
5.9
As at Jan 2022