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

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
Some changes required. you have imported time twice. remove the second import statement inside the loop. light_id 's are not light names. If I understand correctly , you have three lights defined, and each of them has 5 channels (East, West, Center). The final value has to be converted into int, pwm_value/40.96 can be a float, so wrap that in int(pwm_value/40.96). I'll share an updated code soon...
Question: your lights dim smoothly across the entire 0-100% range? For kessil i have seen we cant dim it below 13% (it flickers below that), i was under the assumption that all other lights have same limitations.
I am not sure of the lowest PWM value that I can dim to, but it is less than 1-2%
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I'm all good now. Is there something in the code that prevents is from using GPIO4? I tried starting on that one & it refused to work. All the others worked fine. I may just have a dead pin.
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
I think I have mentioned earlier, but I’ll repeat that even with this, the kessil controller works flawlessly if I use pca9685 and a dedicated build
My lights work fine to, and I got a job lot of lm2569's from china 20 for £3.00 or in your money I'm guessing around $5
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I'm all good now. Is there something in the code that prevents is from using GPIO4? I tried starting on that one & it refused to work. All the others worked fine. I may just have a dead pin.
gpio4 is used by temperature sensors
 

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
Hey

Next dumb question :)

The wires on my FS-IR02 level sensor are way too short. Will it be a hassle if I extend them? I can't imagine so as it's only an on / off signal, not a reading like Ph or Temp??

Thanks
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi to all. Like to ask do i need to use external 5v to drive my 8ch relay board,or just use the Raspberry 5v pin.Thank you
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
Some changes required. you have imported time twice. remove the second import statement inside the loop. light_id 's are not light names. If I understand correctly , you have three lights defined, and each of them has 5 channels (East, West, Center). The final value has to be converted into int, pwm_value/40.96 can be a float, so wrap that in int(pwm_value/40.96). I'll share an updated code soon...
Question: your lights dim smoothly across the entire 0-100% range? For kessil i have seen we cant dim it below 13% (it flickers below that), i was under the assumption that all other lights have same limitations.
I've made the changes to the code that you said, except for the light id. Where do I find the light_id?
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi to all.try to install reef-pi now for 4-5 times,something always wrong.Yesterday was almost working,today morning i try again to log in with localhost:80 and something go wrong again,it try to download reef-pi when i go to web browser.Evennow i try to downgrade to reef-pi1.0 now go to the web browser but give me wrong msg. reef-pi is running but the msg is 404 not find
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi to all.try to install reef-pi now for 4-5 times,something always wrong.Yesterday was almost working,today morning i try again to log in with localhost:80 and something go wrong again,it try to download reef-pi when i go to web browser.Evennow i try to downgrade to reef-pi1.0 now go to the web browser but give me wrong msg. reef-pi is running but the msg is 404 not find
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
Hi to all.try to install reef-pi now for 4-5 times,something always wrong.Yesterday was almost working,today morning i try again to log in with localhost:80 and something go wrong again,it try to download reef-pi when i go to web browser.Evennow i try to downgrade to reef-pi1.0 now go to the web browser but give me wrong msg. reef-pi is running but the msg is 404 not find

are you running Headless and what version of pi are you using?
If you are running gui on the pi computer itself you type "localhost " into your browser..

You may need to clear cache and browser history on the Computer your using to access the pi.. Sometimes rebooting your Internet modem and router helps as well.
If the above does not apply try following the Troubleshooting guide here
https://reef-pi.github.io/additional-documentation/troubleshooting/

Note if you go into settings do not turn on the pca 9685 driver (check mark box) Unless you have board Connected and powered on.. It will Crash your reef-pi .....

Hope this helps
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey

Next dumb question :)

The wires on my FS-IR02 level sensor are way too short. Will it be a hassle if I extend them? I can't imagine so as it's only an on / off signal, not a reading like Ph or Temp??

Thanks
Should be ok. I have also bought other optical sensors (with same 4pin jst connector) with longer cable length
https://www.amazon.com/dp/B00Z9NUJWW/
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi to all. Like to ask do i need to use external 5v to drive my 8ch relay board,or just use the Raspberry 5v pin.Thank you
dont use pi's 5v pin. you cant draw a lot of current from there... you can power things like pca9685 or some other ICs, but not LEDs. Use a dedicated power supply for the LEDs.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've made the changes to the code that you said, except for the light id. Where do I find the light_id?
you can get the light ids by making an api call to list all lights and iterating over the result, each entry is one light

Code:
resp = requests.get("http://localhost/api/lights", auth=auth)
lights = resp.json()
lights[0]["name"]
lights[0]["id"]
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi to all.try to install reef-pi now for 4-5 times,something always wrong.Yesterday was almost working,today morning i try again to log in with localhost:80 and something go wrong again,it try to download reef-pi when i go to web browser.Evennow i try to downgrade to reef-pi1.0 now go to the web browser but give me wrong msg. reef-pi is running but the msg is 404 not find
Can you tell us more about your setup.. what pi, how you installed it, share the logs etc.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Thank you for the help,running 2.0 headless and now after 48 hr i could log in to raspberry and i could log in to reef-pi.The 5v i ask for the Relay board not for light.Ask because raspberry was running yesterday ok,but when i connected the 8 ch relay raspberry acted funny, show some low pover state.Thank you again.Yesterday try to run raspberry not headless but i can see chromium take all the power from raspberry. Deleted and today i installed 2.0 headless,and connected from my Ubuntu 18.4 and Putty.Now is fast.
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi again Q if i drive the 8 ch relay board from external 5v how to give vcc from raspberry to relay board.What Ranjib send me gpio pin out ther is vcc on #1 pin but that is Temp VCC
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 35 43.8%
  • I put minimal focus on floor support.

    Votes: 19 23.8%
  • I put no focus on floor support.

    Votes: 24 30.0%
  • Other.

    Votes: 2 2.5%
Back
Top