I have 3 Raspberry Pi Relay Hat (previous version of 4-Channel SPDT Relay HAT for Raspberry Pi - Seeed Wiki ).
Instructions found on the wiki to use the board only talk about Python to use the board, but unfortunately, only one board is supported by Python’s example code, and all is done using negative logic (set bit corresponding to relay to 0 to activate, to 1 to de-activate …)
After carefully reading the PCAL9535 datasheet, I found it was possible to manage all my 3 boards by some other ways .
1° using i2c-tools command lines i2cget & i2cset, with possibility to use positive or negative logic.
2° under Tcl/Tk language using i2c part of the piio extention.
3° using libgpiod tools (need to use gpio_pca953x kernel module to be activated via devicetree in /boot/config.txt)
If some peoples are interested with those points, just let me know, I would be pleased to share by posting more details.