Categories :

MaxAir – Clean Installation

Last Updated on 16/11/2023 by Kevin Agar

Clean installation sequence for my heating system

Download the latest MaxAir Image:-
32 bit Ver 3.00 Build 220323
64 bit Ver 3.00 Build 220323

Alternatively, go to Discord and download the latest image

Install MaxAir image to sd card using, for example, Win32DiskImager, BalenaEtcher, Raspberry Pi Imager

Create an empty file and name it ssh (no extension)

Add the file ssh to the boot volume (this enables ssh logins to the Raspberry pi)

Insert the sd card into the Raspberry pi and boot

Login to the Raspberry pi by opening a console window and typing ssh maxair@ipaddress eg
ssh maxair@
Enter the password

Update/Upgrade rpi software:-
sudo apt update && sudo apt upgrade -y

Install 1-wire sensor:-
sudo raspi-config
>3 Interface Options>I7 1-Wire>Enable

Setup time/location etc:-
sudo raspi-config
>5 Localisation Options>L1 Local, L2 Timezone

Expand the Filesystem:-
sudo raspi-config
>6 Advanced Options>A1 Expand Filesystem

Install MQTT:-
sudo apt-get install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo mosquitto_passwd -c /etc/mosquitto/credentials admin

Enter the password ’pihome’ and confirm
Create and edit a new file by executing the command
sudo nano /etc/mosquitto/conf.d/maxair.conf
Add the following 3 lines and save the file
per_listener_settings true
allow_anonymous false
password_file /etc/mosquitto/credentials

If not already available then install paho-mqtt using the command ‘sudo pip3 install paho-mqtt

Login to the GUI

Configure MaxAir to Communicate Using MQTT – Settings/System Configuration/MQTT select ‘Add’

Update MaxAir files:-
Select Settings>System Maintenance>MaxAir Update>Check for Updates
Refresh window and install any updates

Install Add-ons manually. Go to /var/www/add_on
sudo bash /var/www/add_on/Image_Tools/
sudo bash /var/www/add_on/MQTT_dependencies/

Install Fail2ban:-
Install procedure for Fail2ban

Install latest database backup file:-
Install latest Database file generated by auto_backup or manual backup.
sudo mysql -u root -ppassw0rd maxair < ‘the name of the sql file you copied’
sudo mysql -u root -ppassw0rd maxair < /home/pi/maxair_mysql_2021_09-22_11-07-52.sql

Mapping a directory on my NAS to the MaxAir controller for database backups.

The description below has been superseded by using systemd rather than fstab. The setup for this can be found here

Create a directory/folder on the pi that you want to map to a directory/folder on the NAS

This folder needs to be in /mnt or /media as these aren’t included in the backup.

sudo mkdir /mnt/pibackups

Create a directory/folder on the NAS that you want mapped to a directory/folder on the pi

In my case it’s //

Add line to /etc/fstab and save
sudo nano /etc/fstab
// /mnt/pibackups cifs nofail,noatime,vers=1.0,username=xxx,password=xxx,uid=www-data,gid=www-data,forceuid,forcegid 0 0

Check all is working

Make an image file of the SD card

Copy image to SSD

Test completed system

Leave a Reply

Your email address will not be published. Required fields are marked *