Now I'll show you a very easy way how to control 32 relays with the help of Raspberry PI with web Interface
Needed
1 RaspberryPI
KMTronic RS485 8 Relay Boards
KMTronic USB<>RS485 adapter
1 USB cable
12 volt power
recommend install Raspbian
Commands for control shell script of the relays:
echo -e "\xFF\x01\x01" > /dev/ttyUSB0 -> For ON Relay 1
echo -e "\xFF\x01\x00" > /dev/ttyUSB0 -> For OFF Relay 1
echo -e "\xFF\x02\x01" > /dev/ttyUSB0 -> For ON Relay 2
echo -e "\xFF\x02\x00" > /dev/ttyUSB0 -> For OFF Relay 2
echo -e "\xFF\x03\x01" > /dev/ttyUSB0 -> For ON Relay 3
echo -e "\xFF\x03\x00" > /dev/ttyUSB0 -> For OFF Relay 3
and etc..
Web interface
For full shell scrip download this - Download
Download web interface -Download