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

AbjectMaelstroM

Active Member
View Badges
Joined
Jul 21, 2019
Messages
373
Reaction score
394
Location
Richmond
Hello,

I just purchased a reef-pi hat goby.

I noticed he also had a module for the Mars aqua. Would this work to control the viparspectra lights?

Thanks
I'm not sure how exactly Mars Aqua work, but by looking at this thrad:

Looks like Vipars are PWM out of the gate. The issue is that it needs a signal to turn on/off. I believe, and this is without a detailed look at MA light and Mike might be able to speak to this more, they operate in the similar manner.

So you would need something like a 5/12v relay which would get signal from the pie to turn on/off the light, then simple pwm signal from the pi or the PCA to adjust each channel.

I'm out of town for next two weeks, but I should have my replacement Vipar fixture by the time I get back and I can give it a crack then.
 

Mikeneedsahobby

Active Member
View Badges
Joined
Sep 16, 2018
Messages
284
Reaction score
582
Thanks guys! When you said dipped in silicone I was thinking something comparable to Plasti Dip. I think the idea of heat shrink tube and seal up the edges with silicone it a solid approach.
My first one was the lighter weight sensor(not drox type). I potted the entire sensor up to about 1/2 inch of wire in epoxy. Still working about 10 months later. the next two were drox type and went into a freshwater tank with no extra coating.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
Belated thanksgiving everyone. I was too busy wrapping up reef-pi 3.0 followed by thanksgiving food coma :)
0A0733F6-17B2-49C9-8179-09FB3E651F8A.jpeg

I have installed a reef-pi outside in the patio yesterday to monitor outdoor temperature. It was almost 40 F last night. And its raining
Screen Shot 2019-11-30 at 12.46.18 PM.png


Wify made hot chocolate :)
11887083-186D-4070-B3D9-A65B517E0F33.jpeg


Now off to the next set of things. Son has a big agenda for the holidays... have to follow his lead here..
852B8047-FF0A-4011-A39B-5279DCBF103E.jpeg


As the wise man said , happy wife == happy life
AE51362F-DAA1-445D-B4B5-8E8851636D74.jpeg
 

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
852
Reaction score
2,075
@ Ranjib I noticed a strange behavior in reef pi 3.0.

Is there a reload built in on a timer. Looks like my reef pi reloads on its own every night at midnight. It shows that on the about page and i can see the typical drop in memory usage that a reload brings every night near midnignt
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
@ Ranjib I noticed a strange behavior in reef pi 3.0.

Is there a reload built in on a timer. Looks like my reef pi reloads on its own every night at midnight. It shows that on the about page and i can see the typical drop in memory usage that a reload brings every night near midnignt
We dont have anything built in that will do it. None of my build experienced this yet with 3.0
Screen Shot 2019-11-30 at 10.04.23 PM.png

and
Screen Shot 2019-11-30 at 10.04.09 PM.png



Theres are many things in linux/raspbian that can cause this. Can you run this and check what was happening during that time:
Code:
journalctl --since "2019-11-29 23:55:00" --until "2019-11-30 00:05:00"
 

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
852
Reaction score
2,075
We dont have anything built in that will do it. None of my build experienced this yet with 3.0
Screen Shot 2019-11-30 at 10.04.23 PM.png

and
Screen Shot 2019-11-30 at 10.04.09 PM.png



Theres are many things in linux/raspbian that can cause this. Can you run this and check what was happening during that time:
Code:
journalctl --since "2019-11-29 23:55:00" --until "2019-11-30 00:05:00"
Im getting nothing in the logs...strange
 

pais

New Member
View Badges
Joined
Jun 27, 2019
Messages
4
Reaction score
6
hi everybody, just upgraded to 3.0 from 2.4. First thing i noticed is changements in Atlas ezo circuits management: my arduino is not responding the same way as before. (I use an arduino to emulate the behaviour of an ezo circuit through the i2c communication). Did you remove some character transmission from rpi ? I receive correctly all the "requests" from rpi but no more "transmissions" from rpi. Difference lies in different behaviour of Wire.OnReceive and Wire.OnRequest functions i am not aware of. However thank you all for your great work !
 

hhaase

