Reef-Pi build... total newb

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 like the perma proto board because their significantly better quality. I can do mistakes :) and resoldering is not that hard. On cheaper boards i see their top colored layers melt or other heat induced quality issues. Perma proto boards are very forgiving . But this may not be an issue if you are comfortable with the normal cheap boards already (good at soldering /circuit )
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Well, I must say I am off to a not so stellar start.

Having no experience in soldering or electronics multiplied by my lack of free time, it has been all but a stand still.

But I have high hopes for this weekend. My goal is to get the temp probes soldered along side with the flush mount side of the plugs, and maybe even get it mounted to enclosure. I guess I am a bit confused, can I just solder the flush mount plug wires straight to the protoboard, or is this considered bad?

On my protoboard, I feel wiring up my NEG, 3v and 5v rows might need to be done under the board, I think this is ok?

I have ordered the standalone plugs, and plan to add these also to my enclosure (same enclosure).

My setup vision is

Display/Camera all setup in front of tank so co-workers can scroll though images from the tank and get information about the tank and its inhabitants. Camera on the back side so I can grab pictures somehow in the future. A double chord (HDMI/USB), going from this would go to the enclosure I am working on now. The enclosure will have my 2 probes, 5 outlets, and a USB/HDMI flushmount extension. After thinking this through, I may just mount the RPi so I can access the HDMI and USB ports and 3D printer off a faceplate??

Best case scenerio this weekend is to even install the outlets... But I am not sure I have what I need.

I have the 4plug relay (4 channel, ELEGOO DC 5v relay), but in all these other builds there is the chip in the middle of the protoboard is that a must have for the outlets?? Or can I just wire them up?

All this is pending my needing to improve my soldering skills... I have not done well, and still need to practice as I have not done well at all in this category.

Anyway, just updating my thread so later when Im a soldering master and everything is done, I can laugh at myself !
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Oh and my wife says thanks for this...

2702F259-2113-47A1-A34F-54C367DA82F4.jpeg
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Oh and my wife says thanks for this...

2702F259-2113-47A1-A34F-54C367DA82F4.jpeg
My wife felt the same way, but now that mine has been running for awhile she likes how I can dim the lights etc and even noticed how the fish have become more lively. Reef-pi has really let me dial in lighting and temps, and now the ph module even allows me to track ph over time, so I can see ph trends, so water changes can happen before theres a problem.
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Finally some success !! I successfully soldered both temp probes into miniXLR plugs.

And soldered my 3v, 5v and ground jumpers on the protoboard!!

Small steps...

I am thinking now that the enclosure I have picked out is not big enough, but really want to make it work. Once I get some standoffs placed and the pi situated, I will have a better view of it. I was planning to flushmount the HDMI side, but that also leaves the power plug sticking out, which I wasnt planning to do.

Anyway, onward and upward!!
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Quick question, probably for @Ranjib or @Michael Lane

Since I have some things I would like the pi to do outside of the reef-pi software, I am thinking of making my own dashboard by calling the API's in reef-pi.

I have been developing for quite some time, but never on the pi. What do you feel is the best avenue here...

I would probably be over my head trying to download the actual reef-pi source to add to it, but maybe...

I could do something in python?? or Go/React??

Also, what if I wanted to add tables/data to whatever database you are using underneath? I assume if I go that route, might be best to add code to the reef-pi...

Just considering somethings, I guess i wouldnt need database support really for what I am looking to do, simple text file could probably store what I need.

Any thoughts or ideas or examples of others using reef-pi and adding to it??

Also, another dumb question, do you actually develop on the pi?? Or do you use Visual Studio somehow and transfer over the code?

thanks as usual for any info....
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I use VS Code on Windows to develop for reef-pi. Ranjib has a good dev setup guide. Linux and Mac can also be used. Go makes this pretty easy since it can target specific architectures easily.

The API documentation is a bit out of date since so much is added in v3. @Zekth had started working on something to keep the API docs in sync, but I'm not sure if that's complete.

As for adding functionality outside of reef-pi, any language could work since it will be interfacing with the web API. The database is based on bbolt, so only a single process can interact with it. Any additional storage would have to be separate.

reef-pi is a very welcoming open source project. I'm happy to answer any questions if you give it a shot. There's also a slack channel for more real-time development discussion.

I'm interested in the apartment features you'd like to add.
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
So sitting here today, I am interested in finding ways to...

Video display for onlookers of the tank, probably just a webpage, cycle pictures, etc with icons/alerts if something is needed to be reviewed.

Since its an office tank, I don't have to ATO, but would still like an alert that the water is low.

I have walked a few co-workers through on how to feed the tank. So I would like a way to show the last time the tank was fed, and alert if its ok to feed. This has bitten me once already where the tank was double fed by some of my helpers. I have a grand idea here with a RGB button, that will show green when its ok to feed, when someone feeds, they push the button, it will write out the feeding and then turn button red until feeding is available again. Anyway, something in that area.

