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

I've just upgraded to 0.9.1 and still have the "old" Equipment UI... Is there anything I need to remove?

Usually clearing cache and a forced refresh is needed. To see if it is the issue, open a "Private" browsing window and see if you see the changes.
 
Ranjib, the new equipment tab is great. I think it will help to avoid some of the same confusion as new users come on.
Two Questions:
  1. I have noticed that every time I upgrade the temp charts completely restart. Is it possible to have it restore the old data and keep going as it was? Not a huge deal, but if you are testing anything out with respect to temp and your trend goes away, you have to start over again.
  2. Is there a possibility before or with 1.0 to be able to reconfigure outlets, timers, etc...?I remember that we discussed it a while ago, but cant remember what was said. Again, not a huge issue, but it would be nice when timers are getting adjusted, as it will be also with wavemakers and dosers. Mostly it is also probably an OCD issue for me, if I have to delete an outlet, timer, equipment, etc... it moves to the bottom of the list, and is then out of order.
1. It is possible to store the stats data in sd card and restore it, but this will be a performance hit for reef-pi. Initially I didn't want to have any dashboard on the reef-pi itself, and was hoping to use adafruit.io for all charting, which will persist data across restart, because storing telemetry trends gonna cost cpu and storage (sd card) in a way that can impact reef-pi's performance. Later I introduced this whole in-memory data store, where reef-pi only keeps a fixed amount of telemetry data in memory, which does not incur any performance hit, but makes the whole reef-pi charts transient, i.e. they'll go away once reef-pi is restarted. To me this was a good compromise, since i dont expect reef-pi to be restarted frequently, and the telemetry data was not as critical as configuration itself. Also adafruit io will offer one month of telemetry as a backup.
If this is a common problem, I would love to revisit it, but probably post 1.0. Also, I'll need some volunteers to do a bit more thorough testing, particularly to ensure that when we do store the data locally and restart reef-pi how the controller behaves (cpu/memory footprint) under different workloads (number of equipments, lights etc). In short, this was a very aggressive performance optimization to keep reef-pi stable in lieu of some sub optimal user experience, while retaining an in-controller charting capability (and i think most commercial controller does not do that either).
2.Nope. :-( . Not because its hard, because to provide a consistent 'update' experience across jacks/outlets/equipments/lights i have to do quiet a bit of coding/testing across the board. That will take at least a month, and delay release. I dont want to rush and only have one or two component update feature, or have buggy update functionality.
But remember, though there is no UI to update existing equipment/outlet etc, it is absolutely possible to do it using API. The current API doc has example of how to update an outlet/equipment/light/jack etc. So, users have an workaround till UI support lands (post 1.0). This also gives me some low hanging fruit for post 1.0 releases. https://reef-pi.github.io/additional-documentation/api/
 
@Ranjib

Here's a thought related to your response quoted below:

Have you considered a "plug-in" system for reef-pi? i.e. the ability to add scripts that expand the functionality of the underlying software. For example, if someone wrote a script that tied a pin on the PCA9685 to the results of polling the CPU for its temperature. Sure, it could be done via the API, as you outlined, but it might be a little more "elegant" (for lack of a better word) to have it all presented within the same interface, rather than seperate interfaces for the core software and items controlled via the API.

A system in which you could control the use of something like Python scripts (or whatever scripting language you see as the best option) would probably have many advantages.
Yes :-), I have extensively thought about this. In fact I think of this as the generic version of "macro" or "feed" mode. Where you can declare a set of custom logic and reef-pi invokes it , automatically (based on certain triggers) or manually. My initial thoughts are to have a full blown programming language like ruby or python or lua or something more beginner friendly and modern, like scratch. I am learning the embedding technique for these, and will keep you all updated. But this is going to be a major feature for 2.0 for sure. I dont have specifics of what the UI will be or the exact language choice, other than that I don't want the macro language to be as primitive as the proprietory controllers, I want it to be a full blown programming language, that keeps the easy cases as simple as the proprietory controllers macro language, but make the harder cases much easier. That will also allow users of reef-pi to share and compose/combine differenct macros based on the language. ..
 
Thank you. That solved my problem!
So, you got it working ? Let us know if you still need any help.
@Somnifac thank you for the helping hand, really appreciate it :-)
 
