This sounds great, on behalf of many thanks for your hard work.
This isn't a bug but yesterday I got a sad email where someone's dosing pump didn't turn off, thankfully no harm was done. He restarted things which immediately turned off the pump. The control for the pump was coming from the pca9685, my guess is reef-pi sent out the command to turn off the pump but that command didn't make it to the pca9685 in tact. Unfortunately this is the problem with I2C, it'll never be 100% perfect as it has no acknowledge system.
I didn't think it was possible to read the current value of a specific pca9685 pin as I've looked into this in the past however after hearing this I thought I would try again. I stumbled across a new c++ Arduino based library from Rob Tillaart last updated early this year. Again it looks like he did what few could and added a function to read the set value of a pin. I've tested it out and it works perfectly. You're able to set the value normally then immediately check and verify if it in fact changed.
So now I'm wondering if you're able to incorporate a verification on mainly the dosing pumps as they are critical. When reef-pi turns on/off the pump it could check the pin to verify it's set proper and move on, if not try again.
The function is call getPWM and is located in the PCA9685.cpp file here.
Arduino library for I2C PCA9685 16 channel PWM extender, 12 bit - RobTillaart/PCA9685_RT
github.com
Arduino library for I2C PCA9685 16 channel PWM extender, 12 bit - RobTillaart/PCA9685_RT
github.com
Unfortunately I'm still not comfortable poking in the code yet, would be great if you could start adding comments, that's my feature request. :)
If it helps any I can convert this function to work with pure c++ and drop the Arduino based libraries.