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

DaveMorris

MACNA2016 Co-Chair
View Badges
Joined
May 9, 2009
Messages
786
Reaction score
562
Location
San Diego, CA
Rating - 0%
0   0   0
I am actually planning on building either two ReefPi's or one slightly modified to use on my dart frog vivarium. Many similarities between what the two systems would need, so it shouldn't require a lot of changes. One question that I do have...for the verbage that gets printed to the screen when looking at the ReefPi, where does that get changed? Or if I want it to say "Dave's Vivarium" on the top of a display screen, where does that type of programming happen? As I said when I hopped into this thread, not only do I need the controller aspect of this build, but I also want to learn from this experience. The information provided here and the help for a beginner to the programming world is phenominal and very much appreciated. I have some extensive knowledge when it comes to controllers and tank automation from years of needing it on my own tanks. I have absolutely no knowledge of programming though. My dad is a self-taught electrical engineer and a lot of that has rubbed off on me. :)
 
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 am actually planning on building either two ReefPi's or one slightly modified to use on my dart frog vivarium. Many similarities between what the two systems would need, so it shouldn't require a lot of changes. One question that I do have...for the verbage that gets printed to the screen when looking at the ReefPi, where does that get changed? Or if I want it to say "Dave's Vivarium" on the top of a display screen, where does that type of programming happen? As I said when I hopped into this thread, not only do I need the controller aspect of this build, but I also want to learn from this experience. The information provided here and the help for a beginner to the programming world is phenominal and very much appreciated. I have some extensive knowledge when it comes to controllers and tank automation from years of needing it on my own tanks. I have absolutely no knowledge of programming though. My dad is a self-taught electrical engineer and a lot of that has rubbed off on me. :)
When you type the controller name, the UI code is runs on the browser, and that code sits here: https://github.com/reef-pi/reef-pi/blob/master/jsx/configuration/settings.jsx . When you press the update button , then it hits backend code , which is the code that runs on the pi and stores it in database (so that it persists across reboots). That code lives here: https://github.com/reef-pi/reef-pi/blob/master/controller/settings.go
If you are new to programming, then its a hard place to learn code from, since its fairly complicated code base involving modern backend and frontend technologies (not that the code volume is high, its just everything is pretty sophisticated). Once 2.0 is released, I want to publish a python package, that will be a good place to interact with reef-pi for beginners. You can write your automation scripts using very easy to learn python scripts. That learning can be extended to understand and then develop the actual controller code fairly easily.
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,166
Location
Winchester, TN
Rating - 0%
0   0   0
@Ranjib , Here are my inital thoughts and some finds. First off, on the dashboard I get the error : GET API call failure. Details:{"url":"/api/tcs/undefined/usage"}

now my list.

  1. On dashboard, It would be nice to see the temp readout above, inside or somewhere without having to use the mouse or a finger on a device
  2. Same thing on the Temp page. can you show a device readout without having to hit expand?
  3. I like how the ATO graph on the dash board shows when it is on vs off. Can this be done for any other equipment?
  4. Temp tab. "Chart Maximun"
  5. Equipment Tab. Buttons dont change size with name of channel. Maybe move the name to beside the button? or change to a toggle switch instead?
  6. Email alert setup. When hitting update I get : "Please set a valid mail passowrd" this is done before Testing.
  7. How accurate is the DS18B20? I read it is +-0.5°C. but does it need to be calibrated? previous equipment did and I have about a 1.5°F difference between them. I question because the house is set to 76 yet the probe I have set beside the tank reads 83°
  8. Also on temperature tab, I do not have a chiller selected but the graph does show it when i have the control enabled.
  9. My ATO float switch works. I did have to select the GPIO as Reverse which was nice that i could do that there.
I plan to keep playing with the software. I like it. it is very clean and simple. might be cool if a user could change the background.
 
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
@Ranjib , Here are my inital thoughts and some finds. First off, on the dashboard I get the error : GET API call failure. Details:{"url":"/api/tcs/undefined/usage"}

now my list.

  1. On dashboard, It would be nice to see the temp readout above, inside or somewhere without having to use the mouse or a finger on a device
  2. Same thing on the Temp page. can you show a device readout without having to hit expand?
  3. I like how the ATO graph on the dash board shows when it is on vs off. Can this be done for any other equipment?
  4. Temp tab. "Chart Maximun"
  5. Equipment Tab. Buttons dont change size with name of channel. Maybe move the name to beside the button? or change to a toggle switch instead?
  6. Email alert setup. When hitting update I get : "Please set a valid mail passowrd" this is done before Testing.
  7. How accurate is the DS18B20? I read it is +-0.5°C. but does it need to be calibrated? previous equipment did and I have about a 1.5°F difference between them. I question because the house is set to 76 yet the probe I have set beside the tank reads 83°
  8. Also on temperature tab, I do not have a chiller selected but the graph does show it when i have the control enabled.
  9. My ATO float switch works. I did have to select the GPIO as Reverse which was nice that i could do that there.