It's awesome that you've considered this. I definitely understand that's on the "future functionality" list, but it's something that I'll very much be looking forward to. In the meantime, I'll probably be looking into the API to do anything I want to do. A combination of Python scripts hooking into the API would most likely do what I need it to do.

Yes :), I have extensively thought about this. In fact I think of this as the generic version of "macro" or "feed" mode. Where you can declare a set of custom logic and reef-pi invokes it , automatically (based on certain triggers) or manually. My initial thoughts are to have a full blown programming language like ruby or python or lua or something more beginner friendly and modern, like scratch. I am learning the embedding technique for these, and will keep you all updated. But this is going to be a major feature for 2.0 for sure. I dont have specifics of what the UI will be or the exact language choice, other than that I don't want the macro language to be as primitive as the proprietory controllers, I want it to be a full blown programming language, that keeps the easy cases as simple as the proprietory controllers macro language, but make the harder cases much easier. That will also allow users of reef-pi to share and compose/combine differenct macros based on the language. ..
 
You‘re triggering the wrong Pins. Who have to use the GPIO-Pin numbers. In your case you have to “translate” following:
11 = 17
13 = 27
15 = 22
18 = 24

Wish I'd seen this before I had to re-wire & figure it out that way, lol. I was literally just entering the physical pin number, it may help to make it clear in the setup that it needs to be the GPIO-pin number, though it's a lot more obvious in retrospect.
 
@Ranjib I'm going through the thread & reading about connecting via phone or tablet. Can you provide a bit more info on this? What I'm mainly not clear on is how to go about changing the config file. Is that going to be through the command line & if so, how? The two most relevant posts I've found follow:

>
```
api:
address: "0.0.0.0:8080"
```
restart reef-pi service `sudo systemctl restart reef-pi.service`

after this you should be able to access the UI from any tablet, phone or laptop's browser, using the Pi's IP address (reef-pi dashboard will show the IP)

>reef-pi ships with configuration that does not allow the software to be used from other devices. You can change it (/etc/reef-pi/config.yaml), to allow access from other devices. Once configure, restart reef-pi (sudo systemctl restart reef-pi), or restart raspberry pi, and then you should be able to access reef-pi from any internet connected device (such as mobile, tablets, computers etc), using the device's browser. Just point it to reef-pi's IP address. reef-pi dashboard will show the IP address of the controller. (or run `ip a s` command on raspberry pi ).
reef-pi home page (or dashboard)
 
Interesting project. You may find this useful .... or not. :)

May be a better and more secure electrical solution.

This was a prototype of a modified Startech rack mount power supply I did for a friend who needed to be able to remotely toggle power for four outlets.

I added light pipes as indicators for the front. Used a M12 round bulkhead fitting for the interconnect, and printed a simple enclosure for the relay board (optional, you could just as easily epoxy it down).

IMG_1238.JPG

IMG_1240.JPG

IMG_1241.JPG

IMG_1239.JPG
 
@Ranjib I'm going through the thread & reading about connecting via phone or tablet. Can you provide a bit more info on this? What I'm mainly not clear on is how to go about changing the config file. Is that going to be through the command line & if so, how? The two most relevant posts I've found follow:

>
```
api:
address: "0.0.0.0:8080"
```
restart reef-pi service `sudo systemctl restart reef-pi.service`

after this you should be able to access the UI from any tablet, phone or laptop's browser, using the Pi's IP address (reef-pi dashboard will show the IP)

>reef-pi ships with configuration that does not allow the software to be used from other devices. You can change it (/etc/reef-pi/config.yaml), to allow access from other devices. Once configure, restart reef-pi (sudo systemctl restart reef-pi), or restart raspberry pi, and then you should be able to access reef-pi from any internet connected device (such as mobile, tablets, computers etc), using the device's browser. Just point it to reef-pi's IP address. reef-pi dashboard will show the IP address of the controller. (or run `ip a s` command on raspberry pi ).
reef-pi home page (or dashboard)
These posts are for way older versions of reef-pi. Dont follow them. I have moved almost all configuration to be driven by UI since then. In your reef-pi dashboard, at the bottom you'll notice the IP address. That's the address you have to enter in your mobile or tablet browser... for example, my dashboard looks like this:
Screen Shot 2017-11-29 at 10.21.11 PM.png

