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

You are correct. Although it does say it will work on 3.3v

Is the slider of the reef pi smooth for you?

Did you see my post above?
I saw your post, I just missed answering it. I'll explain whats happening, the short answer is it is expected, and this is a pitfall in current UI implementation, I am thinking of a way to fix it.

When we move the slider in UI, for every mouse motion it triggers an update call to reef-pi, i.e. it can generate 10s to 100s of http calls per second, which in turn overwhelms the pi / reef-pi http stack. reef-pi should not allow this (making lots of api calls per second that can overwhelm the pi). While I work on the possible fix (more on that later) a possible work around is to use keyboard (left and right arrow) to move slider (this slows down the speed at which slider is moved, and makes less api call underneath), or to hold the slider in between values you want to see the corresponding effect. Note, this whole thing does not impact reef-pi performance otherwise (i.e. rest all other functions are not impacted)

Now, coming back to the fix. I am brainstorming on user experience where I can retain the ability to see led changes as we move slider, but also not make way too many api calls. I have thought about making api call only on mouse release/press event instead of move. This results in much less api calls, but the slider movement to led change effect is lost. I am now looking for some alternate solution (there must be some).. I'll keep you posted on this , soon I find something. This is something I have to fix before 1.0, if I cant, I'll disable the instant change user experience, i.e. users have to click the update button to see the effect of slider values on LED.
Does this answer your question ?
 
I saw your post, I just missed answering it. I'll explain whats happening, the short answer is it is expected, and this is a pitfall in current UI implementation, I am thinking of a way to fix it.

When we move the slider in UI, for every mouse motion it triggers an update call to reef-pi, i.e. it can generate 10s to 100s of http calls per second, which in turn overwhelms the pi / reef-pi http stack. reef-pi should not allow this (making lots of api calls per second that can overwhelm the pi). While I work on the possible fix (more on that later) a possible work around is to use keyboard (left and right arrow) to move slider (this slows down the speed at which slider is moved, and makes less api call underneath), or to hold the slider in between values you want to see the corresponding effect. Note, this whole thing does not impact reef-pi performance otherwise (i.e. rest all other functions are not impacted)

Now, coming back to the fix. I am brainstorming on user experience where I can retain the ability to see led changes as we move slider, but also not make way too many api calls. I have thought about making api call only on mouse release/press event instead of move. This results in much less api calls, but the slider movement to led change effect is lost. I am now looking for some alternate solution (there must be some).. I'll keep you posted on this , soon I find something. This is something I have to fix before 1.0, if I cant, I'll disable the instant change user experience, i.e. users have to click the update button to see the effect of slider values on LED.
Does this answer your question ?
Im good with it. I doesnt bother me at all. I just like to know it was suppose to be like that instead of the hardware giving problems.
After i get done testing this when i setup the dimming cycle on it i assume it dims smoothly like its suppose to.

Thanks for the explanation! Tonight imma setup my three lights and set the dimming up and let it be.

Thanks for all you do!!
 
Now, coming back to the fix. I am brainstorming on user experience where I can retain the ability to see led changes as we move slider, but also not make way too many api calls. I have thought about making api call only on mouse release/press event instead of move. This results in much less api calls, but the slider movement to led change effect is lost. I am now looking for some alternate solution (there must be some).. I'll keep you posted on this , soon I find something. This is something I have to fix before 1.0, if I cant, I'll disable the instant change user experience, i.e. users have to click the update button to see the effect of slider values on LED.
Does this answer your question ?

How about this: It will only send a value to the pi at most 10x per second. Can easily tweak the frequency by changing the 2nd argument of settimeout


var okToSend= true;
var timer;

function onmousemove(){
if( okToSend ){
okToSend = false;
timer = setTimeout(function(){okToSend=true},100);
//insert code to actually send the value
}
}
function onmouserelease(){
//This is the final value, so we want to send this one even if it has not been long enough.
okToSend = false;
clearTimeout(timer);
timer = setTimeout(function(){okToSend=true},100);
//insert code to actually send the value
}
 
Last edited:
How about this: It will only send a value to the pi at most 10x per second. Can easily tweak the frequency by changing the 2nd argument of settimeout


var okToSend= true;

function onmousemove(){
if( okToSend ){
okToSend = false;
setTimeout(function(){okToSend=true},100);
//insert code to actually send the value
}
}

This will involve a global variable okToSend, currently the callback/update function is same across all LED channels,

https://github.com/reef-pi/reef-pi/blob/master/jsx/led_channel.jsx#L43

I'll give it a try, none the less. Thanks for sharing the example. If you have any other javascript based throttling strategy, do let me know :-)
 