I plan to keep playing with the software. I like it. it is very clean and simple. might be cool if a user could change the background.

You are likely to have a stale entry in dashboard configuration where one chart refers to non existent temperature usage (tc), update it and the error should go away
Now on the specific asks
1 & 2. Yup.. this is a recurring ask, to show the current temperature in the chart & list view. I have created a ticket to track this. Its not hard to implement, just give us sometime and we'll get this sorted. You can subscribe to this ticket https://github.com/reef-pi/reef-pi/issues/522 to stay updated as and when this is fixed.
3. I am not sure where else equipment usage is relevant. The TC (temperature control) chart already shows similar equipment usage (heater & chiller). I cant think of any other module where similar usage is involved.
4. Will fix it right away: https://github.com/reef-pi/reef-pi/pull/523
5. We are making some changes on the equipment UI. There are several other folks (fellow reefers & programmers @Michael Lane is one of them) who are now actively working on UI side, and they are far more competent in fixing these issues (including responsive aka mobile view) . So stay tuned
6. Thats an annoying but bengin bug. I'll get it fixed as well. Tracking ticket: https://github.com/reef-pi/reef-pi/issues/524
7. Its mostly accurate (more importantly its fairly precise). We do think it could use a calibration feature, and its planned as well, but I think we'll get to this after 2.0 release. Its a good to have things for us now (if i recall correctly ds18b20 accuracy is 0.5 degree Celsius, not Fahrenheit).
8. Yes. but it should show the usage value of chiller as 0. if thats not the case and you have not configured any equipment as chiller, then its a bug. Can you confirm?
9. I guess it means you have no specific ask around the ato and float switch, right ?

Thank you so much for sharing your articulated feedbacks, stuff like this helps us making reef-pi better..
 

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
I think I know this issue, and cant think of any easy workaround other than recreating that outlet by resetting database

I think this is the same issue I've had a couple of times. I'm having it again today. All of a sudden I can't control my return pump. I can't re-assign or delete anything to do with the affected relay.
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,166
Location
Winchester, TN
Rating - 0%
0   0   0
No cooler set.

Takes from my tablet
ea0716aa44a1a593536d817177846e66.jpg
091dca3691179ec5f71fdeabc81f13db.jpg
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,166
Location
Winchester, TN
Rating - 0%
0   0   0
Thank you. I worry that RJ45 connectors are harder to build due to special crimping tool requirement. But they are definitely better than audio connector for temperature sensors.

I did some thinking about the RJ45 connections. you can run a standard ethernet cable with these. I wired each end of the cable with 568B protocols. if you got two of them (one for the box and one for the tank stand) it would be super simple to connect and run. ZERO special tools required. BUT i have my equipment in a closet behind my tank so I needed at least 5 feet to do this.
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
My first order was also via Mouser and went ok as well.
For the PWM (my boards are in Austria since Tuesday but have not arrived yet)
The stencil from JLCPCB has arrived yesterday after 7 days transit in Austria , but no PCB's yet :mad:. DK gave me a Credit Note for a "next order" but no refund :mad::mad:, that's resolved, I have a refund via my bank/credit card :). the reflow oven is under reconstruction and awaiting some fresh PCB's after Capton tape arrived finally today.:cool:
I think this belongs to learning not to react too rapidly to unexpected events in a Reef ;). It's not my strength to await, "take things in my own hands" to rapidly, but as above, so far it worked :D
 
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
We got a handful of UI fixes and enhancements lined up for the next alpha release. I'll see how many bugs I can squash before this weekend, and then I'll cut a release. Currently, I am totally focused on the adafruit guides, I believe it will be of tremendous value to have peer-reviewed build guides for all 2.0 modules.
I am also excited to see first major code contribution from the community @Michael Lane , lighting UI is a much more crisp, mobile friendly now.
Screen Shot 2018-09-05 at 11.24.13 PM.png


Mobile
E10B0043-DE48-42AE-A4E0-82F6FE587C41.png


Still long way to go. But I am so happy with the new shiny ui :) , I thought I’ll share
 

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
Ranjib

While I feel guilty asking for issues to be sorted out, as it is clear that everyone is working so hard in their spare time as it is, please could you try sort out the issue of Reef-Pi losing the allocation of relays and not being able to edit or delete the equipment associated with them. My Reef-Pi has just forgotten the relay associated with my return pump when I fed this evening. I will have to delete the database and start again. Again.

Maybe there is a way that I can backup the database file when it is working properly and then just replace the faulty one when it breaks with the backup? Is this even possible?

Keep up the good work.

*** EDIT - I just discovered that if I go to the equipment page and edit the equipment that has lost it's association, and allocate it a different relay, then save, it accepts it. I can then go and reallocate the relay that wouldn't work previously and it works. No need to delete the entire database!! YAY ***

Des
 
Last edited:
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
Ranjib

