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

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
932
Reaction score
2,259
reef-pi 3.0 new pwm profiles:
Fixed: Constant intensity for given time period
Screen Shot 2019-10-20 at 11.40.01 PM.png


Interval: Linear interpolation of a set of intensities at used defined fixed time interval. (Like auto in reef-pi 2.0, but can be used with arbitrary time intervals, like 15 min).
Screen Shot 2019-10-20 at 11.51.56 PM.png



Diurnal:
Screen Shot 2019-10-21 at 12.03.44 AM.png

Sine:
Screen Shot 2019-10-21 at 12.48.58 AM.png


Random:
Screen Shot 2019-10-21 at 12.40.50 AM.png


Lunar: Like sine in daily intensity cycle, but max intensity changes with 27 days cycle. Graph is for three months. Each peak representing a daily sine cycle
Screen Shot 2019-10-21 at 12.50.04 AM.png


Composite: A set of sub-profiles each with a specific duration and min/max intensity. The example graph combines aiurnal, sine, random and fixed profiles.
Screen Shot 2019-10-21 at 1.08.09 AM.png


These things are now present in the backend/controller. We are working on building the UI.
This is something im really waiting for!

In other news, no problems whatsoever to report. My reef-pi just keeps humming happily along!
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
269
Reaction score
373
Location
Knoxville
So I'm working with a PCA9685pw & it's driving me up the wall. I can get Adafruit's PCA9685 board to work, but when I try mine, it crashes.

Main PID: 981 (code=exited, status 1/FAILURE)

The weird thing to me is that using i2cdetect, I find the PCA9685 on 0X41 (I have address pin A0 jumpered, so this is expected). So the pi is seeing the chip, but reef pi still doesn't like it.

Using journalctl:
sudo journalctl -fu reef-pi.service
-- Logs begin at Thu 2019-02-14 05:12:02 EST. --
Oct 25 23:25:59 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Service RestartSec=1min 30s expired, scheduling restart.
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Scheduled restart job, restart counter is at 2.
Oct 25 23:27:29 control1 systemd[1]: Stopped raspberry pi based reef tank controller.
Oct 25 23:27:29 control1 systemd[1]: Started raspberry pi based reef tank controller.
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 Setting pca9685 frquency: 1500
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize controller. Error:remote I/O error
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Service RestartSec=1min 30s expired, scheduling restart.
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Scheduled restart job, restart counter is at 3.
Oct 25 23:28:59 control1 systemd[1]: Stopped raspberry pi based reef tank controller.
Oct 25 23:28:59 control1 systemd[1]: Started raspberry pi based reef tank controller.
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 Setting pca9685 frquency: 1500
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 ERROR: Failed to initialize controller. Error:remote I/O error
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.

1572061445184.png
 
Last edited:

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
269
Reaction score
373
Location
Knoxville
Just checked my datasheet, don't think that's the issue.

"The maximum PWM frequency is 1526 Hz if the PRE_SCALE register is set "0x03h". "
 

Michael Lane

Active Member
View Badges
Joined
Aug 11, 2018
Messages
433
Reaction score
746
@Schreiber The error message seems a bit suspicious.

Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error
Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
269
Reaction score
373
Location
Knoxville
@Schreiber The error message seems a bit suspicious.



Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?
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.
 
Last edited:

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,403
Reaction score
1,897
Location
Columbia MD
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
106
Reaction score
188
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
I had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?
 
Best reef aquarium LED lighting

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,403
Reaction score
1,897
Location
Columbia MD
I had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?
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.
 

dmolavi

Active Member
View Badges
Joined
Jan 3, 2015
Messages
444
Reaction score
563
Location
United States
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
I've not had any wifi issues on my build. It's been rock solid since January. One thing to watch for- microwave ovens can cause 2.4GHz Wifi problems, since most ovens operate in that approximate frequency range too.
 

Michael Lane

Active Member
View Badges
Joined
Aug 11, 2018
Messages
433
Reaction score
746
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.
 

Michael Lane

Active Member
View Badges
Joined
Aug 11, 2018
Messages
433
Reaction score
746
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.
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
269
Reaction score
373
Location
Knoxville
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?
 
Best reef aquarium LED lighting

Michael Lane

Active Member
View Badges
Joined
Aug 11, 2018
Messages
433
Reaction score
746
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.
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
269
Reaction score
373
Location
Knoxville
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:

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
141
Reaction score
80
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!
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
106
Reaction score
188
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:

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
270
Reaction score
560
Location
Australia
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.
 

Do you reef more, less or the same on the weekends?

  • MORE

    Votes: 332 65.7%
  • LESS

    Votes: 28 5.5%
  • SAME

    Votes: 145 28.7%

Online statistics

Members online
1,562
Guests online
7,654
Total visitors
9,216
Top