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

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Checked, no its not :dizzy-face:
So its UI problem and nothing you can do with that.
Thank you!
I don't know how to modify that in reef-pi software...
I'll do some more test with pwm -> analog -> pwm 16bit conversion..
It's not the best way but if we cannot modify the PCA9685 driver is the only solution..
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Thank you!
I don't know how to modify that in reef-pi software...
I'll do some more test with pwm -> analog -> pwm 16bit conversion..
It's not the best way but if we cannot modify the PCA9685 driver is the only solution..
You have the option to fix reef-pi for your own use, though I am uncertain if the repository maintainers are still actively supporting the project.

Could you clarify how PWM-Analog-PWM might be beneficial for you?

The issue with reef-pi is that it offers 0–100% settings with a 1% increment. Whether using 12-bit or 16-bit, this 1% step will yield similar results. I suspect the developer of this module may not have used it themselves, as such a cumbersome UI suggests a lack of practical experience.
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
You have the option to fix reef-pi for your own use, though I am uncertain if the repository maintainers are still actively supporting the project.

Could you clarify how PWM-Analog-PWM might be beneficial for you?

The issue with reef-pi is that it offers 0–100% settings with a 1% increment. Whether using 12-bit or 16-bit, this 1% step will yield similar results. I suspect the developer of this module may not have used it themselves, as such a cumbersome UI suggests a lack of practical experience.
I also don't see any new update in the last month, we'll see.. I hope that the maintainers are still supporting the project..

Using a micro in the middle between reef-pi and the led driver I can force the pwm output to a lower level when a 1% signal is received on the input.. Not an elegant solution but I think It'll work.

Yes we have to unlock the 0 - 4096 value dimming (as done by @robsworld78 in his Robo-Tank app). But I don't know how and where to modify that... If you have any idea we can try...

Last solution will be using the original AirLink but it became very very hot and tech support says that is normal...

I feel a little frustrated right now, as I have done so many test, build my own pcbs for the controller and I miss this little step to finish everything..

 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
@yury88 I've tested on version 6.0; If I enter 0,1% it'll keep the led very very dim :beaming-face-with-smiling-eyes:
It works!! in the first % values light bounces a bit (tested form 0.1 to 5 to 0,1) but I can live with that..
Maybe @Ranjib in the future can smooth the dim curve.. ;)
 

Attachments

  • Screenshot 2024-05-23 212330.jpg
    Screenshot 2024-05-23 212330.jpg
    31.5 KB · Views: 41

oreo54

5000 Club Member
View Badges
Joined
Sep 18, 2017
Messages
5,970
Reaction score
3,673
Rating - 0%
0   0   0
@yury88 I've tested on version 6.0; If I enter 0,1% it'll keep the led very very dim :beaming-face-with-smiling-eyes:
It works!! in the first % values light bounces a bit (tested form 0.1 to 5 to 0,1) but I can live with that..
Maybe @Ranjib in the future can smooth the dim curve.. ;)
That could be your eyesight..
Linear dimming the low end can look abrupt because your eyes are more sensitive to "steps"
See gamma curve dimming..
Years ago I did suggest it as a "choice" linear or different gamma curves but do not believe it was implemented.

to "fix" it you'd use floating point math or a LUT..
 
Last edited:

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
That could be your eyesight..
Linear dimming the low end can look abrupt because your eyes are more sensitive to "steps"
See gamma curve dimming..
Years ago I did suggest it as a "choice" linear or different gamma curves but do not believe it was implemented.
I've read that the best curv for led dimming is not linear but kind of logarithmic.

https://lygte-info.dk/project/Demo16bitPWM UK.html

I think that reef-pi uses a linear dimming curv.
For now this is the best I could achieve, maybe in the future we can try to add this feature to reef-pi... these are the mod that I cannot do by myself.. unfortunately I'm an hardware guy, not a software one :downcast-face-with-sweat:

P.S. does anyone of you know if I can set multiple mode for the same led channel? I want to run my blue channel both as Diurnal and as Lunar. There's a way to set it up or do I have to use the Interval mode at set each slider to the corresponding value?
thank you!
 