This will involve a global variable okToSend, currently the callback/update function is same across all LED channels,

https://github.com/reef-pi/reef-pi/blob/master/jsx/led_channel.jsx#L43

I'll give it a try, none the less. Thanks for sharing the example. If you have any other javascript based throttling strategy, do let me know :)

1 global variable shared among all sliders should be fine. I doubt that multiple sliders will be moving at the same time. And even if someone did manage to move multiple sliders at the same time nothing bad would happen.

Also I edited my code above to make sure you never drop the final value.
 
I know this is dumb.

How do i set a timer everyday for the refuge light to come on and go off say 8:00 pm and off at 10:00am.
Should just be a matter of setting up that outlet in the Timer screen.
Check the example pictures in post #996 on page 50.
 
I know this is dumb.

How do i set a timer everyday for the refuge light to come on and go off say 8:00 pm and off at 10:00am.
You have to create two timer jobs. Both with day '*', minute 0, second 0 and hour 22(on ) and hour 8 ( off)
 
After adding the * it worked as planned!

Also my lights are working great! Last night when they cut off the went full brightness before the power outlet cut them off.
I am glad it worked out for you. Keep us posted on the issues you are facing with reef-pi, I would appreciate any feedback as it help me make reef-pi more user-friendly and valuable
 
I am glad it worked out for you. Keep us posted on the issues you are facing with reef-pi, I would appreciate any feedback as it help me make reef-pi more user-friendly and valuable
No problem! Keep up the good work!
Im getting ready to build my 8 way ssr power block.

On the pwm lights. Is there a 0-5volt to 0-10volt converter i can buy? I dont think the one i have built is strong enough. It wont go all the way to 10 volts. Only 8.35.
 
After adding the * it worked as planned!

Also my lights are working great! Last night when they cut off the went full brightness before the power outlet cut them off.
I'll add a validation for this in UI .
 
No problem! Keep up the good work!
Im getting ready to build my 8 way ssr power block.

On the pwm lights. Is there a 0-5volt to 0-10volt converter i can buy? I dont think the one i have built is strong enough. It wont go all the way to 10 volts. Only 8.35.
Can you share your circuit details ? What transistor and resistors you are using ?
 
Hello all,

I recently purchased a raspberry pi3, I followed the instructions and installed Raspbian on an SD card, running the pi3 with raspbian, I have trouble following the steps laid out here (https://reef-pi.github.io/general-guides/install/)
going down each step as laid out in that link, I couldn't edit config.txt on the terminal, instead, I had to download notepadd ++ on my windows laptop system and edit the config.txt file there, and reboot raspbian on Raspberry pi.

I also had trouble configuring raspbian to use network time using the instructions provided, instead, I went to preferences>Raspberry Pi Configuration> localization and changed it to update local time.

The instruction for downloading reef-pi isn't working for me either, so, please any and all help would be appreciated.

I am hoping to control my lights, ATO, graph tank and sump temperature, and power heads eventually Ihen i get this to work.

looking forward to getting this working.
 
Hello all,

I recently purchased a raspberry pi3, I followed the instructions and installed Raspbian on an SD card, running the pi3 with raspbian, I have trouble following the steps laid out here (https://reef-pi.github.io/general-guides/install/)
going down each step as laid out in that link, I couldn't edit config.txt on the terminal, instead, I had to download notepadd ++ on my windows laptop system and edit the config.txt file there, and reboot raspbian on Raspberry pi.

I also had trouble configuring raspbian to use network time using the instructions provided, instead, I went to preferences>Raspberry Pi Configuration> localization and changed it to update local time.

The instruction for downloading reef-pi isn't working for me either, so, please any and all help would be appreciated.

I am hoping to control my lights, ATO, graph tank and sump temperature, and power heads eventually Ihen i get this to work.

looking forward to getting this working.
Instead of editing the config file directly, you can also update them by:
  1. Click the Raspberry Pi icon in the upper left.
  2. Go to Preferences>Raspberry Pi Configuration
  3. On the Interfaces tab enable the necessary items
To install reef-pi:
  1. On the raspberry pi, navigate to and download the latest release https://github.com/reef-pi/reef-pi/releases
  2. Copy the .deb out of the downloads folder to your desired location, I moved mine into Documents.
  3. Open Terminal and type
Code:
sudo dpkg -i /home/pi/Documents/reef-pi-0.3-pi3.deb
 
Im using the 2n2222 transistor but i cant remember the resistor value. Also have a 10 volt supply on each circuit.
There can be voltage drop due to some circuit related issues, I 'll try to reproduce this tonight and let you know. If you have a handy 12v dc supply , you can use that to get 10v peak i think, meanwhile.
 

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