reef-pi :: An opensource reef tank controller based on Raspberry Pi.

I honestly think it’s hardware related. It only happens once every 2-3 weeks and my box is pretty far from any pumps. I can try moving it further.
I experienced this with an older rpi using a USB wifi dongle, and more recently with rpi 3. In my case, it seemed to be a power related problem. The wifi modules weren't able to pull enough power to stay connected to the weak wifi signal. I upgraded my power supply and no longer experience that issue.
 
I tested with the adafruit board, but this is an entirely separate PCA9685 chip. I don't have the adafruit board connected anymore, just this one. DevMode is not enabled & I'm running 2.5.

EDIT: @Michael Lane , I just downloaded the schematic for the adafruit board & the only real differences I see between my setup & their is for the address jumpers...

For my address pins A0-A5, they have 10k ohm resistors between them & ground... Are these actually necessary? I simply have mine connected straight to ground. I have A1-A5 connected directly to ground & A0 connected directly to VCC.
Connecting directly to ground is fine. The 10k pull down is only required if you might use a jumper to connect to 5v.
 
Connecting directly to ground is fine. The 10k pull down is only required if you might use a jumper to connect to 5v.

I have A0 connected directly to 5V... Based in this, I'm assuming that was a bad idea & it needs the pulldown resistor for A0? Could that be causing my issue?
 
I have A0 connected directly to 5V... Based in this, I'm assuming that was a bad idea & it needs the pulldown resistor for A0? Could that be causing my issue?
That's fine. I don't expect that to be an issue. It's essentially the same thing that happens on the breakout board when you bridge an address pin.
 
So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?

Double Edit: I tried my PCA9685pw at address 0x40 & it worked flawlessly. It's definitely a bug.
 
Last edited:
Hi all! One question my optical sensor on mikes hat v2 doesnt work, float works ok. Do I need to put resistors on power and signal side? 1k and 10 k ohms? Thanks!
 
Hi @Ranjib - I had the latest 2.5 build up and running for a few weeks and today I changed some minor settings, hit reload through the UI, now I'm getting the following:
Code:
Process: 750 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)

I tried resetting the database, and as soon as I added some settings and hit reload again the same thing happened.
What's the best way to troubleshoot?
Do I just need to reinstall?
 
Last edited:
So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?
I went from 2.2 to 2.5 and had some minor problems with my pca (leds didnt turn off). I found that 2.3 works best for me. Not sure if it is relevant to you though.
 
One is really a diy freak when you start to pick up random stuff off the street and think "Hmmm.. this connector looks interesting, wonder if I can use it in a reef-pi build..?"

I found a badly crushed run over controller for an ebike in the street the other day. The connectors looked interesting and I thought maybe I could save something from it so I took it home and did an autopsy. I saved a heatsink for 7 mosfets but otherwise no electronic parts. But the connectors looked really interesting, waterproof with a lot of pins. Sadly I only had female connectors.

I started to google the brand name I saw on one of them (Julet) and found a big world of ebike connectors opening up to me. IP67 connectors with up to 10 pins in a quite small form factor. For both signal and power. I haven't found a source for these connectors though, many seem to be OEM connectors not available for consumers but there seems to be a diy scene in the ebike community so all hope is not lost.

The one I'm holding in my hand has 6 pins. The larger two on the table has 10 pins. Everything is IP67 by the looks of it. Nothing is chassi mounted though, only in line (right term?).

I thought it was interesting and potentially useful if there are spare connectors available for a decent price. I'll keep looking. If anyone knows anything more please let me know! :)

48cn9li.png


rzEvGhI.png


3KMKhRi.png
 
Hi @Ranjib - I had the latest 2.5 build up and running for a few weeks and today I changed some minor settings, hit reload through the UI, now I'm getting the following:
Code:
Process: 750 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)

I tried resetting the database, and as soon as I added some settings and hit reload again the same thing happened.
What's the best way to troubleshoot?
Do I just need to reinstall?

Can you share the log , it may have details:
Code:
journalctl -u reef-pi.service

Sorry for your trouble, I really want to get rid of all such fatal failures that causes the controller to not even show UI
 
Can you share the log , it may have details:
Code:
journalctl -u reef-pi.service

Sorry for your trouble, I really want to get rid of all such fatal failures that causes the controller to not even show UI

So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?