which means, my reef-pi IP is 10.0.0.17, and I can access it from any device using:
http://10.0.0.17:8080 , as long as I am on the same wifi network
 
Interesting project. You may find this useful .... or not. :)

May be a better and more secure electrical solution.

This was a prototype of a modified Startech rack mount power supply I did for a friend who needed to be able to remotely toggle power for four outlets.

I added light pipes as indicators for the front. Used a M12 round bulkhead fitting for the interconnect, and printed a simple enclosure for the relay board (optional, you could just as easily epoxy it down).

IMG_1238.JPG

IMG_1240.JPG

IMG_1241.JPG

IMG_1239.JPG
Nice. I am planning to make a build with modding a triplite power strip with individual switch. I like the fact that these have dedicated surge protectors. Thanks for sharing
 
Nice. I am planning to make a build with modding a triplite power strip with individual switch. I like the fact that these have dedicated surge protectors. Thanks for sharing

I'd have to find my notes but I had originally looked at a backup power supply unit, but went a different route eventually since the venue had a backup generator. I think it was APC but I may be mistaken, but it was a battery backup unit that had plenty of room inside (which is rare) for an 8 gang relay board. That would be useful since you could then control which outlets get battery power in case of an outage. Hooking up to the alarm would be simple enough as an I/O, and most all of them now have a usb port so the Pi would have backup power also.
 
Since I plan on mounting an 80mm fan in the cover of my enclosure, I went ahead and designed a bracket to hold it:

fb1.jpg

fb2.jpg


There will be an 85mm through hole in the cover that this will mount into.
 
Since I plan on mounting an 80mm fan in the cover of my enclosure, I went ahead and designed a bracket to hold it:

fb1.jpg

fb2.jpg


There will be an 85mm through hole in the cover that this will mount into.
Wow .. your 3d printer should be pretty big .. or this is for CNC?
 
No, it's 3D printed. It's only 120mm wide and 12mm deep. It's only an 80mm fan.

That shouldn't present a problem to most printers I wouldn't think. A friend is printing it on his printer, but it looks like 200mmx200mm is a common approximate cutoff point, and this is well inside this.
 
Last edited:
No, it's 3D printed. It's only 12mm wide and 12mm deep. It's only an 80mm fan.

That shouldn't present a problem to most printers I wouldn't think. A friend is printing it on his printer, but it looks like 200mmx200mm is a common approximate cutoff point, and this is well inside this.
Neat. Keep us posted on any of the 3d printed parts , I think there will be others who might 3d print their controller parts.
 
Other parts will likely be just minor parts. I've determined that due to the wall thickness of my enclosure, I'm going to cut square holes and make 3d printed inserts to go in their place, with holes in them. That way I can have a 1mm wall thickness, instead of 5mm.

Other than that, I have anchors that some part standoffs screw into that I will glue in place to hold components in place inside the enclosure.
 
Other parts will likely be just minor parts. I've determined that due to the wall thickness of my enclosure, I'm going to cut square holes and make 3d printed inserts to go in their place, with holes in them. That way I can have a 1mm wall thickness, instead of 5mm.

Other than that, I have anchors that some part standoffs screw into that I will glue in place to hold components in place inside the enclosure.
Nice. I used standoff's heavily with wooden housing. Lets see how the project box based build comes up..
 
Definitely. I'll have parts dribbling in over the next few weeks. Temp sensor, water level sensor, lights, the 8 channel signal converter from robo-tank.ca, a prototype shield of the Pi, etc. Should be interesting to see what everyone comes up with.
 
These posts are for way older versions of reef-pi. Dont follow them. I have moved almost all configuration to be driven by UI since then. In your reef-pi dashboard, at the bottom you'll notice the IP address. That's the address you have to enter in your mobile or tablet browser... for example, my dashboard looks like this:
Screen Shot 2017-11-29 at 10.21.11 PM.png

which means, my reef-pi IP is 10.0.0.17, and I can access it from any device using:
http://10.0.0.17:8080 , as long as I am on the same wifi network

Hmmm, on my dashboard, it just says "unknown" where you have an IP address. Any thoughts on how to get around this?
 

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