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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Awesome! I’ve got a couple of Jebao’s that I can modify to control via 0-5v, so hardware is easy enough.

If you can give some pointers to the API on the crescent/alternating patterns I should be good to take a crack at it.

Also happy to help out with docs or anything you want to point me at.

Thanks again! This is a great project, super impressed on both where it is today and what the future holds. Really appreciate your efforts on it :)
Thank you for the kind words. It means a lot to us.
On how to use the API to change lights profiles:
- Learn how to use the API using curl command: https://reef-pi.github.io/guides/troubleshooting/
- List your lights, to get the ID of the specific light you want to update `curl -b cookie.txt http://<reef-pi-ip>/api/lights`.
- Save an existing light(with id 1) in son file: `curl -b cookie.txt http://<reef-pi-ip>/api/lights/1 > light_1.json`
- Edit the file, update profile with the one you prefer. Provide profile specific details in the config section under profile. Here is an example of random profile:
Code:
{
  "id": "1",
  "name": "Test",
  "channels": {
    "0": {
      "name": "Channel-1",
      "on": true,
      "min": 0,
      "max": 100,
      "pin": 0,
      "color": "#6f6faf",
      "manual": false,
      "value": 0,
      "profile": {
        "type": "random",
        "config": {
          "start": "00:00:00",
          "end": "23:59:59"
        },
        "min": 0,
        "max": 100
      }
    }
  },
  "jack": "1",
  "enable": true
}
- Upload the updated light spec: `curl -b cookie.txt -X POST -d @l.json http://192.168.86.166/api/lights/1`
Thats it.
Now, regarding what profiles are available and their specific configuration (details here). You can get example configuration in individual profile specific test file in that link.
- Example: Auto: The original 2.0 style setup. Where intensity is specified at 2 hour interval. e.g. 12 set points are provided. config
- All profiles have a min max value that is used to decide the range of values profile can generate. When not defined 0 and 100 used.
- Threres diurnal, sine and random profile that simulates specific daily pwm patterns
- Lunar profile does a concave intensity curve with amplitude varying across different days of the months (foolmoon and new moon)
- Composite profile take a list of sub-profile and iterates over them. Use composite profiles made of different random profiles with varying min/max intensity to simulate reef crest like effect. Use composite profile made with diurnal profile of differnet min/max values to simulate tidal waves.
Currently there's no charting available to visualize the effect, its only evident via graphana/adafruit. This makes it hard to experiment. I am working on to fix that (better charting support for light profiles)
 

Bliff

New Member
View Badges
Joined
Apr 6, 2020
Messages
18
Reaction score
41
Rating - 0%
0   0   0
I'm arggh

I'm getting dropouts from the DS18B20 probe. It didn't do this while I had it on a breadboard, measuring temps over at least 3 days of operation, but now it's dropping out after several hours and reef-pi isn't seeing it. This is also messing up my graph because of the zero readings and occasionally bizarre temps like -1536°C throwing the scale out.

If I power-cycle the pi (sudo shutdown, power cycle) the temp probe reappears like nothing had ever happend, and reef-pi can do it's thing as usual.
I'm using the 3v3 line and the same rating 4.7k resistor as a pullup between 3v3 and data for the probe. I doubt that I have a dodgy connection, given the screw-together cable that the temp probe is using, and the solder joint of the resistor between the VCC and data leads of the probe seems to be good.

Naturally I'll be rechecking this in the near future, and I'll post an update.

Has anyone else had this same issue? I am expecting another probe in the future, so that'll be something to swap out for testing as well. The info on the DS18B20 says that it can take either 5V or 3.3V, so another option is to connect it to 5V - would I use the same value resistor or need something higher?

------------------------- Issue 2 -------------------------

That's on top of the pi frequently ghosting out on the network connection, which is another conundrum.

