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

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
1,034
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
1st Issue- I am only able to access the website from one computer. Its a PC wired into the router the Pi Zero W is connected to. I can SSH and get to the website using the IP Address but not the Host Name. Mine is Http://mixedreef.local. I cannot get to website off my phone or laptop connected to same Wifi as Reef-Pi. As my main PC is downstairs and my tank is upstairs not being able to access on my phone would be annoying lol.
Hit return on accident... give me a sec
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
1,034
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
1st Issue- I am only able to access the website from one computer. Its a PC wired into the router the Pi Zero W is connected to. I can SSH and get to the website using the IP Address but not the Host Name. Mine is Http://mixedreef.local. I cannot get to website off my phone or laptop connected to same Wifi as Reef-Pi. As my main PC is downstairs and my tank is upstairs not being able to access on my phone would be annoying lol.
Couple of things..
It is a networking issue. You can setup a localhost file on each computer easiest thing is just connect via he ip address... or setup your router to assign a fixed ip address to mixedreef and use the routers DNS not and external DNS

try accessing on other devices via ip
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
1,034
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
2nd Issue- Cannot connect to Reef-Pi through any computer, Website or SSH after about 24 hours. Must reset the Pi to access the website or SSH again. The Reef-Pi is still running as all the data is there upon reset.
Ip address is staying the same? or changing?... when this happens try a differnt browser that has not connected to reef-pi or delete the web cache and see if you can connect.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Good Morning All,

My T-ank been up and running for 8 months now and have been skulking on this forum for a couple months. Just started working on my Reef-Pi with a Robo-Tank Set up. Thanks @Ranjib for the awesome software, and thanks @robsworld78 for the hardware everything looks awesome and no issues. I got the main board as well as the Sensor and the Equipment extension boards. I decided to build my own relay controlled powerbar. Pic's attached for fun. I have proper terminal blocks on the way, the wire clips were for testing.

Everything is up and running on the test bench, but I'm running into two issues on the software/network side I'm hoping someone can point me in the right direction as i have never run a Pi as a "Server" before. I'm sure the issue is not with the Reef-Pi software, but could be wrong.

I have Reef-Pi up and running. I am able to connect to it from my main computer. Logs are logging and Temp/PH data is rolling in, I am also able to control the powerbar outlets. No other sensors set up yet as i want to fix my issues first.

1st Issue- I am only able to access the website from one computer. Its a PC wired into the router the Pi Zero W is connected to. I can SSH and get to the website using the IP Address but not the Host Name. Mine is Http://mixedreef.local. I cannot get to website off my phone or laptop connected to same Wifi as Reef-Pi. As my main PC is downstairs and my tank is upstairs not being able to access on my phone would be annoying lol.

2nd Issue- Cannot connect to Reef-Pi through any computer, Website or SSH after about 24 hours. Must reset the Pi to access the website or SSH again. The Reef-Pi is still running as all the data is there upon reset.

This is most likely my network issue. I have allowed the local IP address of the Pi and Port 22 for SSH on my router. Any help being pointed in the right direction would be very much appreciated. If i can provide more info please let me know.
.local addresses are technically an abuse of protocol and do not always work. Particularly depending on how DNS is setup.

Another thing, both with the .local address or the ip-adress, try both http:// and https:// when trying to access. Some browsers nowadays try to autocorrect to Https

Third possibility: the pi zero might loose WiFi connection for one reason or another (for example the forced disconnect or reset every 24h that some routers do) and not automatically reconnect, forcing you to reset it to make it reconnect. Look in your router dashboard of that's what's happening
 

Brett7397

Community Member
View Badges
Joined
Oct 17, 2022
Messages
74
Reaction score
46
Location
Dothan, AL
Rating - 100%
1   0   0
hey guys, I'm finally getting around to building this and I'm following the guides on adafruit.com. There's a few parts that are no longer available. One being the DB9 male adapters here:
.
Is this a good alternative?
Additionally the LM2596 Buck converter link is broken but this is the only one I can find that specifies 12v to 5v: .
Is this a good alternative?
Additionally the LM2596 Buck converter link is broken but this is the only one I can find that specifies 12v to 5v:
I got my parts at www.digikey.com
 