While I feel guilty asking for issues to be sorted out, as it is clear that everyone is working so hard in their spare time as it is, please could you try sort out the issue of Reef-Pi losing the allocation of relays and not being able to edit or delete the equipment associated with them. My Reef-Pi has just forgotten the relay associated with my return pump when I fed this evening. I will have to delete the database and start again. Again.

Maybe there is a way that I can backup the database file when it is working properly and then just replace the faulty one when it breaks with the backup? Is this even possible?

Keep up the good work.

*** EDIT - I just discovered that if I go to the equipment page and edit the equipment that has lost it's association, and allocate it a different relay, then save, it accepts it. I can then go and reallocate the relay that wouldn't work previously and it works. No need to delete the entire database!! YAY ***

Des
I was just going to say the exact thing.
1) As you noted we have captured this in issue: https://github.com/reef-pi/reef-pi/issues/500 . We'll certainly nail it before hitting the final 2.0 release,
2) There's an ugly workaround, which is to edit an existing equipment and associate the outlet which is in limbo. You already figured out that.
This problem is more pronounced beta versions as we aggressively change the equipment API/database names during these releases.
Let me know if you need any help with your current build issues, I think we'll nail down the outlet/equipment association issue by end of September. I am currently focused documentation/guides 100%.
 

Cookiethief1983

New Member
View Badges
Joined
Sep 6, 2018
Messages
4
Reaction score
5
Rating - 0%
0   0   0
Hello all, sorry to resurrect this one, I cannot connect to UI from my pi3. "connection refused", The correct version was downloaded and installed, the service is active and running without errors reported.. HTTP://LOCALHOST:8080

Any help would be appreciated, NOOB.
 

Cookiethief1983

New Member
View Badges
Joined
Sep 6, 2018
Messages
4
Reaction score
5
Rating - 0%
0   0   0
Im kinda sad that we could not sort it out, and you have to recreate everything. I am planning to work on data export/import features, which will at least let you take backup and restore things from that backup, in near future.

https://github.com/reef-pi/reef-pi/issues/280


Im having the same issue as above "CONNECTION REFUSED", have tried the same troubleshooting up to this point. 4 re-installs have not fixed the issue.

http://localhost:8080 from Pi browser

Please help :p
 

noob again

New Member
View Badges
Joined
Sep 24, 2017
Messages
10
Reaction score
14
Rating - 0%
0   0   0
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
Hello all, sorry to resurrect this one, I cannot connect to UI from my pi3. "connection refused", The correct version was downloaded and installed, the service is active and running without errors reported.. HTTP://LOCALHOST:8080

Any help would be appreciated, NOOB.
Welcome to r2r , you’ll love it here :)
Can you try what @noob again mentioned ?
Which version of reef-pi you are running? Little bit details of your build will also help us understanding
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
169
Reaction score
264
Rating - 0%
0   0   0
Circuit wise, its not very different from Kessil controller, we can use either Pi (has two pwm output) or existing pca9685 pins (16) for pwm generation. this needs to be adjusted for the target wavemaker power. For jebao this is 24V , 700ma. So, a 24v power adapter, a tip120 and couple of resistor should be bare bone requirement on the circuit side. This is if we intend to drive the power head directly, if we instead use the jebao's controller to do the conversion and if it can feed in 10v pwm or 5v pwm like meanwell driver we can do away with same circuit as kessil controller. But this is one of the very many possibilities that will only work with jebao (it is possible to use straight wifi to control them as well, like how the jebao controller make master-slave among themselves).

Hi Ranjib, thanks for all this work!

I've done some deconstructing of my Jebao Wavemaker Controller. The wireless ones use a NRF24L01+ Transceiver Module to setup master / slave communication. It's cheap and easy to get one (https://amzn.to/2wQkmCY) and add it to a pi. The problem - which I havn't been able to figure out - is that there isn't a way to sniff the channel and signals the Jebao controller is sending, so they can't talk to each other. I don't know which command to emulate, or on which channel. I'm wondering if anyone else has some knowledge of the NRF24L01+ channel or commands that are standard on a Jebao. I imagine they all use the same channel for wider compatibility.

If that can be programmed in it seems like it would be a nice affordable plug and play option for reef-pi.

IMG_20180707_034340.jpg
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,166
Location
Winchester, TN
Rating - 0%
0   0   0
@Ranjib I am tryign to enable the telemetry for adafruit. I can see data feeds for system-load5 and for system-mem-used but that is all the data I see in the feeds section. do I need to do something different to enable temperature, ATO and pump status?
 

When to mix up fish meal: When was the last time you tried a different brand of food for your reef?

  • I regularly change the food that I feed to the tank.

    Votes: 45 21.5%
  • I occasionally change the food that I feed to the tank.

    Votes: 72 34.4%
  • I rarely change the food that I feed to the tank.

    Votes: 69 33.0%
  • I never change the food that I feed to the tank.

    Votes: 19 9.1%
  • Other.

    Votes: 4 1.9%
Back
Top