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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is there a way to trigger a macro with some type of input, say like a momentary push button?
Not yet. You can use ph or temperature sensor to trigger macro but not ato. ATO is the only module that can be used to emulate switch/buttons. You can definitely do this via API. But im assuming you are looking for something out of the box.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
So, I did some testing with my newest build today & I noticed something odd for manual lighting control. It may be normal, but it seemed odd to me at least.

For spectrum/intensity on Kessils, I would expect setting them at a higher number would result in a brighter light. However, it works the exact opposite...

Am I just doing something dumb, or is this the way it's designed to work? I can't think of a way I could have incorrectly wired this & still have it functioning. it works perfectly, just backwards from what I would expect.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So, I did some testing with my newest build today & I noticed something odd for manual lighting control. It may be normal, but it seemed odd to me at least.

For spectrum/intensity on Kessils, I would expect setting them at a higher number would result in a brighter light. However, it works the exact opposite...

Am I just doing something dumb, or is this the way it's designed to work? I can't think of a way I could have incorrectly wired this & still have it functioning. it works perfectly, just backwards from what I would expect.
I believe there is an option for active high or active low when setting up the pca9685 pwm driver. That setting could cause the backwards behavior.
On active high 1 percent means the squarewave is high for 1 percent of the time(dim) and at 100 is high for 100 percent of the time(bright).
Active low is the opposite a setting of 1 means the squarewave is low for 1 percent of the time(high for 99 percent so bright) and a setting of 100 means the squarewave is low for 100 percent of the time(off)
 
Last edited:

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I believe there is an option for active high or active low when setting up the pca9685 pwm driver. That setting could cause the backwards behavior.
On active high 1 percent means the squarewave is high for 1 percent of the time(dim) and at 100 is high for 100 percent of the time(bright).
Active low is the opposite a setting of 1 means the squarewave is low for 1 percent of the time(high for 99 percent so bright) and a setting of 100 means the squarewave is low for 100 percent of the time(off)

That definitely sounds like my problem, but I can't find anywhere to change the active high/low setting. All I see when I set it up is: name, type, address, & frequency. I don't get the option to set active high or low when I edit it, or when I edit a light either.

@Ranjib , am I just missing this toggle? Or is it not available in the 3.0 release?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
That definitely sounds like my problem, but I can't find anywhere to change the active high/low setting. All I see when I set it up is: name, type, address, & frequency. I don't get the option to set active high or low when I edit it, or when I edit a light either.

@Ranjib , am I just missing this toggle? Or is it not available in the 3.0 release?
I have moved it under connector /jack in 3.0. Similar to inlets and outlets, jacks can be reverse in 3.0. I felt this is more inline with how overall reef-pi designed . It’s the same effect at the end, only the setting has been moved to a different place
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,530
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
With the lights, Temp, and Ph done, I started working on ATO (low) basic setup is done: using ultrasonic sensor to measure when water-level drops to activate outlet (AC1) in which ATO pump is plugged in...everything is gravy. Now, the ultrasonic sensor is on the outside of the sump, against the glass so it should require no maintenance. That being said, ol "Murphy" is always out to get ya so I wanted to have a backup in a form of another (optical or float) sensor to measure HIGH water-level, in case ATO pump gets stuck ON or the LOW-level sensor fails and tells ATO pump to turn on.

I tried creating another ATO (High), polling a second sensor which will be mounted at the HIGH water level mark, set to it to control AC1, turned on alert and disable on alert. That seemed to work, until the LOW-level sensor ran it's check and it turned AC1 back on. This tug of war continues back and forth as each of the two sensors is polled.

So, obviously that is not a correct way of doing it. Is it possible to completely disable AC1 on HIGH level alert until manually reactivated? Or is there another (better?) way to set up low-level ON and high-level OFF checks?

I hope that makes sense lol.
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
Question on temp probe calibration.