Last edited:
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
I've read that the best curv for led dimming is not linear but kind of logarithmic.

https://lygte-info.dk/project/Demo16bitPWM UK.html

I think that reef-pi uses a linear dimming curv.
For now this is the best I could achieve, maybe in the future we can try to add this feature to reef-pi... these are the mod that I cannot do by myself.. unfortunately I'm an hardware guy, not a software one :downcast-face-with-sweat:

P.S. does anyone of you know if I can set multiple mode for the same led channel? I want to run my blue channel both as Diurnal and as Lunar. There's a way to set it up or do I have to use the Interval mode at set each slider to the corresponding value?
thank you!
reef-pi has a variety of pwm profiles that are not linear including sine and diurnal profiles https://github.com/reef-pi/reef-pi/blob/main/controller/pwm_profile/sine.go#L30

we can have a new profile to use some quadratic equation (read as curve) for interval based profiles (which is linear now), as long we have he mathematic formula and user appetite I don't see any reason to not have support that. If there's enough interest please create a GitHub issue and we can track it there
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Thank you @Ranjib as always!! It is also possible to use two different profile at the same time on the same channel?
I mean, I have a blue channel on my lamp, and I want to use them on a Diurnal profile but also as Moonlight. There's a way to do that?

Do you also have a page where you show all the different lights mode and how do them work?
Thank you very very much!!
Simone
 
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
Thank you @Ranjib as always!! It is also possible to use two different profile at the same time on the same channel?
I mean, I have a blue channel on my lamp, and I want to use them on a Diurnal profile but also as Moonlight. There's a way to do that?

Do you also have a page where you show all the different lights mode and how do them work?
Thank you very very much!!
Simone
You should be able to use two different profile using two different light controller under the same module using the same jack/driver. You have to be careful about them not interefering with each other, by using timer to enable /disable them during night time vs day time.

I have not tested this, but I think it will work.

I don’t have a reference document showing each profile difference, but either in this thread or somewhere else I recall going over them during the release announcement. It will be nice to document those here
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
You should be able to use two different profile using two different light controller under the same module using the same jack/driver. You have to be careful about them not interefering with each other, by using timer to enable /disable them during night time vs day time.

I have not tested this, but I think it will work.

I don’t have a reference document showing each profile difference, but either in this thread or somewhere else I recall going over them during the release announcement. It will be nice to document those here
Thank you again!! I've tried to enable/disable the light using the timer but it doesn't work..
Timer seems to do nothing on lights... Maybe I'm doing something wrong
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Thank you again!! I've tried to enable/disable the light using the timer but it doesn't work..
Timer seems to do nothing on lights... Maybe I'm doing something wrong
Hi Simon, for me it did work. Only I created 4 timers. One to turn on day and one to turn off day, one to turn on moonlight and one to turn of moonlight. Then I made one reversible macro to turn on day and turn off moonlight that I triggered only ones to initiate the start. Hope that helps....
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Hi Simon, for me it did work. Only I created 4 timers. One to turn on day and one to turn off day, one to turn on moonlight and one to turn of moonlight. Then I made one reversible macro to turn on day and turn off moonlight that I triggered only ones to initiate the start. Hope that helps....
I'll do some test, thank you!!
Can you please share your timer and macro config? On my Controller Timer and Macro seems to do nothing on light...
 
Last edited:

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
I'll do some test, thank you!!
Can you please share your timer and macro config? On my Controller Timer and Macro seems to do nothing on light...
I will make a screenshot
 
Last edited:

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
I'll do some test, thank you!!
Can you please share your timer and macro config? On my Controller Timer and Macro seems to do nothing on light...
Here a screenshot of my timer, the macro I deleted, it was only one time needed...

