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

Bob Tiffany

Community Member
View Badges
Joined
Nov 4, 2015
Messages
33
Reaction score
17
Rating - 0%
0   0   0
Are you using a remote connection like Teamviewer? I was having a similar issue where my memory and CPU would skyrocket and it was because of Teamviewer.

I would also shut down the raspberry pi and restart it. Sometimes things get hung up for no apparent reason and a power on/of will clear the issue.

No, no TeamViewer or anything. I have shut down and reset a couple times lately, it’s always been the same and I’ve gotten those Adafruit IO errors since the day I setup the Adafruit IO feeds.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
645
Reaction score
1,034
Location
Durban - South Africa
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.
 

BenB

Community Member
View Badges
Joined
Jun 11, 2019
Messages
98
Reaction score
152
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.
On your router you can, most likely, set a DHCP reservation for the current ip adress that is assigned to your pi. See manual of your router how to get it aranged.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Just the latest version of Raspian. For errors I’m getting the occasional temp probe error that everyone else is getting, then I keep getting a bunch from Adafruit IO:

038A3FA1-4EDA-4785-9EA9-744814DF5B4F.png
This is related to either incompatible name of equipment/some other elements name in reef-pi (with space ) or too many data point being submitted to reef-pi. Adafruit is free account only allow 6 feeds
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi All.
I'm working on getting fail2ban up on my system. Does anyone know if reef-pi logs failed login attempts? If so, what log file would that be stored in?
reef-pi legs failed login attempt. It’s logged in stdout and available via standard journalctl -u reef-pi.service . Check how fail2ban integrates with journalctl. Keep me posted :)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
No, no TeamViewer or anything. I have shut down and reset a couple times lately, it’s always been the same and I’ve gotten those Adafruit IO errors since the day I setup the Adafruit IO feeds.
Can you run ‘ps aux’ and share the output. There must be something that’s eating your cpu, reef-pi alone should not be that intensive
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.
Your router is the one where you have to make dhcp reservation. I use google WiFi which allows this via their app.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.

If you set the pi to use predictable network interface names, you can setup static IP addresses in /etc/dhcpdc.conf

mine looks like this:


# Example static IP configuration:
interface wlan0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.

As @GaryE mentioned you can do this in the dhcpdc.conf file. Here's a little write up on it.

 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
Also I don’t see how this could be a percentage on the CPU because it regularly goes over 1.0, it’s at 1.6 at one point.

Yeah linux cpu monitor works a lot different from winblows stuff, it provides a number based on core utilization, if you have a multi core machine it can and will read over 100% based on load. I have an 8 core machine and if I am doing heavy cpu work my cpu percentage can read 440%, basically I am using 4 cores and and 40% of the fifth core. Right now it appears that you are using one and half cores and reaf-pi should only be using .2 or .3 (20-30%) of a single core.

From the console prompt you can also run top and it will show which processes are using the most resources, if you can capture that output and display here that will show us what is consuming the resources.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
Hey guys. So my router assigned a new IP address to reef-pi last night thinks to a power outage. I lnow, I know. DHCP etc etc.

I've been searching for a tutorial to follow on how to set up a Static IP so I don't go through this again. Does anyone know a reliable one for me to follow?

Edit - my reef-pi is on wifi if that makes a difference.

Hey @Des Westcott if you can give me the model of your router I will look it up and see if you can do DHCP reservations, willing to help just let me know.

:)
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,942
Reaction score
3,329
Location
Sacramento, CA area
Rating - 0%
0   0   0

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
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:

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
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
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
645
Reaction score
1,034
Location
Durban - South Africa
Rating - 0%
0   0   0
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
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
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?
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,493
Reaction score
1,484
Rating - 0%
0   0   0
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
 

waynel

Active Member
View Badges
Joined
May 22, 2020
Messages
264
Reaction score
266
Location
Kentucky
Rating - 0%
0   0   0
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?
 
Back
Top