IronRising

New Member
View Badges
Joined
Jan 8, 2024
Messages
8
Reaction score
10
Location
Edmonton
Rating - 0%
0   0   0
Thanks @elysics and @ColoredRock.

Got busy at work yesterday afternoon and did not have a chance to respond.

I had set up my Reef-Pi to send Data every 10 min i might shorten that to ensure constant connection.

I have tried both fixed and dynamic IP's on the router, also tried the Local host name and the IP address on other devices and tried adding the "s" at the end of HTTP Still only able to access from my main windows PC using the IP address.

I will try setting up a localhost file later tonight. I also read that windows implementation of mDNS is garbage and to install the apple version to help the local host name connection. https://www.howtogeek.com/167190/how-and-why-to-assign-the-.local-domain-to-your-raspberry-pi/

As for the Rasp-Pi disconnecting i do show it still connected to the router after the 24 hour "disconnect" but not able to SSH or log into webpage. Checked this morning, Still showing on Wifi on router settings. Not able to SSH or login. Reset Pi and able to SSH/Log in and all Temp/Ph data is there. I currently have my Reef-Pi set up to send temp and PH data every 10 min but i might lower that to 1-5 min to see if it continues to disconnect.

The biggest issue is the disconnection. I can put up with only having access through 1 computer as i could Chrome remote desktop into if needed. But not being able to control outlets/ATO as needed is not ideal.

I'll update after i have time to try some of the fixes recommended.

Thanks guys,
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Hi All! I'm trying to setup a macro which turn off my main ATO when it detects that there's no water in the refill tank.
I've setup 2 ATO:
- Sump level check -> controls ATO pump
- ATO tank check -> controls a macro that turn on or off the Sump Level Check ATO

When I try to run a system like that the ATO freezes up and they don't do anything... I can't even turn on or off the ATO with the switches... What can it be?
Thank you!

Screenshot 2024-01-09 230925.jpg Screenshot 2024-01-09 230954.jpg
 

IronRising

New Member
View Badges
Joined
Jan 8, 2024
Messages
8
Reaction score
10
Location
Edmonton
Rating - 0%
0   0   0
is your wifi and static on different vlans? do the ip address range match.. i.e. 192.168.1.* from hardwired to wireless? or are they segregated like a guest network? Like hardwired is 192.168.1.* and wireless is 192.168.2.*
They do match, Wired and Wireless are both on 192.168.0.***. Life got in they way again and was not able to try any fixes last night.

Kinda why i want the Reef-Pi to help with automation. So when life happens my tank does not suffer. Setting up a full Remote ATO and Waterchange system as well.
 

IronRising

New Member
View Badges
Joined
Jan 8, 2024
Messages
8
Reaction score
10
Location
Edmonton
Rating - 0%
0   0   0
They do match, Wired and Wireless are both on 192.168.0.***. Life got in they way again and was not able to try any fixes last night.

Kinda why i want the Reef-Pi to help with automation. So when life happens my tank does not suffer. Setting up a full Remote ATO and Waterchange system as well.
Pulled my Wifi logs off the Pi, found a couple sections like the below i starred out any data that could be sensitive even if it is just local info . The static IP is leased for 7 days so it should not be dropping.


This is the disconnect-
Jan 09 12:39:40 Mixedreef avahi-daemon[236]: Failed to parse address 'fe80::e0e:76ff:fed4:f126%wlan0', ignoring.
Jan 09 13:09:30 Mixedreef dhcpcd[567]: wlan0: fe80::e0e:76ff:fed4:f126: router expired
Jan 09 13:09:30 Mixedreef dhcpcd[567]: wlan0: part of Router Advertisement expired
Jan 09 13:09:30 Mixedreef dhcpcd[567]: wlan0: deleting default route via fe80::e0e:76ff:fed4:f126
Jan 09 13:19:30 Mixedreef dhcpcd[567]: wlan0: part of Router Advertisement expired

Looks like my RA is causing the disconnection issues.

This is the next set of logs after i reboot.