As I'm looking at it closer it looks like @Schreiber and I are having the same issue. I can confirm that all was working with my current PCA9685 board at PWM 1500 until a reboot today. I removed the database, and started troubleshooting from scratch. Every time I enable the PCA9685 board and reload, reef-pi crashes and will not start again. I've tries setting the PWM to 1000 also with the same results.
 
One is really a diy freak when you start to pick up random stuff off the street and think "Hmmm.. this connector looks interesting, wonder if I can use it in a reef-pi build..?"

I found a badly crushed run over controller for an ebike in the street the other day. The connectors looked interesting and I thought maybe I could save something from it so I took it home and did an autopsy. I saved a heatsink for 7 mosfets but otherwise no electronic parts. But the connectors looked really interesting, waterproof with a lot of pins. Sadly I only had female connectors.

I started to google the brand name I saw on one of them (Julet) and found a big world of ebike connectors opening up to me. IP67 connectors with up to 10 pins in a quite small form factor. For both signal and power. I haven't found a source for these connectors though, many seem to be OEM connectors not available for consumers but there seems to be a diy scene in the ebike community so all hope is not lost.

The one I'm holding in my hand has 6 pins. The larger two on the table has 10 pins. Everything is IP67 by the looks of it. Nothing is chassi mounted though, only in line (right term?).

I thought it was interesting and potentially useful if there are spare connectors available for a decent price. I'll keep looking. If anyone knows anything more please let me know! :)

48cn9li.png


rzEvGhI.png


3KMKhRi.png
Thats awesome :-) . Nothing like scavenging electronics and reuse. During the 2.0 to 3.0 upgrade process I realized I rarely need to buy any new electronics, as pretty much everything except the enclosure and may be some perma proto board is reusable :-) . It turned out lot less expensive than I was anticipating.

Theres lot to learn just by observing different systems I feel.
 
As I'm looking at it closer it looks like @Schreiber and I are having the same issue. I can confirm that all was working with my current PCA9685 board at PWM 1500 until a reboot today. I removed the database, and started troubleshooting from scratch. Every time I enable the PCA9685 board and reload, reef-pi crashes and will not start again.
Ack. Let me test it out with 1500 frequency settings.
 
Ack. Let me test it out with 1500 frequency settings.
journalctl:
Code:
Oct 27 14:18:00 ReefControlPi systemd[1]: Started raspberry pi based reef tank controller.
Oct 27 14:18:00 ReefControlPi reef-pi[311]: 2019/10/27 14:18:00 Setting pca9685 frquency: 1500
Oct 27 14:18:00 ReefControlPi reef-pi[311]: 2019/10/27 14:18:00 ERROR: Failed to initialize pca9685 driver with mock i2c bus.
Oct 27 14:18:00 ReefControlPi reef-pi[311]: 2019/10/27 14:18:00 ERROR: Failed to initialize controller. Error:remote I/O erro
Oct 27 14:18:00 ReefControlPi systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:18:00 ReefControlPi systemd[1]: reef-pi.service: Failed with result 'exit-code'.
 
Ack. Let me test it out with 1500 frequency settings.
I dont think that's the issue. I've downgraded to 2.3 and the issue is the same. It looks like the problem is coming from upgrading to the latest version of rasbian (Raspbian GNU/Linux 10 - buster) or some related module upgrades. This same 2.3 setup was working on Stretch Lite for almost a year, now with Buster + 2.3 it fails.
 

Looks Like version 2.x does not support an other adress then 0x40, maybe better to move to 3.0
 

Looks Like version 2.x does not support an other adress then 0x40, maybe better to move to 3.0

Man, knowing that would've saved me a solid 10 hours of troubleshooting, lol. ;Blackeye Oh well, it works now! Note to self, 1% of the time, I'm *not* the problem! Is 3.0 stable, or are there known bugs at the moment I should know about?
 
Tonight is just full of surprises. Hooked up one of @Michael Lane 's pH boards & I cannot get any readings from my probe. It's just stuck at 0.

pH Probe 0.PNG

I have both jumpers on the board & i2cdetect sees the board at 0x45. I'm using the PINPOINT Marine probe, brand new. Just unboxed it. Is there a way to verify the probe itself isn't the problem?

I calibrated it using 6.86 solution for the midpoint value & 9.18 as the high point. One bit of weirdness I noted was that when I typed those values in, it asked me to select a valid value. For example, for the midpoint, I typed 6.86, it highlighted the box red & said the closest valid values were 6.86 & another number, can't remember. The only way I could get it to proceed was if I used the arrows to increase to 7.86, then decrease back to 6.86.
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top