Member
View Badges
Joined
Nov 11, 2019
Messages
18
Reaction score
32
Shoot, Ranjib, I owe you a bill of material on that hat I sent you. I'll get that done shortly. Same with a schematic.

I've got to order some boards for my business in a few days, so I'll probably be doing a fresh revision shortly. The funny part is I have two of mine built-up here and I haven't even tried either one yet. Haven't had time to do much other than get the base Pi OS installed. So if you've got any requests, now is a perfect time.
 

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
852
Reaction score
2,075
@Ranjib
Caught this logging real time as it happened. Reef pi fails at 11:59pm every nite since installng. It reloads and works fine.

Heres a copy of what i caught

Logs begin at Sun 2019-12-01 13:37:58 EST. --
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/light.go:134 +0x1f
8
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).syncLights(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:102
+0x58
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).StartCycle(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:59 +
0x4c
Dec 01 23:59:26 75gallon reef-pi[5446]: created by github.com/reef-
pi/reef-pi/controller/modules/lighting.(*Controller).Start
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:48 +
0x2c
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Main process
exited, code=exited, status=2/INVALIDARGUMENT
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Unit entered
failed state.
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Failed with r
esult 'exit-code'.
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
269
Reaction score
556
Location
Australia
Im ready to upgrade to 3.0 but I am not sure how to backup the database.
I know its located at /var/lib/reef-pi/reef-pi.db but how do you actually do it?
 

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
852
Reaction score
2,075
Not sure how familiar you are with linux but ssh into your pi.

First command changes the directory you are working in and is:

cd /var/lib/reef-pi

Next command copies the database into your home directory:

sudo cp reef-pi.db ~

Now you can go back to the home directory:

cd ~

Now check to to see if the copied database is present:

ls

If you did this correctly you will see a copy of reef-pi.db there in the home directory where you can leave it until needed. You can also scp into the pi and save a copy elsewhere.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
hi everybody, just upgraded to 3.0 from 2.4. First thing i noticed is changements in Atlas ezo circuits management: my arduino is not responding the same way as before. (I use an arduino to emulate the behaviour of an ezo circuit through the i2c communication). Did you remove some character transmission from rpi ? I receive correctly all the "requests" from rpi but no more "transmissions" from rpi. Difference lies in different behaviour of Wire.OnReceive and Wire.OnRequest functions i am not aware of. However thank you all for your great work !
We did quiet a bit of change in the device management layer, but nothing related to probe reading. I am running my a single build with ezo. Are you trying to do calibration? That can be broken , I have not tested that with 3.0. Use the python library for ezo to do out of band calibration and other operations. But you are saying this in not ezo, its an arduino.
It will be hard for us to promise ezo style i2c behavior from reef-pi. We will only use the reading features primarily, If your main goal is to make sure the arduino works across reef-pi version then emulate the reef-pi ph board protocol instead. Its a simple & minimal adc reading api without any calibration support.

 
Best reef aquarium LED lighting
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
@Ranjib
Caught this logging real time as it happened. Reef pi fails at 11:59pm every nite since installng. It reloads and works fine.

Heres a copy of what i caught

Logs begin at Sun 2019-12-01 13:37:58 EST. --
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/light.go:134 +0x1f
8
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).syncLights(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:102
+0x58
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).StartCycle(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:59 +
0x4c
Dec 01 23:59:26 75gallon reef-pi[5446]: created by github.com/reef-
pi/reef-pi/controller/modules/lighting.(*Controller).Start
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:48 +
0x2c
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Main process
exited, code=exited, status=2/INVALIDARGUMENT
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Unit entered
failed state.
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Failed with r
esult 'exit-code'.
This looks like a bug, but should not crash the controller. Can you share some details on the light setup?

@Bigtrout regarding to update the pwm profile of an existing light using API. here is the basic steps. The first few steps are common for all API operations

- Get an authentication cookie (equivalent to signin)
Code:
curl -c cookie.txt  -X POST  http://<IP>/auth/signin -d '{"user":"reef-pi", "password":"reef-pi"}'
- List your lights (we need the ID of the light we want to update. This should also show the details of individual light, including the assigned profile
Code:
curl -b cookie.txt   http://<IP>/api/lights
- Get json representation of a specific light (ID obtained from the previous step) in a file, so that we can edit the profile part and reupload it
Code:
curl -b cookie.txt   http://<IP>/api/lights/<ID> > light.json
[code]
- Open the json file in a text editor and change the parts you want. In this case the profile attribute. I'll detail the specifics of what to change little later. But once necessary changes have been made, update the light with  this
[code]
curl -b cookie.txt http://<IP>/api/lights/ID -X POST -d @light.json

Now, regarding your specific question on how to use the new interval profile to specify custom setpoints.
the interval profile requires an duration parameter that represent the difference between two consecutive set points in second, and a list of values each representing one setpoint. The interval profile like most profile has a daily start and end time and reef-pi will validate that the number of setpoints are exactly (start - end)/interval duration + 1. For example if start time is 9:00:00 , end time is 18:00:00 and interval duration is 900 (15 minutes) then a list of 37 setpoint values needs to be specified. Here is an example . I have reduced the start /end time shorter to limit the number of setpoints

Code:
{
    "id": "1",
    "name": "L0",
    "channels": {
      "0": {
        "name": "Channel-1",
        "on": true,
        "min": 0,
        "max": 100,
        "pin": 0,
        "color": "",
        "manual": false,
        "value": 0,
        "profile": {
          "name": "",
          "type": "interval",
          "config": {
            "start": "20:30:00",
            "end": "22:30:00",
            "values": [
              0,
              16,
              30,
              52,
              66,
              45,
              30,
              12,
              0
            ],
            "interval": 900
          },
          "min": 0,
          "max": 0
        }
      }
    },
    "jack": "1",
    "enable": true
  }
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
@Ranjib
Caught this logging real time as it happened. Reef pi fails at 11:59pm every nite since installng. It reloads and works fine.

Heres a copy of what i caught

Logs begin at Sun 2019-12-01 13:37:58 EST. --
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/light.go:134 +0x1f
8
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).syncLights(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:102
+0x58
Dec 01 23:59:26 75gallon reef-pi[5446]: github.com/reef-pi/reef-pi/
controller/modules/lighting.(*Controller).StartCycle(0x204b4d0)
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:59 +
0x4c
Dec 01 23:59:26 75gallon reef-pi[5446]: created by github.com/reef-
pi/reef-pi/controller/modules/lighting.(*Controller).Start
Dec 01 23:59:26 75gallon reef-pi[5446]: /Users/ranjib/works
pace/reef-pi/reef-pi/controller/modules/lighting/controller.go:48 +
0x2c
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Main process
exited, code=exited, status=2/INVALIDARGUMENT
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Unit entered
failed state.
Dec 01 23:59:26 75gallon systemd[1]: reef-pi.service: Failed with r
esult 'exit-code'.
@Bigtrout this only crashes reef-pi right? Raspberry Pi is running fine otherwise? The error log here is cropped, if you do get the full log say from 23:58 that will be very useful.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,310
Reaction score
13,012
Location
Palo Alto, Bay Area
Yes to define a range. Maybe from 20 to 40 and all outside the range is not show.

Or is there a chance i can filter 85 and 127 readings in the code ?
theres nothing in 3.0 that has something like this. let me think through whats the best course of action from exact feature (moving average or some other type of smoothing) and priority perspectives. I need a few more use cases from others with similar issues. Worth tracking
 

Des Westcott

Active Member
View Badges
Joined
May 29, 2018
Messages
278
Reaction score
393
theres nothing in 3.0 that has something like this. let me think through whats the best course of action from exact feature (moving average or some other type of smoothing) and priority perspectives. I need a few more use cases from others with similar issues. Worth tracking
I'd like a way of getting a smoother average graph than what I get below. If possible. Or another way?


2019-12-01 (2).png
 

Where do you go in case of a real reef tank emergency?

  • Me, myself and I

    Votes: 224 43.4%
  • Local Friend

    Votes: 47 9.1%
  • Reef2Reef

    Votes: 198 38.4%
  • Other

    Votes: 47 9.1%

Online statistics

Members online
1,833
Guests online
4,631
Total visitors
6,464
JASON FOX SIGNATURE CORALS
Top