This is what happens:
The pi is visible to the router, it appears to be maintaining DHCP with a relatively short lease (for now). I have power saving mode turned off on the pi, so the wifi chip stays awake. The pi won't respond to pings, not even when I ssh in to the router and ping it from the router itself. Meanwhile, the pi seems to be merrily doing it's timer related tasks, turning on/off the relays as it's supposed to. It's like it just forgets to respond over the network.
If I save settings on the router's wifi page, this forces the wifi to restart (kicks off all the devices, and in a few moments they all reconnect). Usually this is enough to make the pi respond again.
Is this just a wifi quirk? (signal strength is 90+% via DD-WRT info). It doesn;t seem to happen on my 3B+ that is wired through ethernet.
Rebooting the pi also fixes this.
My next idea is to crontab pinging the router every 15 minutes and see if that keeps the wifi alive.
 

Kurtzisa

Community Member
View Badges
Joined
Mar 21, 2020
Messages
79
Reaction score
70
Location
Parma, Italy
Rating - 0%
0   0   0
Did you reload reef-pi after enabling ph capability ?

hello @Ranjib, when I reloaded the reef-pi the PH tab start to work. But when I try to calibrate my probe, the current reading is 0, I try with lemon juice (1.3V) and mineral water (1.7V) but I'm always read 0. I try to configure the same circuit with Arduino and work fine. Any other suggestion? can I read the raw data?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Anyone using an external drive to boot and run from instead of using the SD card? I been poking at it and have it working on a pi zero but haven't decided if I want to run permanently like that or not, need to read some more but was wondering if anyone was already doing it.

Thanks :)
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Anyone using an external drive to boot and run from instead of using the SD card? I been poking at it and have it working on a pi zero but haven't decided if I want to run permanently like that or not, need to read some more but was wondering if anyone was already doing it.

Thanks :)

In my opinion it's just another potential for failure with no real benefit.
 

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
53
Reaction score
98
Location
Rome (Italy)
Rating - 0%
0   0   0
Anyone using an external drive to boot and run from instead of using the SD card? I been poking at it and have it working on a pi zero but haven't decided if I want to run permanently like that or not, need to read some more but was wondering if anyone was already doing it.

Thanks :)
I have a raspberry pi 3 model B +.
The firmare allows to boot permanently from the USB port (id the SD Card is not inserted in the slot).
I use a sandisk 64 GB USB 3.0 Pen Drive... max speed 480 Mbps (Raspberry Pi 3 has USB 2.0. ports).

Raspberry Pi 4 firmware, at the moment, doesn't allow to boot from USB drive.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
That will be nice :)
I am also pretty happy with the current temp sensor performance , I think it’s more than enough for my tanks . But it’s always good to have better sensor and logic support
I have done some reading on electronics boards, and I think the temp sensors can be a crapshoot because most are made with real Dallas Semiconductor DS18b20 chips, but many of the inexpensive sensors found on ebay etc are made in China with cheap knockoffs and seconds.

I agree with @Ranjib my temps in the tank hold just fine with reef-pi, there is more than a daily .2 degree variance in the Amazon River where most of my fish come from. I think shallow reef water has a diurnal variance as well.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
In my opinion it's just another potential for failure with no real benefit.
I agree, just buy a quality SD card, and look into a RTC chip to add so raspian dont get corrupted with improper time stamped files. If the pi loses network it loses time keeping without a RTC
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
In my opinion it's just another potential for failure with no real benefit.
SD cards are the single most common failure point for pi setups in general. Having a USB backed bootable drive not only address that it also gives bigger, cheaper and more robust storage (since you can use standard laptop SSDs which have much larger market).
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I have a raspberry pi 3 model B +.
The firmare allows to boot permanently from the USB port (id the SD Card is not inserted in the slot).
I use a sandisk 64 GB USB 3.0 Pen Drive... max speed 480 Mbps (Raspberry Pi 3 has USB 2.0. ports).

Raspberry Pi 4 firmware, at the moment, doesn't allow to boot from USB drive.
I like that setup. I have never tried it since I go through so many (I also run chef which does a lot of workaround). USB based storage and an ability to use computer power supply will open up lot of possibilities.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I have a raspberry pi 3 model B +.
The firmare allows to boot permanently from the USB port (id the SD Card is not inserted in the slot).
I use a sandisk 64 GB USB 3.0 Pen Drive... max speed 480 Mbps (Raspberry Pi 3 has USB 2.0. ports).

Raspberry Pi 4 firmware, at the moment, doesn't allow to boot from USB drive.

