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

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Test it though, once you set things up,
Thanks for the quick reply @Ranjib - this was the first thing I did, was hoping it would magically work, but no luck. Any other ideas?

Edit: Also of note, I've also tried switching GPIO pins, just in case that one was reserved by the python script, and restarted with a clean DB. No changes with that either.
 
Last edited:

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
Tiny UI issue but super easy to overcome .

When in Dashboard configuration. the Browser (using chrome ) Will not let you see the bottom of the Dialog box to select dashboard item Just not sure anyone has seen this.. Its only a issue adding temp to bottom of dashboard i think dashboard configuration issue .png
 
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
Thanks for the quick reply @Ranjib - this was the first thing I did, was hoping it would magically work, but no luck. Any other ideas?

Edit: Also of note, I've also tried switching GPIO pins, just in case that one was reserved by the python script, and restarted with a clean DB. No changes with that either.
Is it possible to share your python script and circuit details ?
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Is it possible to share your python script and circuit details ?

The circuit is in heatshrink but if I remember correctly it's a just a 10k resistor splitting the ground wire.

Here's the main bit of the python script...

Code:
def my_callback(channel):
    if GPIO.input(8) == GPIO.HIGH:
        print('\n FLOAT at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('OK | Last flipped at ' + str(datetime.datetime.now())), file = log)
    else:
        print('\n SINK at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('Low | Last flipped at ' + str(datetime.datetime.now())), file = log)

GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(8, GPIO.BOTH, callback=my_callback)

It's run every few minutes via cron and the status is broadcast via mqtt to my home assistant server which can send out alerts & trigger the top off. I'd prefer getting it into reef-pi so I can trigger the top off directly.
 
Last edited:

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,165
Location
Winchester, TN
Rating - 0%
0   0   0
Hey @pickupman66 - did you ever get to play with this? I've been poking around and I *think* you could use the kessel pwm circuit (from the reef-pi build instructions) with an 3.5 audio cable jack or CAT-5 that is wired in to the Jebao controller input jack like this - https://www.reef2reef.com/threads/jebao-sw-4-to-apex.279528/

I've been planning on testing it out but haven't gotten around to it yet.
No. Soccer tournament (2) and swim meets have kept me so busy this month. It will work as it delivers the correct signaling. But what we are in need here is programming to have it fire alternate ports at intervals of seconds or less and at a % of max. Or to get a reef crest randomizer type that changes the speed. I know I could run them on a light program but I really like mine alternating every 7 seconds and a third just in and off every 2.

All that requires code that I don't know how to write so I am waiting until ranjib gets time in the next phase after 2.0 final.
 

ScottBrew

Active Member
View Badges
Joined
Oct 17, 2018
Messages
385
Reaction score
865
Location
Dunedin Florida
Rating - 0%
0   0   0
Tiny UI issue but super easy to overcome .

When in Dashboard configuration. the Browser (using chrome ) Will not let you see the bottom of the Dialog box to select dashboard item Just not sure anyone has seen this.. Its only a issue adding temp to bottom of dashboard i think dashboard configuration issue .png
Can you reduce your zoom from 100% to 50-60%? Ctrl-scroll or 3 dots in top right corner.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
Can you reduce your zoom from 100% to 50-60%? Ctrl-scroll or 3 dots in top right corner.
did not try that but everything scales the same up and down.. I mean the easy way around this (which is common for lots of software) Android bad about this kind of Bug..
Just add a extra row in the dashboard add the temp prob and then reduce the rows.. Its not something that is a issue but something that can be over come in ui . maybe making the dialog box scroll able. As more items are added to it such as ORP , Salinity prob and so on it will then be a issue. NOW ITS not
 

Soulreefer

Community Member
View Badges
Joined
Aug 16, 2018
Messages
44
Reaction score
67
Location
Jakarta, Indonesia
Rating - 0%
0   0   0
IMG_20181104_093215.jpg
Information please. My rasberry pi zero arrived today, I tried to test it to connect to 5v power, positive purple cable negative blue cable, but led power [which is circled in red does not turn on] I tried connecting to the monitor with HDMI. Monitor blank. Is this board error. Thank you
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
IMG_20181104_093215.jpg
Information please. My rasberry pi zero arrived today, I tried to test it to connect to 5v power, positive purple cable negative blue cable, but led power [which is circled in red does not turn on] I tried connecting to the monitor with HDMI. Monitor blank. Is this board error. Thank you
Does the light blink at all.. If not you might have a bad sd card or flash ..

I have had that to happen. otherwise its a bad board. there is NO BOOTLOADER on the board you will get absolutely nothing if the sd card is not readable. its rare but a bad board does happen.. also verify power supply is working with a multimeter
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
IMG_20181104_093215.jpg
Information please. My rasberry pi zero arrived today, I tried to test it to connect to 5v power, positive purple cable negative blue cable, but led power [which is circled in red does not turn on] I tried connecting to the monitor with HDMI. Monitor blank. Is this board error. Thank you
Apologies if this is insulting but did you er... plug it in? Like with the MicroUSB next to the power LED? The GPIO power and ground pins are outputs.
 
Last edited:

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
No. Soccer tournament (2) and swim meets have kept me so busy this month. It will work as it delivers the correct signaling. But what we are in need here is programming to have it fire alternate ports at intervals of seconds or less and at a % of max. Or to get a reef crest randomizer type that changes the speed. I know I could run them on a light program but I really like mine alternating every 7 seconds and a third just in and off every 2.

All that requires code that I don't know how to write so I am waiting until ranjib gets time in the next phase after 2.0 final.

You mean you don't bring your soldering iron to soccer tournaments? :)

Good point about the programming. I'm do my scripting commands via API post but my setup isn't self contained so it's not for everyone. Via reef-pi I thought it could just be a "light" with levels controlled by a macro on a timer, but I see now macros only have on / off options? Are there plans to expand the macros options to have some more freeform data input?
 
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
The circuit is in heatshrink but if I remember correctly it's a just a 10k resistor splitting the ground wire.

Here's the main bit of the python script...

Code:
def my_callback(channel):
    if GPIO.input(8) == GPIO.HIGH:
        print('\n FLOAT at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('OK | Last flipped at ' + str(datetime.datetime.now())), file = log)
    else:
        print('\n SINK at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('Low | Last flipped at ' + str(datetime.datetime.now())), file = log)

GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(8, GPIO.BOTH, callback=my_callback)

It's run every few minutes via cron and the status is broadcast via mqtt to my home assistant server which can send out alerts & trigger the top off. I'd prefer getting it into reef-pi so I can trigger the top off directly.
I don't see anything suspicious here. Things should work. Is is possible for you to check the log? Like, declare an inlet with GPIO 8 and associate it with an ATO, and set the check interval to 5 second (for example), and see what reef-pi says, when you put the float switch in and out of water
Code:
journalctl -fu reef-pi.service
 
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
No. Soccer tournament (2) and swim meets have kept me so busy this month. It will work as it delivers the correct signaling. But what we are in need here is programming to have it fire alternate ports at intervals of seconds or less and at a % of max. Or to get a reef crest randomizer type that changes the speed. I know I could run them on a light program but I really like mine alternating every 7 seconds and a third just in and off every 2.

All that requires code that I don't know how to write so I am waiting until ranjib gets time in the next phase after 2.0 final.
Yes, wavemaker is definitely a thing for 3.0 . Theres an existing issue on providing finer grain pwm (say 12bit) control as well. I have already mentioned there that we want to incremenet/decrement interval customizable as well. Together this two will allow us to generate any arbitrary pwm profile. I think we'll introduce a wave profile similar to light profile.
Even in 2.0 reef-pi will provide a jack control api , i.e. users can write a script to directly control the PWM values and generate pretty much anything. at that level (connectors), reef-pi does not really know its light or pump, user can do whatever they want.
 
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
Yes, wavemaker is definitely a thing for 3.0 . Theres an existing issue on providing finer grain pwm (say 12bit) control as well. I have already mentioned there that we want to incremenet/decrement interval customizable as well. Together this two will allow us to generate any arbitrary pwm profile. I think we'll introduce a wave profile similar to light profile.
Even in 2.0 reef-pi will provide a jack control api , i.e. users can write a script to directly control the PWM values and generate pretty much anything. at that level (connectors), reef-pi does not really know its light or pump, user can do whatever they want.
I have created an issue to track this: https://github.com/reef-pi/reef-pi/issues/631
 
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
did not try that but everything scales the same up and down.. I mean the easy way around this (which is common for lots of software) Android bad about this kind of Bug..
Just add a extra row in the dashboard add the temp prob and then reduce the rows.. Its not something that is a issue but something that can be over come in ui . maybe making the dialog box scroll able. As more items are added to it such as ORP , Salinity prob and so on it will then be a issue. NOW ITS not
That footer thing is probably a bad UX decision on our end. I had introduced it to ease troubleshooting, bug reporting etc. Having that information right in the screen shot help us to understand reef-pi version, errors etc (other than all the helps users get, like IP, time etc). But the way it works , is known to create these type of issues :-( , I didnt realize it in the beginning, but @Zekth had called this out. I am thinking, whether it's time revisit our decision and move the footer data to a separate place. In fact on mobile devices reef-pi shows this info under Configuration -> About section,
 
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
did not try that but everything scales the same up and down.. I mean the easy way around this (which is common for lots of software) Android bad about this kind of Bug..
Just add a extra row in the dashboard add the temp prob and then reduce the rows.. Its not something that is a issue but something that can be over come in ui . maybe making the dialog box scroll able. As more items are added to it such as ORP , Salinity prob and so on it will then be a issue. NOW ITS not
Yeah.. I have no clue how we'll deal with this in 3.0, with clustering, we can have many more charts.
 
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
IMG_20181104_093215.jpg
Information please. My rasberry pi zero arrived today, I tried to test it to connect to 5v power, positive purple cable negative blue cable, but led power [which is circled in red does not turn on] I tried connecting to the monitor with HDMI. Monitor blank. Is this board error. Thank you
Did you try to power it up with micro usb cable first? Your wiring looks ok. Check with multimeter that its indeed 5v on those two pins (the bottom side of Pi zero, has the male header pins bottom ends). If its brand new, i suspect the power is not going, or its bad. I have fired pi zero/pi three which resulted in this. I have also once screwed the green led, and ran pi where it will run but the led wont work, but in that case monitor/keyboard etc will work
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,253
Reaction score
3,603
Location
Sacramento, CA area
Rating - 0%
0   0   0
Apologies if this is insulting but did you er... plug it in? Like with the MicroUSB next to the power LED? The GPIO power and ground pins are outputs.

It’s worth testing with another supply or USB, but the Pi can be powered up from the 5V pins on the header.
 

TOP 10 Trending Threads

Back
Top