I just noticed the feature and gave it a try. I dropped both probes in the same spot and let them sit for 10 minutes and they where 1 degree off from eachother. I used my BBQ instant read for a 3rd reading which matched say probe 1. I then changed the calibration value in probe 2 so that it matched probe 1 and put them back in their spots. When I went to go look back at the calibration value it was gone. Did the calibration save and just does not show? If so how can I reset to defaults since I dont remember which probe I adjusted lol.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
How did you manage to optical sensors to work? I gave up on them and using float sensors.. my macros for float fail safe never works.. I have it like float 1 turn on- wait 30s using timers and turn off equpment, but never shuts it down..so I wired float switch directly to power supply of the pump. So if water rises too high it shuts off power of the pump. This way works 100% regardless of relays and pi.. some thing just doesnt work..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
With the lights, Temp, and Ph done, I started working on ATO (low) basic setup is done: using ultrasonic sensor to measure when water-level drops to activate outlet (AC1) in which ATO pump is plugged in...everything is gravy. Now, the ultrasonic sensor is on the outside of the sump, against the glass so it should require no maintenance. That being said, ol "Murphy" is always out to get ya so I wanted to have a backup in a form of another (optical or float) sensor to measure HIGH water-level, in case ATO pump gets stuck ON or the LOW-level sensor fails and tells ATO pump to turn on.

I tried creating another ATO (High), polling a second sensor which will be mounted at the HIGH water level mark, set to it to control AC1, turned on alert and disable on alert. That seemed to work, until the LOW-level sensor ran it's check and it turned AC1 back on. This tug of war continues back and forth as each of the two sensors is polled.

So, obviously that is not a correct way of doing it. Is it possible to completely disable AC1 on HIGH level alert until manually reactivated? Or is there another (better?) way to set up low-level ON and high-level OFF checks?

I hope that makes sense lol.
I have thought about this and currently the answer is no. We have to extend ato control target from just equipment to Macro (similar to temperature and ph) and then it’s possible to disable /enable the primary ato using the backup sensor . Makes sense ? There may be other alternatives to this , like using some trick on the relay wiring and having a single ato instead but in thnking purely from software /controller perspective
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Hi Ranjib,
Good work with the launch of 3.0!!!
I found a little thing maybe you can update it next time:

1576529006268.png

When a driver is created for PCA9685 the Frequency is not showing if you want to modify. Maybe that was on purpose, can you at least show the set Frequency along with the name and address? It will be nice as well when you can change the Frequency and save instead of deleting the driver(and everything that is connected to it) and creating a new one.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
And I have connected a Servo that I am controlling with the light tab, it works in manual mode from 50 to 99 only it turns about 90degrees in total. Is there extra support needed like a driver ore some additional programming? It will be nice to have, to build a feeder with multiple servos that turn to deposit food in the aquarium.
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,614
Location
Richmond, Va
Rating - 0%
0   0   0
And I have connected a Servo that I am controlling with the light tab, it works in manual mode from 50 to 99 only it turns about 90degrees in total. Is there extra support needed like a driver ore some additional programming? It will be nice to have, to build a feeder with multiple servos that turn to deposit food in the aquarium.
I believe someone has already written code for an autofeeder. I do remember seeing it in the additional resources at one point.
 

raketemensch

Ape That Likes Fish
View Badges
Joined
Oct 13, 2019
Messages
378
Reaction score
478
Location
Northwest CT
Rating - 0%
0   0   0
I can't seem to get my (standard raspi) camera to work in 3.0.

dmesg shows success:

[ 7.727495] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 8.387919] bcm2835-v4l2: scene mode selected 0, was 0
[ 8.388636] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720
[ 8.394648] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.


daemon.log shows:

Dec 15 18:45:04 reefpi reef-pi[692]: 2019/12/15 18:45:04 Initializing DB for camera bucket
Dec 15 18:45:04 reefpi reef-pi[692]: 2019/12/15 18:45:04 WARNING: camera config not found. Initializing default config
Dec 15 18:45:04 reefpi reef-pi[692]: 2019/12/15 18:45:04 Initializing DB for photos bucket
Dec 15 18:45:04 reefpi reef-pi[692]: 2019/12/15 18:45:04 Successfully started subsystem: camera
Dec 15 18:45:04 reefpi reef-pi[692]: 2019/12/15 18:45:04 Starting camera controller


I'm not sure why it goes back to "Starting" after it was successfully started, but the UI just shows:

Something went wrong.
TypeError: undefined is not an object (evaluating 'i.props.views[i.state.currentIndex]')

The camera worked well in octoprint, so it should be in good shape.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Question on temp probe calibration.

I just noticed the feature and gave it a try. I dropped both probes in the same spot and let them sit for 10 minutes and they where 1 degree off from eachother. I used my BBQ instant read for a 3rd reading which matched say probe 1. I then changed the calibration value in probe 2 so that it matched probe 1 and put them back in their spots. When I went to go look back at the calibration value it was gone. Did the calibration save and just does not show? If so how can I reset to defaults since I dont remember which probe I adjusted lol.
I have to break it down to smaller pieces and process :) . I can double check the calibration behavior , but I think I will add some ui data to indicate existing calibration data by 3.1

I think you should just redo the steps :) ,If you didn’t see any error it likely means the calibration data is saved .
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Question on temp probe calibration.

I just noticed the feature and gave it a try. I dropped both probes in the same spot and let them sit for 10 minutes and they where 1 degree off from eachother. I used my BBQ instant read for a 3rd reading which matched say probe 1. I then changed the calibration value in probe 2 so that it matched probe 1 and put them back in their spots. When I went to go look back at the calibration value it was gone. Did the calibration save and just does not show? If so how can I reset to defaults since I dont remember which probe I adjusted lol.
reef-pi should display the temperature calibration point if you open the calibration dialog again. I've just double checked the UI code to confirm. It's possible that we have a bug in that behavior though.

It won't hurt to calibrate the temperature probe again as Ranjib suggested. Can you tell if the probe is reporting the temperature you expect? I also looked for anything we might log during temperature reading to indicate a calibration adjustment, but didn't see anything. Maybe we can update the logging to print the raw and calibrated values.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi Ranjib,
Good work with the launch of 3.0!!!
I found a little thing maybe you can update it next time:

1576529006268.png

When a driver is created for PCA9685 the Frequency is not showing if you want to modify. Maybe that was on purpose, can you at least show the set Frequency along with the name and address? It will be nice as well when you can change the Frequency and save instead of deleting the driver(and everything that is connected to it) and creating a new one.
Yeah, this is a UI gap that we have to fix. The driver UI still does not have the ability to provide driver specific settings (frequency in this case). If it helps, i can provide API equivalent,
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Yeah, this is a UI gap that we have to fix. The driver UI still does not have the ability to provide driver specific settings (frequency in this case). If it helps, I can provide API equivalent,

Yes please, then I can play with the frequency... LOL
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Alright, I guess alternative is to use an ATO container that won't overflow the sump if ATO gets stuck.

I run a separate fail safe independant from Reef-Pi to kill the power to my ATO-related items in the case of a high sump level. I run it at about 30mm higher than my normal running level, so even when I turn my return off it disables ATO pumps.

The ATO's are obviously still thinking they are working under Reef-Pi, but the pumps aren't getting power. This way I get a usage alert as a notification that something is wrong.
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,530
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
I run a separate fail safe independant from Reef-Pi to kill the power to my ATO-related items in the case of a high sump level. I run it at about 30mm higher than my normal running level, so even when I turn my return off it disables ATO pumps.

The ATO's are obviously still thinking they are working under Reef-Pi, but the pumps aren't getting power. This way I get a usage alert as a notification that something is wrong.

Would you mind sharing more details on your setup?
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • 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