I have it working with a pi zero and m.2 sata drive, you still need an SD card to boot but it only needs one file on it, bootcode.bin and update the partUUID in comandline.txt and fstab and it works. Thinking of trying it with rootfs over NFS, I already have a NFS server up and running but not sure how many hoops you might have to get that working with the zero.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
SD cards are the single most common failure point for pi setups in general. Having a USB backed bootable drive not only address that it also gives bigger, cheaper and more robust storage (since you can use standard laptop SSDs which have much larger market).

Yeah that was my thinking, the zero is picky though with they type of drive that is connected via USB on boot, I suspect it may be power draw but I've not nailed it down. I wanted to use an old 2.5" spinning platter of rust but while it works with the pi booted ( goes from 1.5 watts to 3 watts on my killawatt meter it will not boot, it does work fine when connected after boot. I've also noted that some SSD's will work while others will not (intel 320 drive 32g works, while the 80g version does not). I have lots of drives to play with and had a 128G m.2 sata enclosure and it works like a charm. With the pi zero you still need the SD card but it just has the one file on it and doesn't write to it at all, just read on boot. I will probably go with something like this just haven't finalized which option, going to play around some more this evening.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I agree, just buy a quality SD card, and look into a RTC chip to add so raspian dont get corrupted with improper time stamped files. If the pi loses network it loses time keeping without a RTC

I remember you adding that, I would like to look into that for the new build but I remember you had some words of caution based on the unit that you purchased, do you happen to have those instructions handy?

:)
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I remember you adding that, I would like to look into that for the new build but I remember you had some words of caution based on the unit that you purchased, do you happen to have those instructions handy?

:)
its on my build thread. Basically those boards have a charging circuit for a 2032 sized RECHARGABLE lithium battery, however they ship with a NON rechargable. Charging a NON rechargable is bad(akin to crossing the streams in Ghostbusters) and the battery can explode. I just desoldered and removed a resistor which disables the charging circuit and use a cheap non rechargeable 2032 and replace it yearly.
You could also keep the charging circuit in place and buy a RECHARGABLE 2032.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
its on my build thread. Basically those boards have a charging circuit for a 2032 sized RECHARGABLE lithium battery, however they ship with a NON rechargable. Charging a NON rechargable is bad(akin to crossing the streams in Ghostbusters) and the battery can explode. I just desoldered and removed a resistor which disables the charging circuit and use a cheap non rechargeable 2032 and replace it yearly.
You could also keep the charging circuit in place and buy a RECHARGABLE 2032.

Thanks I will look through your build thread, will have to think about doing that for this build, might add some reliability to the setup.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Need some opinions since we have been discussing wavemakers/powerheads. Thats one of the decisions I am working through at the moment. I have ordered 2 Aqamai KPS units for my 30g tank but starting to wonder and looking at only one of the new Red Sea Wave 25 vs the 2 Aqamai KPS. I had also looked at the innovative marine units and the nero 5. The vortech's are out of my price range since I think I should have 2 of them.

Any feedback would be welcome, thanks!
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Oh one more thing, I ordered one of the TP link hs300, I think it has usb ports on it, anyone using it to provide power to reefpi?

Thanks

:)
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Thanks I will look through your build thread, will have to think about doing that for this build, might add some reliability to the setup.

:)
It does. I get frequent power outages and network issues living in a rural area. Normally when the pi boots it looks for internet time to set its clock. If it boots and the internet isnt up it sets the time to a default which can corrupt the underlying linux filesystem.
Adding the rtc per my instructions makes the pi look to the rtc to set time at boot and if internet is available it adjusts the RTC as well. If internet is not available the pi gets the RTC time which is close enough to not corrupt the filesystem.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Tom, I may in the future, but my ReefPi has a 12v that I buck convert down to 5v for the pi and feed my Goby HAT 12 and 5v to.

Yeah I have that mocked up also, but if I move the connection from the buck to the HS300 I can remove the buck converter and use the 12v to feed ML pi hat for the uln2803 and the doser module and anything else that might need 12v. Looks like the output on the HS300 is 2.4amps so it should be enough to run just reefpi.

Would free up some room, decisions decisions. :)
 

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