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

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
1) buy two of the cheap probes. Periodically check the probe your using for corrosion. If you get some or your temps get wonky then replace. Likely you never will have to.

2) buy the cheap probe. Pot the probe and an inch of wire in epoxy. I used a piece of pvc pipe as the mold for the epoxy.

3) by one of the double crimp silicone wire probes. Do nothing but use it and get better temperature accuracy (hopefully). I have no idea where to get it in Europe but it looks like this. https://www.ebay.com/itm/New-DS18b2...2349624.m46890.l49286&mkrid=711-127632-2357-0

4) buy one from theatrus and know you are getting an accurate probe with long lasting corrosion protection.
I went for the low tech solution, I just slathered on a bunch of silicone caulking on the probes. They appear to read temp just fine at least good enough for me and so far almost 2 years in usage no rusting, YMMV. :)
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,146
Reaction score
3,542
Location
Sacramento, CA area
Rating - 0%
0   0   0


Adapted some firmware from the DualDoser to quickly make the uPWM USB adapter.

Four channels of PWM, with both adaptable frequency and on-time - in this case it’s about 10kHz PWM, with room to go higher. I’ve always been grumpy using a PCA9685 and it’s low maximum frequency which can cause banding in images, so made something flexible. It also has nearly twice the base clock of the PCA9685 (48MHz vs 25MHz), so even at the same bit depth it’s twice as fast. There is a little more to explore with the TCC peripheral on the SAMD11 including dithering mode, which can help power supplies to the LEDs.

I made a silly little demo just by attaching some LEDs to it (there is a 1k resistor on each pin), and had the Pi with a small Python test program fade the LEDs in and out (same rate different offset). It was doing 100Hz updates without a sweat, will push it faster.

Firmware is here:

Edit: Just for grins, I can _update_ at about 5.8kHz (load a new PWM value to use). Thats a bit nonsensical, but its possible.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,078
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
This is a persistent theme, and I'm cooking up something to help folks at least for secure web access back to their ReefPi from anywhere. I'll have more to share soon, as a free community service.

I'm a bit into Tom's camp from a remote access PoV (I have a good mesh of Wireguard tunnels up at all times between devices, makes roaming a dream), but its not something I'd expect from folks to understand how to setup, nor is it in their set of risk factors. Port forwarding can work, but it adds some other risk factors, and isn't workable for everyone (non-pseudo-static IPs, ISPs with less inbound allowance, etc). As Tom said, the right way is something like the venerable ngrok tunneling setup, just secure by default and no need for the silly free plan caps. More details soon.

Note that "using VNC" usually means you should either be using Reef-Pi on the web interface directly, _or_ just using SSH (for admin stuff). If you're using VNC to look at the web interface or opening the terminal, that's just silly ;)
we need a cloud based control plane. that is the only long term sustainable thing i see. but then that will open up a can of work :)

i have this one my mind (a minimal cloud based command & control service), but its even less priority than contolling multiple reef-pi from a single place.. so unlikely to happen any time soon..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,078
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Will trade aptisia
you can just enter the name of the metric in your query section. the specific metric name you can see in 'http://reef0-pi-IP/x/metrics'

example:
equipment_state.png


you dont need the {job="pico1-app"} part, i need it because i have 10+ reef-pi configured with my prometheus/grafana server.
generally the equipment state are emitted as "equipment_name_state" format
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
I did a quick search but hoping someone can chime in and let me know the easy way in grafana to show state. Similar to what is on the dashboard for equipment, in this case its for an ATO light and the state from prometheus is either 0 or 1. I just want to have a panel that reports the state either full or empty etc, when my led light comes on I know I need to refill my ATO bucket but would like an email alert to be triggered also. Poking around grafana and just haven;t found the option that I wanted and thought someone may already have something set up similar.

Only tuesday and it's been a looong week, lol. :)
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
855
Reaction score
1,032
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
you can just enter the name of the metric in your query section. the specific metric name you can see in 'http://reef0-pi-IP/x/metrics'

example:
equipment_state.png


