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

Fun teardown on all the fake DS18B20 probes (most cables on eBay/Ali are not the real IC). More variety than I expected to be honest


Nice work, so where is the best place to hopefully get authentic probes from? Would be nice to know a good resource to hopefully get legit probes.

:)
 
Last edited:
There needs to be a "Grafana for Dummies" post somewhere. lol

There is quite abit to it, however, I found the interface fairly intuitive and had my graphs built fairly quickly.

I suggest looking at other already built graphs and going from there.


Here is the JSON model for my QT setup.

This pi only monitors / controls the temp in the tank.

The graphs are pretty simple, one Temp graph, one that shows the current state of the heater and one that shows the state of the heater over time.


JSON:
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 6,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "from": "",
              "id": 0,
              "operator": "",
              "text": "On",
              "to": "",
              "type": 1,
              "value": "1"
            },
            {
              "from": "",
              "id": 1,
              "operator": "",
              "text": "Off",
              "to": "",
              "type": 1,
              "value": "0"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "dark-green",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "qtpiequipment_heater_state",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Equipment",
      "type": "stat"
    },
    {
      "aliasColors": {
        "Fan": "orange"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "7.0.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "qtpiequipment_heater_state",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Heater",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Heater",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "qtpitemp_reading",
          "interval": "",
          "legendFormat": "Temp",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Temp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "QT Pi",
  "uid": "f1p2DxmMz",
  "version": 3
}

1594633920061.png
 
There is quite abit to it, however, I found the interface fairly intuitive and had my graphs built fairly quickly.

I suggest looking at other already built graphs and going from there.


Here is the JSON model for my QT setup.

This pi only monitors / controls the temp in the tank.

The graphs are pretty simple, one Temp graph, one that shows the current state of the heater and one that shows the state of the heater over time.


JSON:
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 6,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "from": "",
              "id": 0,
              "operator": "",
              "text": "On",
              "to": "",
              "type": 1,
              "value": "1"
            },
            {
              "from": "",
              "id": 1,
              "operator": "",
              "text": "Off",
              "to": "",
              "type": 1,
              "value": "0"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "dark-green",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "qtpiequipment_heater_state",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Equipment",
      "type": "stat"
    },
    {
      "aliasColors": {
        "Fan": "orange"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "7.0.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "qtpiequipment_heater_state",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Heater",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Heater",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "qtpitemp_reading",
          "interval": "",
          "legendFormat": "Temp",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Temp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "QT Pi",
  "uid": "f1p2DxmMz",
  "version": 3
}

1594633920061.png



Ummmm. Bru, you're underestimating just how "dumb" I am with this. :eek: That literally looks like the Matrix scrolling down my screen . ;Hilarious
 
Fun teardown on all the fake DS18B20 probes (most cables on eBay/Ali are not the real IC). More variety than I expected to be honest

So I noticed this

"Solution to the 85 °C-Problem

There is a simple, undocumented, way to discriminate between the power-up 85 °C-reading and a genuie temperature reading of 85 °C in DS18B20 of Family A [5]: <byte 6> of the scratchpad register. If it is 0x0c, then the 85 °C-reading is a power-up reading, otherwise it is a true temperature measurement."

This is the only thing that bugs me with the temp probes. Ocassionally ill get an 85c and it will alert me that the tank is running hot. Is there anyway to stop this 85c registering?
 
So I noticed this

"Solution to the 85 °C-Problem

There is a simple, undocumented, way to discriminate between the power-up 85 °C-reading and a genuie temperature reading of 85 °C in DS18B20 of Family A [5]: <byte 6> of the scratchpad register. If it is 0x0c, then the 85 °C-reading is a power-up reading, otherwise it is a true temperature measurement."

This is the only thing that bugs me with the temp probes. Ocassionally ill get an 85c and it will alert me that the tank is running hot. Is there anyway to stop this 85c registering?

Well if i understood that link correctly then it is doubtfoul whether pretty much anyone at all here even has family A sensors so i don't know how helpful that byte is going to be, especially for a standard solution
 
Is it possible to setup the ATO section of reef-pi to require two (or more) float switches to be triggered (reading low water) level before turning on a pump? Can this be done in a macro possibly? Or is wiring them in series the only way?
 
Is it possible to setup the ATO section of reef-pi to require two (or more) float switches to be triggered (reading low water) level before turning on a pump? Can this be done in a macro possibly? Or is wiring them in series the only way?

I have three float switches in my main ATO circuit, all float switches are wired in series. I have 2 in the sump for water level, primary and backup and one basically upside down in the ATO container for low water cut-off. I have an additional ATO circuit in the ATO container that lights an LED to notify me that the container is getting low on water. You can see some pictures in my build thread...

:)
 