I would like to find a way to snap a photo on demand via email, so something to parse through my emails, check to ensure its a known address, then send the photo back to sender.

Auto fish feeder is also a project I have in mind. Its kinda last on the list as it would just be for project sake and to learn new things. I know they have them battery operated, but would be cool to auto feed the fish, and then of course the above button goes red so others dont feed. It would also look, and if hand fed, wouldnt auto feed :)
 

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
Quick question, probably for @Ranjib or @Michael Lane

Since I have some things I would like the pi to do outside of the reef-pi software, I am thinking of making my own dashboard by calling the API's in reef-pi.

I have been developing for quite some time, but never on the pi. What do you feel is the best avenue here...

I would probably be over my head trying to download the actual reef-pi source to add to it, but maybe...

I could do something in python?? or Go/React??

Also, what if I wanted to add tables/data to whatever database you are using underneath? I assume if I go that route, might be best to add code to the reef-pi...

Just considering somethings, I guess i wouldnt need database support really for what I am looking to do, simple text file could probably store what I need.

Any thoughts or ideas or examples of others using reef-pi and adding to it??

Also, another dumb question, do you actually develop on the pi?? Or do you use Visual Studio somehow and transfer over the code?

thanks as usual for any info....
This is the place where I'll add API related documentation, it's a work in progress thing right now: https://reef-pi.github.io/additional-documentation/api/

Use python or the language you are comfortable with to do the basic http/cookie plumbing and talk to reef-pi API directly. Never, ever tinker with database directly outside reef-pi's own codebase. reef-pi uses boltdb, an embedded go based key/value pair, so it unlikely to have good support in other languages.
I use vi to develop the code in my macbook pro. And then I deploy the binary to my test builds for hardware testing. Very few things in reef-pi is actually relevant to hardware, bulk of the ui, database and computational logic (homeostasis control, diurnal cycles etc) all can be developed and tested on desktop/laptops. We have extensive noop plumbing (stubbed drivers) for development purposes.

The best way to understand the APIs is to look the the javascript console in your browser, and under network tab, you'll see the relevent backend API is being called, its request details and response details. Its very intuitive (at least thats what I think), http/json bases restish API, so you have worked with something similar in past, this should be easy.
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Thanks for the help. I went to my main PC and loaded up VS Code and worked on some python scripts, got one that checks mail (mostly already done in tutorial).

Havent tried running on my pi yet, as I am still soldering and trying to figure out my enclosure. This weekend I hope to get my 2 temp probes, my HDMI/USB port extended to enclosure and 5 outlets, at least put in the enclosure. Still have a question pending the outlets, I still may not have what I need, lol.

I found a great enclosure for my work, and looking forward to finishing it up.

On the dev side, basically PI is running underneath the OS, any app I write will also be in the "While TRUE" kinda loop right? Is that going to cause any performance issues??
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
You can set it up with a while loop, but it might be a better idea to schedule the script via cron job to run ever 1 or 5 minutes or whatever frequency you need. Running as a cron job may reduce resource usage since it isn't running all the time. Plus it restarts your process regularly so you don't have to worry too much about intermittent crashes.
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Finally some free time ugh...

I spent last week picking up Python, and got a nice shell going for my intentions.

C7222FF8-544F-477C-B39A-A54EB272BA0F.jpeg


I got it connected to sqlite, and wrote out the feeding and water changes code. The buttons turn colorful when it’s ok to feed or when water change is due.

Thermometers are not setup yet, as I have yet tried to call the reef-pi API, that is next.

The image part of the screen cycles through images in a directory.

I knows it’s basic, but it took me a while to figure out a few nuances with python.

Anyway, just thought I’d share my progress
 
OP
OP
T

Tommy_G

Community Member
View Badges
Joined
Jul 22, 2019
Messages
60
Reaction score
59
Location
Louisville
Rating - 0%
0   0   0
Messing with Python, trying to grab the latest temp value of the two probes.

Best I can tell the API can't return just the latest value?? Thought I would ask here before trying to use the

/usage returns a huge result set

I tried /usage/1 to maybe just get the last one, but no dice...

any thoughts / ideas? @Ranjib @Michael Lane
 

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
Messing with Python, trying to grab the latest temp value of the two probes.

Best I can tell the API can't return just the latest value?? Thought I would ask here before trying to use the

/usage returns a huge result set

I tried /usage/1 to maybe just get the last one, but no dice...

any thoughts / ideas? @Ranjib @Michael Lane
Yes, currnetly you have to use the /usage and just take the first value in that array. Code wise it should not be much different, as you are unmarshalling json in both cases to access the data structure.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 15 22.4%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 2 3.0%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 0 0.0%
  • I wear reef gear primarily to relax where I live.

    Votes: 8 11.9%
  • I don’t wear gear from reef brands.

    Votes: 36 53.7%
  • Other.

    Votes: 6 9.0%
Back
Top