Screenshot_20240527_211211_Chrome.jpg
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Thank you!! So with the macro you "initiate" the system right? Because I've seen that the timer won't trigger the lights on or off by itself...
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Thank you!! So with the macro you "initiate" the system right? Because I've seen that the timer won't trigger the lights on or off by itself...
Correct, or you have to wait until the moment the timers are set and kick in....
 
Last edited:

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Here a screenshot of my timer, the macro I deleted, it was only one time needed...

Screenshot_20240527_211211_Chrome.jpg
@Ranjib There's no easy way to use the same channel both as Diurnal and Moonlight? Or maybe a simple way to control light enable/disable with timer without using macros..
Let me know if you have any idea.. Thank you!
Simone
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Alright, I had a look at the code for the PWM-profiles on github and diurnal works with a cosine to the power of 3. The profile looks like this for different min/max settings:
1680194816033.png


The diurnal profile is at the minimum value outside the start and end times. In between the Start and End Time it ramps up and down.
At exactly the start time (denoted 0) it starts ramping up from the minimum, to the maximum. This takes about 1/5 or 20% of the time interval between Start and End. After about 1/10 or 10% of the interval the light is in the middle between minimum and maximum value ( in the plot: (80%+10%)/2 = 50% )
The same thing happends towards the end, at about 4/5 or 80% of the interval between start and end the light starts ramping down. It will have fallen half the way towards the minimum at about 9/10, or 90% of the interval between Start and End. At exactly the End time it will reach the minimum again.

Practical Example:
I set my light to Minimum 0% and Maximum 80%, since my light is a bit too strong, between 08:00 and 16:00.
It will slowly start up at exactly 08:00, reaching 80% shortly past 9:30 (20% of 8 hours are about 1 hour 30 minutes).
A few minutes before 14:30 it will start ramping down, reaching 0% exactly 16:00.

Something I saw as well, which @Ranjib mentioned in another thread:
there is a light profile called "composite", which seems to stitch together different light profiles for their respective programmable interval. In my case I could use this to, for example, have a diurnal between 08:00 and 16:00 and afterwards run a much weaker lunar profile between 16:00 and 08:00.
It's not exposed in the GUI yet, put I'm hopefull that I can either set this manually or wait for the update.

I've read on this thread about the "Composite" PWM Profile. It is usable? In this way we can solve all our complex to use the same channel during the day but also as moonlight...

I was also thinking about the possibility to add a button inside the Auto light menu to "Enable this channel as moonlight" and then set a value for the intensity (a fix value, without moon phase should be enough)

If tgere's interest I can open a feature request on GitHub.. Please let me know! :)
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
332
Reaction score
393
Rating - 0%
0   0   0
Im currently setting up another reef tank. I have used reefpi way back when it was in beta. Im looking at getting reefpi setup again. Is this still being developed/working great?
 

KrisMoro

New Member
View Badges
Joined
Sep 27, 2017
Messages
5
Reaction score
0
Rating - 0%
0   0   0
I don't think so. Today is 3rd day I'm trying to install it on different hosts - from oldest Raspberry 1 (at least started), next is Raspberry Pi Zero W, and also tried on Orange Pi Zero 2W. At ALL boards I see error that embedded rpi driver cannot be accessed:

started reef-pi.service - raspberry pi based reef tank controller.
Jun 16 11:50:15 reef-pi reef-pi[1279]: 2024/06/16 11:50:15 driver-subsystem: Failed load raspberry pi driver. Error: can't build hal pin 9: strconv.Atoi: parsing "31+rpt": invalid syntax

Can someone try to reproduce?

another version of this error:
Jun 16 12:00:25 reef-pi systemd[1]: Started reef-pi.service - raspberry pi based reef tank controller.
Jun 16 12:00:25 reef-pi reef-pi[1495]: 2024/06/16 12:00:25 ERROR: failed to initialize drivers. Error: can't build hal pin 2: strconv.Atoi: parsing "31+rpt": invalid syntax
Jun 16 12:00:25 reef-pi reef-pi[1495]: 2024/06/16 12:00:25 Successfully started subsystem: system

I tried many versions from 4.3 to 6.0 - all gives me the same.
 

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