Jan 10 06:17:30 Mixedreef dhcpcd[480]: wlan0: starting wpa_supplicant
Jan 10 06:17:30 Mixedreef dhcpcd-run-hooks[488]: wlan0: starting wpa_supplicant
Jan 10 06:17:31 Mixedreef dhcpcd[254]: wlan0: connected to Access Point `'
Jan 10 06:17:31 Mixedreef dhcpcd[254]: wlan0: waiting for carrier
Jan 10 06:17:36 Mixedreef kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jan 10 06:17:36 Mixedreef dhcpcd[254]: wlan0: carrier acquired
Jan 10 06:17:36 Mixedreef dhcpcd[254]: wlan0: connected to Access Point `Home'
Jan 10 06:17:36 Mixedreef dhcpcd[254]: wlan0: IAID ****
Jan 10 06:17:36 Mixedreef dhcpcd[254]: wlan0: adding address ****
Jan 10 06:17:36 Mixedreef avahi-daemon[238]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::7362:fc4f:1988:4c69.
Jan 10 06:17:36 Mixedreef avahi-daemon[238]: New relevant interface wlan0.IPv6 for mDNS.
Jan 10 06:17:36 Mixedreef avahi-daemon[238]: Registering new address record for ***** on wlan0.*.
Jan 10 06:17:37 Mixedreef dhcpcd[254]: wlan0: soliciting an IPv6 router
Jan 10 06:17:37 Mixedreef dhcpcd[254]: wlan0: rebinding lease of 192.168.0.197
Jan 10 06:17:37 Mixedreef dhcpcd[254]: wlan0: probing address 192.168.0.197/****
Jan 10 06:17:42 Mixedreef dhcpcd[254]: wlan0: leased 192.168.0.197 for 604800 seconds
 

IronRising

New Member
View Badges
Joined
Jan 8, 2024
Messages
8
Reaction score
10
Location
Edmonton
Rating - 0%
0   0   0
I also added a cronjob to ping the router twice every 5 min to try and keep it active. Will see what happens. will update tomorrow, as it seems to disconnect around midnight based on logs.
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
1,034
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0

IronRising

New Member
View Badges
Joined
Jan 8, 2024
Messages
8
Reaction score
10
Location
Edmonton
Rating - 0%
0   0   0
Thanks guys, I had done most of what's on the Pi Hut list, but I just disabled my 5GHz band. It was named something else but couldn't hurt.

I also had my WIFI channel set to auto but changed to channel six. I updated the Raspbian watchdog to look out for internet drop outs and restart wlan0 if it detects nothing for 5 min. Hopefully these combos help without taking up to much CPU on the PI Zero.

Hopefully tomorrow morning the Pi is still on the network.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Hi All! I'm trying to setup a macro which turn off my main ATO when it detects that there's no water in the refill tank.
I've setup 2 ATO:
- Sump level check -> controls ATO pump
- ATO tank check -> controls a macro that turn on or off the Sump Level Check ATO

When I try to run a system like that the ATO freezes up and they don't do anything... I can't even turn on or off the ATO with the switches... What can it be?
Thank you!

Screenshot 2024-01-09 230925.jpg Screenshot 2024-01-09 230954.jpg
Somehow the macro gets triggered not just ones but all the time, so it gets in a loop, therefor it freezes. In the ato there is a field `one shot` that has been made for this situation. Maybe you will have to restart to make it work.
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Somehow the macro gets triggered not just ones but all the time, so it gets in a loop, therefor it freezes. In the ato there is a field `one shot` that has been made for this situation. Maybe you will have to restart to make it work.
Thank you! I'll give it a try! One shot mean that even if I set the macro as reversible I have to re-enable the ATO manually after the macro run right?

Edit: even if I set to one shot it doesn't work. Controller freeze...
 
Last edited:

Cpc83

Active Member
View Badges
Joined
Jun 9, 2021
Messages
176
Reaction score
196
Location
Willis
Rating - 50%
0   1   1
New to this not to the automation side of things though. I'm thinking of ditching my apex to go reefpi.

Can I monitor ph,temp, salinity and orp with reefpi?

Will reefpi test alk with a ph probe and dosing pumps like a hydros will?

What can I control as far as pumps and lights? Will it send 0-10v signals ?
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Thank you! I'll give it a try! One shot mean that even if I set the macro as reversible I have to re-enable the ATO manually after the macro run right?

Edit: even if I set to one shot it doesn't work. Controller freeze...
Interesting, when I use an ATO to trigger a macro that triggers 2 types of equipment it works. Only you need to reset manually. And if I add an ATO in the macro and trigger the first ato, it freezes... Just like you experience. It can be a bug...
In an ATO you can not select an other ATO to controll either, only equipment, it looks like it is not setup for it. Maybe it can be added.
 

tedfisher496

Active Member
View Badges
Joined
Aug 29, 2023
Messages
264
Reaction score
120
Location
Belle Vernon
Rating - 0%
0   0   0
Part 2: Building the housing

reef-pi controller housings that I have built till now, is intended to provide an enclosure for the electronics, electrical outlets/inlets and a display for dashboards. I am really a novice at wood work, but this is the best I could think of during the first build..

First, calculate the minimum required dimension of housing. For my very first build, it was almost 1foot wide, 6" height, and 3" thick. I wanted ample place to play with different adapters & circuits inside. It was also due to 6 home electrical sockets, bolted in the bottom of the housing. Once you have the dimension sorted (you can go for much smaller housing if choose relay with less channel/ less electrical socket, as well as no display (they are 7" wide), cut the main sides. I choose to keep AC 100V outlets on bottom, BNC and 3.5 mm female connector mounted on right-bottom side. Couple of peristaltic pumps mounted on right-top side. Left side of the housing only has through hole, to pass the main AC input power supply. The front panel has only LCD screen mounted.
All of the electrical sockets are screwed in straight on the plywood. BNC connector and 3.5 mm female audio is mounted directly, they have groves already, I used a tap/drill tool to create the holes.
I used dremel rotary tool (3000) to cut out the spaces necessary to fit electrical outlets on the bottom, and peristaltic pumps on the right side.
Raspberry pi and pca9685 board is screwed on the back side of the front panel, with stand-offs in between. I have a small breadboard which holds the MCP3008 & L293D ICs, which is hot glued straight next to the pca9645 board. Couple of DC power adapters (5V for pi, and 10V for LED light) are directly screwed in (or ziptied) inside the housing.
Here are some reference images.
Front view of the housing.
20170215_203047.jpg

Electrical sockets in the bottom (6 of them)
20170215_203136.jpg

These sockets come in pairs, with hot & neutral ends connected in every pair. I break the hot end junction so that each socket can be controlled independently (I am pretty sure there is an elegant solution for this).
Wiring electrical sockets:
20170215_203131.jpg

Peristaltic pumps & 3.5mm female audio jack on right side of the controller
20170215_203154.jpg


Electronics, inside a fully functional reef-pi controller
20170215_203125.jpg

Notice the two DC power adapters, one one top left corner, another right next to the peristaltic pumps (right side).

Tools:
- Soldering iron
- Dremel saw and rotary tool (you can use anything you prefer to work with wood)
- Plyer
- Hot glue gun,
- Tap/drill set (to fix BNC connector, 3.5 mm female audio jacks)
20170212_201748.jpg


Bill of Materials
- Plywood
- standoffs
- 3.5 mm female audio jacks
- Female BNC connectors
- AC 110V Electrical sockets
- 14 gauge wires (green, black, white ) for AC 110V electrical sockets
- 16/18 gauge wires for DC 5v, 10v PWM (LED control, DC pump control)
- 20 gauge wires to connect sensors with MCP2008 (BNC connectors based sensors)
Is it possible to monitor current of each receptacle?
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Interesting, when I use an ATO to trigger a macro that triggers 2 types of equipment it works. Only you need to reset manually. And if I add an ATO in the macro and trigger the first ato, it freezes... Just like you experience. It can be a bug...
In an ATO you can not select an other ATO to controll either, only equipment, it looks like it is not setup for it. Maybe it can be added.
Thank you Ben for tour feedback. I'm also thinking about a bug. I know I can't control an ATO directly from another ATO. I was thinking I can do that with a macro.
It's the combination ATO which controls a macro which set an ATO ON or OFF that freeze the controller, if I control any equipment everything works just fine.
Maybe we can ask to @Ranjib if it's a bug or it's suppose to work like that..
Thank you!
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • 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