OK. I haven't played with the dosing function at all so it was just a guess. But if you just controlled a dosing pump like a piece of equipment it would work. But then you lose the additional dosing functionality. I might be speaking out of turn here, but what you describe sounds like a glitch not unlike the macros only running in reverse when triggered by a timer or macro. Just a guess though, but sounds solveable. Or maybe a "manual dose" feature needs to be introduced........ somehow.

It's easy to have ideas when you're not the one that actually has to make them work :) :) :)

I just started using Reef-pi with Leviathan and i can’t get the dosing pumps to work on a timer. They run fine in calaibration mode but they won’t turn turn on when I set any of the Month, Day, Week, hr, min, sec....I have the P1FWD on. When I set all the values to * under dosing UI and turn on the P1FWD under Equipment it runs perfect...It’s when I put in any time value it does not run at specified time.
 
I just started using Reef-pi with Leviathan and i can’t get the dosing pumps to work on a timer. They run fine in calaibration mode but they won’t turn turn on when I set any of the Month, Day, Week, hr, min, sec....I have the P1FWD on. When I set all the values to * under dosing UI and turn on the P1FWD under Equipment it runs perfect...It’s when I put in any time value it does not run at specified time.
Can you share the doser screen with your settings?
 
So I noticed this

"Solution to the 85 °C-Problem

There is a simple, undocumented, way to discriminate between the power-up 85 °C-reading and a genuie temperature reading of 85 °C in DS18B20 of Family A [5]: <byte 6> of the scratchpad register. If it is 0x0c, then the 85 °C-reading is a power-up reading, otherwise it is a true temperature measurement."

This is the only thing that bugs me with the temp probes. Ocassionally ill get an 85c and it will alert me that the tank is running hot. Is there anyway to stop this 85c registering?
Well if i understood that link correctly then it is doubtfoul whether pretty much anyone at all here even has family A sensors so i don't know how helpful that byte is going to be, especially for a standard solution
I fought this issue for months. I highly recommend just buying quality sensors. Sparkfun is by far the best and my issues went away immediately after tossing the cheap ones
 
I just started using Reef-pi with Leviathan and i can’t get the dosing pumps to work on a timer. They run fine in calaibration mode but they won’t turn turn on when I set any of the Month, Day, Week, hr, min, sec....I have the P1FWD on. When I set all the values to * under dosing UI and turn on the P1FWD under Equipment it runs perfect...It’s when I put in any time value it does not run at specified time.

After you set up the pump did you restart reef-pi? I was having the same issue when I first set it up, but after a restart the timer started working.
 
I don't know if this has been recommended yet, and have been swamped the last few months, so haven't been following the threads.. but..

Can we add the ability for a macro step to be an email alert that the macro has completed.. I run a 2.5 hour water change macro.. and it's nice to be alerted at the end that it completed.. and maybe even once for the start.. I would like to add those in as steps. because I forget to restart it if I want to change more/check levels and new water available.
 
Yes, same for both...Calibration and under UI.
The name is Alk (1), take the space out and retry first: Alk(1).
The settings look fine! In the guide after the creation of the doser, the doser is in disabled state, then first calibrated then enable. Maybe it is the correct order, so delete your doser and just start again.
 
Last edited:
Dumb question, one of my units is the protoboard wired up, temp, lights, DJ power strip. I would like to add ATO and just want to use float switches vs the optical sensor that is in the write up guide. My newer build uses a @Michael Lane hat so its easy peasy. I think with the float switches I can just wire it up to a GPIO and wire it up, does there need to be any resistor for the circuit?

Thanks :)
 

TOP 10 Trending Threads

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 33 57.9%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 24 42.1%

New Posts

Back
Top
Home
Post thread…
Market
What's new