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

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
41
Location
Georgia
Rating - 0%
0   0   0
Got it. Thank you so much for reporting this. I’ll get it fixed. Much appreciated
Ranjib

Thanks for all your efforts. Most of what I use is working just fine all the time. I can even graph all lights on same graph now INCLUDING LUNAR!

Not sure how you approach lunar on and off times but it seems that the moon on/off time pretty much stays at the time you put in lunar start/end time. At least it seems that way for me. I look at the moon rise time and it hasn't changed from the start time in over a week. So I change the full moon schedule every month.

I had a DIY controller I made and I modified some online code I found and created a function to calculate the actual luminance, rise and set times using Lat and Long of your location. It would be likely not possible without a lot of work on your part to incorporate this C++ code (I did find some Python code once though online if interested).

However, I learned a couple of things to easily incorporate for a simple moon rise/set:

1. The moon averages 12 hours up and 12 hours down throughout its 29.5 day cycle. It gets complicated if you
you try to change from 8 hours to 16 hours and then back to 8 hours over the 29.5 day cycle, but it is not too
difficult.
2. Moon rises 53 minute cycle later every day. So just changing the rise and set times emulates the moon more
accurately.
3. Luminance just goes from 0% to 100% then back to 0% every 29.5 days.

I broke it all down to minutes to even more accurately estimate the cycle times (the 29.5 and 53 are rounded).

If you want to more accurately emulate the moon rise and set times you may consider this. This helps spawning for some sea creatures.

Keep up the good work!

PS I'm watching the esp32 thread that seems very interesting to me.
 

geekengineer

Active Member
View Badges
Joined
Feb 10, 2019
Messages
427
Reaction score
528
Location
South Aurora
Rating - 0%
0   0   0
Is that the robo-tank controller? or something different? I guess I thought that was his but now that I think about it I wonder if he had different things.

EDIT: I found his selling site. Looks like he hasn't been on since Jan and said something about moving out of state and bringing down his tank.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is Michael Lane still around? I see all of his boards are out of stock.
He is not active for long In this forum. i hope things are ok for him and his family
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is that the robo-tank controller? or something different? I guess I thought that was his but now that I think about it I wonder if he had different things.
No Michael had a few different pcb boards, and not any full controller , like Robo tank.
 

weilerda

New Member
View Badges
Joined
Aug 17, 2021
Messages
4
Reaction score
2
Location
missouri
Rating - 0%
0   0   0
Yeah you'll need to add a stepper motor driver, the drv8825 is what's been tested so far. This will require 5 GPIO's, on the main controller if you have a DB9 connector not being used you can get 5 GPIO's from it. Here's a link to a guide showing how to connect the stepper motor to the GPIO's, instead of connecting directly to the Pi header you go the DB9 as those are direct.


Here's a link showing the pinouts of the DB9's on the controller and a table at the bottom of the page showing which GPIO number they are.


