Php form to control 8 channel relays with Raspberry pi
First of all you need to activate i2c on Raspberry pi. Here how to do: https://diyprojects.io/activate-i2c-bus-raspberry-pi-3-zero/
Raspberry pi zero w, and I built an I2C module with a port expander, I made a mistake wen i ordered it, I used a PCF8574AP instead of a PCF8574A, basically the difference lies in the fact that in the first 0 it is on and 1 is off, while in the second it is the inverse. https://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf
Is a simple php script that create 8 buttons to toggle 8 relays. It uses "shell_exec()" (http://php.net/manual/en/function.shell-exec.php) function to execute i2cget and i2cset commands on the shell. I will implement a system to autorefresh the page.