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

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
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
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
Hello :)

Any News to cut the Temp-graphs ?

8EF6AED7-BFBC-484E-BE69-EC4C508C947E.png
you mean those spiky readings ?
 
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
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.

 
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
@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
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
@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
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
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

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
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
 

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
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

Thanks :)

So here is an other picture. These are the typical ds18b20 error values 85 and 127. in the Pictures are only 85 errors.

Iam really the only one with this problem ? :-(

In the circuit i cant do more :-( i reduced the pullup to 2.2k and added a capacitor to voltage stabilization near the sensors

7BEC138C-F1BE-404A-A3E9-DC5A9090BA63.png
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Thanks :)

So here is an other picture. These are the typical ds18b20 error values 85 and 127. in the Pictures are only 85 errors.

Iam really the only one with this problem ? :-(

In the circuit i cant do more :-( i reduced the pullup to 2.2k and added a capacitor to voltage stabilization near the sensors

7BEC138C-F1BE-404A-A3E9-DC5A9090BA63.png

Hi. Please help me understand what you're doing here. I'm confused as to why you have an ATO reporting Temperature?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@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.
Yeah i didnt log in quick enough to catch it from 23:58.
Im not positive if ita just reef pi reloading or if my pi is rebooting. I do know reef pi crashes at 11:59 and isnt back up until 12:01 am.
 

pies666

New Member
View Badges
Joined
Nov 25, 2019
Messages
12
Reaction score
9
Rating - 0%
0   0   0
Heya,

Do lightning graphs work only with 0-10V 2 PWM singnal regulated lights?
I can't get them to work. I'm powering 2 LED strips, each of them via single PWM signal (generated by PCA9685) and N-Mosfet. Everything is working just fine - only graphs won't loading.

Also bump:
When I enable screen in reef-pi settings nothing happens. When I try moving the brightness slider the screen itself reacts just fine but the slider is not moving. Should the reef-pi display any UI on the screen with touchscreen connected or I have to use web browser anyway?
Futhermore when I reload reef-pi and when I hit Settings tab I get
"{"error":"strconv.Atoi: parsing \"169\\n\": invalid syntax"} | HTTP 404 "

I'd appreciate any information from someone who has touchscreen working.

Thanks!

rpi reef-pi.JPG 11.JPG 55.JPG
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Thanks :)

So here is an other picture. These are the typical ds18b20 error values 85 and 127. in the Pictures are only 85 errors.

Iam really the only one with this problem ? :-(

In the circuit i cant do more :-( i reduced the pullup to 2.2k and added a capacitor to voltage stabilization near the sensors

7BEC138C-F1BE-404A-A3E9-DC5A9090BA63.png
I had this problem before and it ended up being a bad power supply causing big time interference. Once thay was replaced I havent had an error like this since.
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
What's the best way to just clear the config and start over? also, before I do that, where is the config file stored so I can see what my connector settings are? I tried to roll back, and that didn't work.
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

Mine is the same way. It was not like this in 2.4. I freaked out a little when I saw a huge spike in temp until I saw the sccale and realized it was only .1 degree lol
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Mine is the same way. It was not like this in 2.4. I freaked out a little when I saw a huge spike in temp until I saw the sccale and realized it was only .1 degree lol

I don't know if this is possible, but something like what pi-hole uses for graphing may work for reef-pi. It has smoothed/best fit curves for all of it's charts.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Heya,

Do lightning graphs work only with 0-10V 2 PWM singnal regulated lights?
I can't get them to work. I'm powering 2 LED strips, each of them via single PWM signal (generated by PCA9685) and N-Mosfet. Everything is working just fine - only graphs won't loading.

Also bump:
When I enable screen in reef-pi settings nothing happens. When I try moving the brightness slider the screen itself reacts just fine but the slider is not moving. Should the reef-pi display any UI on the screen with touchscreen connected or I have to use web browser anyway?
Futhermore when I reload reef-pi and when I hit Settings tab I get
"{"error":"strconv.Atoi: parsing \"169\\n\": invalid syntax"} | HTTP 404 "

I'd appreciate any information from someone who has touchscreen working.

Thanks!

rpi reef-pi.JPG 11.JPG 55.JPG

I'm using a 15" Elo touchscreen and it just worked against all the odds. It is VGA, and I had to use a HDMI / VGA adaptor and it has a USB connection for the touch. Plug and play. I would assume that the Raspberry Pi screen should be even easier.

Is it set up to support a screen in Raspi Config? Not set up to run headless?
 

pies666

New Member
View Badges
Joined
Nov 25, 2019
Messages
12
Reaction score
9
Rating - 0%
0   0   0
I'm using a 15" Elo touchscreen and it just worked against all the odds. It is VGA, and I had to use a HDMI / VGA adaptor and it has a USB connection for the touch. Plug and play. I would assume that the Raspberry Pi screen should be even easier.

Is it set up to support a screen in Raspi Config? Not set up to run headless?
I've seen your 15'' before somewhere in this topic:)

My official Rpi screen itself is working just fine with Rasbian and browser. I had A HMDI/GPIO before (so similar setup to your VGA->HDMI + USB for touch) and it was also working ok but, of course, no reef-pi compatibility. I could run the reef-pi in browser obviously, just like You but reef-pi itself was not detecting the screen. I decided to change to official one (official 7'' RPI Touchscreen). Unfortunately, despite it should be supported by reef-pi, I'm still having issues with it as You can see on screenshots (errors). So basically I have no advantage of having official screen in comparison with any other, custom screen.
 

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