In reef-pi you setup those GPIO's as an "outlet connector", if you ran my install script they'll already be set like that so you can go directly to the doser tab and add it.
Thank you @robsworld78. You’ve pointed me in the right direction.
 

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
50
Location
germany
Rating - 0%
0   0   0
I am a bit late to the discussion but i had the exact same issue. "Nous A1T "sockets from Amazon are cheaper than HS110, run on Tasmota, have power measurement and statistics etc, can have simple programming running on them as a backup if reefpi fails, and most importantly are barely bigger than a full sized grounded plug so you can put a bunch of them in a normal power bar next to each other. (Has to be A1T, not A1, and not from other brands that look exactly the same either, most of those can't run Tasmota anymore sadly, but the A1T do and already have Tasmota on them, not the chinese cloud software)

if money isn't as much of an object you can get Shelly S, which can also run on Tasmota and are higher quality, but also almost double the price.

There's a sad lack of individually controllable powerbars with power measurement and enough slots in Germany that aren't GHL or even more expensive. The most there is are ones with 3 or 4 sockets, and those are more expensive than getting the individual plugs.
so now I got the nuos a1t yesterday now would you please help me to set them up?
I would be very grateful.
and I have switched sockets from energie EG-PMS in USB and Lan but are not supported in reef-pi. just like the radio module, the receiver sockets can be coded. so theoretically 154 connect. I use them in the pond software that runs on the raspberry.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
so now I got the nuos a1t yesterday now would you please help me to set them up?
I would be very grateful.
and I have switched sockets from energie EG-PMS in USB and Lan but are not supported in reef-pi. just like the radio module, the receiver sockets can be coded. so theoretically 154 connect. I use them in the pond software that runs on the raspberry.
I had EG-PM2 running in reefpi via usb, the filedriver, and a scheduled script that called "sispmctl", but the relays in mine stopped working after a while. I can try to dig up that script if you want. Had a delay between pulling the switch in reefpi and the outlet actually switching off though, because of polling.

for the A1T, plug them in, connect to them via wifi and set them up, then figure out what local ip address they have, if you know how to, give them a fixed IP address, and then in reef-pi, add a "tasmota-http" driver per socket with the corresponding ip address. Then outlets from those drivers in the connectors menu.

In the console menu of the plug itself you can do custom programming of the plugs behaviour in addition to the commands it gets from outside, look up the Commands section in the Tasmota Documentation if you want to do that.
 

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
50
Location
germany
Rating - 0%
0   0   0
I had EG-PM2 running in reefpi via usb, the filedriver, and a scheduled script that called "sispmctl", but the relays in mine stopped working after a while. I can try to dig up that script if you want. Had a delay between pulling the switch in reefpi and the outlet actually switching off though, because of polling.

for the A1T, plug them in, connect to them via wifi and set them up, then figure out what local ip address they have, if you know how to, give them a fixed IP address, and then in reef-pi, add a "tasmota-http" driver per socket with the corresponding ip address. Then outlets from those drivers in the connectors menu.

In the console menu of the plug itself you can do custom programming of the plugs behaviour in addition to the commands it gets from outside, look up the Commands section in the Tasmota Documentation if you want to do that.
thank you for your help driver for the connector strip sounds good, I would test it and you mean the a1t di ip that the router assigns. I'm a beginner and I'm 57 years old. I'm glad if I can still catch up hi. set that in reef-pi in the driver I can still get it but then?
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
thank you for your help driver for the connector strip sounds good, I would test it and you mean the a1t di ip that the router assigns. I'm a beginner and I'm 57 years old. I'm glad if I can still catch up hi. set that in reef-pi in the driver I can still get it but then?
Yeah, if you got the A1T connected to your router and know their IPs, put those ip adresses in your browser instead of a url, that should get you to their internal menu. Check that they are working.

Then in reefpi, you first need to set up a driver, then a connector, then equipment.

First, in reefpi-->configuration-->drivers add a tasmota-http driver per plug with their respective ip-addresses.
Then, in reefpi-->configuration-->connectors-->Outlets add an outlet for each driver you just created, for pin just use 0.
Then in reefpi-->equipment add a piece of equipment for each outlet you just created.

Then you should get an on off switch per socket.


For the energeenie/silvershield/gembirds you first google "sispmctl" and install it on your pi from sourceforge
then create the following file "script.sh" in /home/pi/outlets/ on your pi
(or whatever your home directory on your pi is instead of /home/pi)

Code:
outD1=$(cat /home/pi/outlets/outD1)
outD2=$(cat /home/pi/outlets/outD2)
outD3=$(cat /home/pi/outlets/outD3)
outD4=$(cat /home/pi/outlets/outD4)

if [ "$outD1" = 1 ]
then
    sispmctl -o 1
else
    sispmctl -f 1
fi

if [ "$outD2" = 1 ]
then
    sispmctl -o 2
else
    sispmctl -f 2
fi

if [ "$outD3" = 1 ]
then
    sispmctl -o 3
else
    sispmctl -f 3
fi

if [ "$outD4" = 1 ]
then
    sispmctl -o 4
else
    sispmctl -f 4
fi

(not the most elegant code, but its simple and works)

then create four filedrivers in reefpi with the /home/pi/outlets/outD1 , outD2, outD3, outD4 files, and again connectors and equipment after that

then type crontab -e in the console of the pi and add the following line at the end and save:

Code:
* * * * * /bin/bash -c ' for i in {1..6}; do /home/pi/outlets/script.sh ; sleep 10; done'


This will run that script every 10 seconds, which is fine on a pi zero w. You can run it more often, then there'll be less delay when switching, but that might bog down the pi, probably not an issue if youve got one of the better ones though.

If youve got more than one of those powerbars, you could make more complicated sispmctl commands as listed on the sourceforge page and run multiple at the same time.
 

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
50
Location
germany
Rating - 0%
0   0   0
Yeah, if you got the A1T connected to your router and know their IPs, put those ip adresses in your browser instead of a url, that should get you to their internal menu. Check that they are working.

Then in reefpi, you first need to set up a driver, then a connector, then equipment.

First, in reefpi-->configuration-->drivers add a tasmota-http driver per plug with their respective ip-addresses.
Then, in reefpi-->configuration-->connectors-->Outlets add an outlet for each driver you just created, for pin just use 0.
Then in reefpi-->equipment add a piece of equipment for each outlet you just created.

Then you should get an on off switch per socket.


For the energeenie/silvershield/gembirds you first google "sispmctl" and install it on your pi from sourceforge
then create the following file "script.sh" in /home/pi/outlets/ on your pi
(or whatever your home directory on your pi is instead of /home/pi)

Code:
outD1=$(cat /home/pi/outlets/outD1)
outD2=$(cat /home/pi/outlets/outD2)
outD3=$(cat /home/pi/outlets/outD3)
outD4=$(cat /home/pi/outlets/outD4)

if [ "$outD1" = 1 ]
then
    sispmctl -o 1
else
    sispmctl -f 1
fi

if [ "$outD2" = 1 ]
then
    sispmctl -o 2
else
    sispmctl -f 2
fi

if [ "$outD3" = 1 ]
then
    sispmctl -o 3
else
    sispmctl -f 3
fi

if [ "$outD4" = 1 ]
then
    sispmctl -o 4
else
    sispmctl -f 4
fi

(not the most elegant code, but its simple and works)

then create four filedrivers in reefpi with the /home/pi/outlets/outD1 , outD2, outD3, outD4 files, and again connectors and equipment after that

then type crontab -e in the console of the pi and add the following line at the end and save:

Code:
* * * * * /bin/bash -c ' for i in {1..6}; do /home/pi/outlets/script.sh ; sleep 10; done'


This will run that script every 10 seconds, which is fine on a pi zero w. You can run it more often, then there'll be less delay when switching, but that might bog down the pi, probably not an issue if youve got one of the better ones though.

If youve got more than one of those powerbars, you could make more complicated sispmctl commands as listed on the sourceforge page and run multiple at the same time.
Thanks for the quick help, I'll try it out one day and report back if it worked.
 

nejohnson

New Member
View Badges
Joined
Feb 26, 2021
Messages
8
Reaction score
15
Location
Delaware, Ohio
Rating - 0%
0   0   0
Updated to 5.3 from 5.1 this morning, after the update, my ph is oscillating between proper value and 0. I've removed the ph entry and the driver, rebooted, and re-added, no change. Ph circuit was fairly reliable before the update. Any tips? Running on Robotank with the ph-ezo driver.

ph1.jpg
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Updated to 5.3 from 5.1 this morning, after the update, my ph is oscillating between proper value and 0. I've removed the ph entry and the driver, rebooted, and re-added, no change. Ph circuit was fairly reliable before the update. Any tips? Running on Robotank with the ph-ezo driver.

ph1.jpg
Yeah that's new behavior with 5.3

It means that on 5.1 you had a bunch of missing data points that just vanished for various reasons, like for example intermittent interference and data corruption on the i2c line or somewhere else

If you had looked at the oh calibration menu at the time you would have seen some sort of error message popping up in the corner.
On 5.3 they no longer vanish or show as errors in calibration, but show as 0

Go into calibration menu and see if a 0 pops up from time to time, if so, wiggle your cables and see if you get it to stop

Otherwise, maybe start turning off stuff that has power lines in the vicinity and see if it stops

Also maybe turn down the rate of how often a value is requested, see if that helps
 
Last edited:

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
50
Location
germany
Rating - 0%
0   0   0
hi elysics so I registered the nous a1t and set it up in reef-pi. Thanks a lot for this. I assume that the a1t are only for switching and cannot use the power consumed in the ree-pi?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yeah that's new behavior with 5.3

It means that on 5.1 you had a bunch of missing data points that just vanished for various reasons, like for example intermittent interference and data corruption on the i2c line or somewhere else

If you had looked at the oh calibration menu at the time you would have seen some sort of error message popping up in the corner.
On 5.3 they no longer vanish or show as errors in calibration, but show as 0

Go into calibration menu and see if a 0 pops up from time to time, if so, wiggle your cables and see if you get it to stop

Otherwise, maybe start turning off stuff that has power lines in the vicinity and see if it stops

Also maybe turn down the rate of how often a value is requested, see if that helps
ah.. we can address that easily, i think. there might be an graph option (connected dot for missing values)
 

Dan-

New Member
View Badges
Joined
Oct 17, 2022
Messages
3
Reaction score
3
Location
Metro West
Rating - 0%
0   0   0
Hello Everyone
I hope I have the correct thread to ask this question. I'm trying to add a stepper motor dose pump to reef-pi. I have the motor working on another pi with a DRS8825. Problem is whenever I try to add the motor to the Dosers section I get an error " The settings cannot be saved due to violation errors. Please correct the errors and try again.null" .
Has anyone else run into this? Any direction would be appreciated.
 

Attachments

  • Reef-pi stepper error.PNG
    Reef-pi stepper error.PNG
    99.5 KB · Views: 74

JachPot

Active Member
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
601
Location
Colorado
Rating - 0%
0   0   0
Oh man, I'm running into an error and I'm not really sure where to gather the correct log.

I've got: https://www.robo-tank.ca/Sensors/Non-Contact-Liquid-Level-Water-Sensor-KXC-Y25-V-Arduino
as my sensor

my float switch:https://www.robo-tank.ca/Sensors/Reversible-Float-Switch

I turn on the ATO setup and turn it to the sensor. I have a DC 12v compatible pump from Amazon someone recommended to me here added to my equipment.


If I start the pi with all of those 3 things plugged in, it won't give me a web gui, it says it's connected to the wifi, but it seems to hang. If I unplug the sensor/motor it allows me to boot as normal. Leaving me without an ATO though.
 
Last edited:

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
Updated to 5.3 from 5.1 this morning, after the update, my ph is oscillating between proper value and 0. I've removed the ph entry and the driver, rebooted, and re-added, no change. Ph circuit was fairly reliable before the update. Any tips? Running on Robotank with the ph-ezo driver.

ph1.jpg

There was a change made in reef-pi in v5.3, that's why you're getting this data. As @elysics mentioned it's from corrupt data over the I2C bus when reef-pi tries to read the pH circuit. My circuit requires I2C clock stretching but the Pi doesn't directly support that so the fix is to slow down the I2C bus a little so clock stretching isn't required, I'm guessing that's the problem.

To fix run the following command to edit the config.txt file.

sudo nano /boot/config.txt

That should have opened up a file. Using the arrow key on your keyboard go down until you see the following line.

dtparam=i2c_arm=on

Under that line type the following line.

dtparam=i2c_arm_baudrate=10000

Then press CTRL + S on the keyboard to save.

Then press CTRL + Z to exit.

Now type in the following command to reboot the Pi, after that it should be fixed going forward.

sudo reboot

@Ranjib something was changed in 5.3, prior to that it seems if an error occurred with an I2C reading it was possibly ignored, at least at the chart level. The first time I came across this I thought it was good as it indicates a problem however it possibly could be a problem if someone is controlling something based on the I2C device. I'm wondering if that happens would it set off an action based on an obvious false reading? I can only speak for my controller but when the I2C speed is set correctly that never seems to happen however with I2C that's always a possibility with any system especially in noisy environments. Not sure if you know what was updated to cause the new results, any chance something was catching I2C errors prior that's no longer doing so?
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
Oh man, I'm running into an error and I'm not really sure where to gather the correct log.

I've got: https://www.robo-tank.ca/Sensors/Non-Contact-Liquid-Level-Water-Sensor-KXC-Y25-V-Arduino
as my sensor

my float switch:https://www.robo-tank.ca/Sensors/Reversible-Float-Switch

I turn on the ATO setup and turn it to the sensor. I have a DC 12v compatible pump from Amazon someone recommended to me here added to my equipment.


If I start the pi with all of those 3 things plugged in, it won't give me a web gui, it says it's connected to the wifi, but it seems to hang. If I unplug the sensor/motor it allows me to boot as normal. Leaving me without an ATO though.
That's different, almost sounds like something is shorting out, if that happens the controller shuts down, does the power go out on it or just no wifi? Have you tried different combinations of those 3 items being plugged in to see if it's one of them? Do you have the non-contact sensor plugged in the correct port, it would be the one just above the green universal connector.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hello Everyone
I hope I have the correct thread to ask this question. I'm trying to add a stepper motor dose pump to reef-pi. I have the motor working on another pi with a DRS8825. Problem is whenever I try to add the motor to the Dosers section I get an error " The settings cannot be saved due to violation errors. Please correct the errors and try again.null" .
Has anyone else run into this? Any direction would be appreciated.
That's likely due to an interface bug when it validates the data entered. Before you setup the stepper motor change the motor type option to "DC" and fill out the form as if you were going to use it. Then switch to "stepper" motor and after filling out it should save correctly and use the stepper settings.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Back
Top