you dont need the {job="pico1-app"} part, i need it because i have 10+ reef-pi configured with my prometheus/grafana server.
generally the equipment state are emitted as "equipment_name_state" format
Bone Head on my part.. thanks for this.. Binary for the win.. dam the ones and zeros.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
I do that on several of my graphs.. The query is the same as a line chart, but on the right side panel, I set mine to "stat" for the graph type, on Value Options set SHOW to Calculate, Calculation to "Last Value". Then on Thresholds I set 1 = Green, 0 = Red and Value Mappings I set 1 = On and 0 = Off
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
I do that on several of my graphs.. The query is the same as a line chart, but on the right side panel, I set mine to "stat" for the graph type, on Value Options set SHOW to Calculate, Calculation to "Last Value". Then on Thresholds I set 1 = Green, 0 = Red and Value Mappings I set 1 = On and 0 = Off
Yeah I had looked at that and a discrete plugin that gives me visually what I want but for whatever reason Grafana does NOT support Alerts for stat panels and I want an alert, that is one of the main things that I am after. For whatever reason I cannot get the alert working from reef-pi and thought i would just do it in grafana. So I can either have it look nice via stat etc but no alert or go with a time series or graph panel. There is a 4 year old thread where folks have been asking for it, must have been difficult code wise to do, not sure why but I could see how folks would like to be able to have an alert for something that is either up or down.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Yeah I had looked at that and a discrete plugin that gives me visually what I want but for whatever reason Grafana does NOT support Alerts for stat panels and I want an alert, that is one of the main things that I am after. For whatever reason I cannot get the alert working from reef-pi and thought i would just do it in grafana. So I can either have it look nice via stat etc but no alert or go with a time series or graph panel. There is a 4 year old thread where folks have been asking for it, must have been difficult code wise to do, not sure why but I could see how folks would like to be able to have an alert for something that is either up or down.

There has to be a way to do an alert on that.. I've never messed with alerts. I used to have my security cams send me alerts when there was motion detection and after a while my ISP decided I was spamming, so they blocked me from sending emails thru their servers.. So now I'm unable to send alerts unless its thru Gmail and I'd rather not use that.

I have an Equipment panel on my graph for my fans / heaters / chillers.. But I also have a time series graph and can send alerts from that separate graph..
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
There has to be a way to do an alert on that.. I've never messed with alerts. I used to have my security cams send me alerts when there was motion detection and after a while my ISP decided I was spamming, so they blocked me from sending emails thru their servers.. So now I'm unable to send alerts unless its thru Gmail and I'd rather not use that.

I have an Equipment panel on my graph for my fans / heaters / chillers.. But I also have a time series graph and can send alerts from that separate graph..
Yeah I rarely look at the graph more to make sure ATO is behaving so I will just make it a time series and alert that way, I dont really need to see that ATO is low on the graph, just need to get an email.
 

friskaburger

New Member
View Badges
Joined
May 23, 2021
Messages
16
Reaction score
7
Location
Los Angeles
Rating - 0%
0   0   0
Hey all, I recently upgraded to 5.1 and now I can't seem to change my ranges or colors of my graphs, does anyone know where it went? Screenshot showing where it used to be but now I don't see the option to change color or range.
1645068914120.png
 

friskaburger

New Member
View Badges
Joined
May 23, 2021
Messages
16
Reaction score
7
Location
Los Angeles
Rating - 0%
0   0   0
Hey all, I recently upgraded to 5.1 and now I can't seem to change my ranges or colors of my graphs, does anyone know where it went? Screenshot showing where it used to be but now I don't see the option to change color or range.
1645068914120.png
Just as an update, I opened in Chrome and the settings are there, so there's some issue with either my particular setup in Firefox or Firefox in general
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,550
Reaction score
1,544
Rating - 0%
0   0   0
Just as an update, I opened in Chrome and the settings are there, so there's some issue with either my particular setup in Firefox or Firefox in general
After every update to reefpi, close all reef-pi tabs, and when you open a new one hit control+F5, that should clear out most remnants that firefox has kept from old versions
 

im_jeremy5

Community Member
View Badges
Joined
Aug 14, 2019
Messages
41
Reaction score
61
Rating - 0%
0   0   0
I have the zero w ( don't know what version), and want to enable remote access with vnc (so I can access it over the internet from anywhere). The one I have is not fast enough to do this. Which rpi is recommended for this?
I went down a long rabbit hole trying to figure this out. Tailscale is the only way to do this. And it works reliably. I will send you a link in a moment.
 

im_jeremy5

Community Member
View Badges
Joined
Aug 14, 2019
Messages
41
Reaction score
61
Rating - 0%
0   0   0
I have the zero w ( don't know what version), and want to enable remote access with vnc (so I can access it over the internet from anywhere). The one I have is not fast enough to do this. Which rpi is recommended for this?
Tailscale. This dude posted this link that solved this problem for me. Been using it for months so far and can reach the web ui from anywhere without issue. You set up an account. Run some basic commands on the pi,, then install tailscale on your phone/pc and you can access it from anywhere just like you are at home. https://www.reef2reef.com/threads/reef-pi-5-0-release-announcement.874824/post-9788797
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
Eh I trust no one, they are still in the middle and setting things up for the wireguard tunnels underneath. It's probably better than a lot of the other stuff out there like port forwarding etc...

Nebula FTW :)
 
Back
Top