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

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,076
Location
Gambrills
Rating - 0%
0   0   0
Null is ok . That’s not errror, you should see some text with cookie details in the cookie.txt file

I have that cookies.txt file on my pi now. I also added the other files to the top of the pi directory.

cal fail 4.JPG
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I see two different IPs, 192.168.3.187 and 192.168.3.229 , and only one of them is working 192.168.3.187 . Which one is correct? Lets not try both and test with only one . I notice 127.0.0.1 is working as well. These are all good signs. It means the API calls are wrong, lets fix that,
Can you share the content of the calibration file, it seems it has some bad data
Code:
cat calibration.json
Once the data is validated (i can audit it for you, just share it here), here is the command (change username/password)
Code:
curl -X POST -d '{"user":"....", "password":"..."}'  -c cookie.txt  http://127.0.0.1/auth/signin
curl -X POST -d @calibration.json -b cookie.txt  http://127.0.0.1/api/phprobes/1/calibrate
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,076
Location
Gambrills
Rating - 0%
0   0   0
I see two different IPs, 192.168.3.187 and 192.168.3.229 , and only one of them is working 192.168.3.187 . Which one is correct? Lets not try both and test with only one . I notice 127.0.0.1 is working as well. These are all good signs. It means the API calls are wrong, lets fix that,
Can you share the content of the calibration file, it seems it has some bad data
Code:
cat calibration.json
Once the data is validated (i can audit it for you, just share it here), here is the command (change username/password)
Code:
curl -X POST -d '{"user":"....", "password":"..."}'  -c cookie.txt  http://127.0.0.1/auth/signin
curl -X POST -d @calibration.json -b cookie.txt  http://127.0.0.1/api/phprobes/1/calibrate
x.x.3.187 is the reef-pi, and 127.0.0.1 is local host from the reef-pi. x.x.3.229 is my PC.
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,076
Location
Gambrills
Rating - 0%
0   0   0
I see two different IPs, 192.168.3.187 and 192.168.3.229 , and only one of them is working 192.168.3.187 . Which one is correct? Lets not try both and test with only one . I notice 127.0.0.1 is working as well. These are all good signs. It means the API calls are wrong, lets fix that,
Can you share the content of the calibration file, it seems it has some bad data
Code:
cat calibration.json
Once the data is validated (i can audit it for you, just share it here), here is the command (change username/password)
Code:
curl -X POST -d '{"user":"....", "password":"..."}'  -c cookie.txt  http://127.0.0.1/auth/signin
curl -X POST -d @calibration.json -b cookie.txt  http://127.0.0.1/api/phprobes/1/calibrate

This is what's in the calibration file

[/LIST]
[
{"expected":10.01, "observed": -9284},
{"expected":7.01, "observed": -170}
]
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hello friends,
I have just published two set of releases with few bug fixes, namely
- Disable ATO pump when alert level is breached
- Light charts on dashboard in auto-mode
- 0 & 100% pwm behavior when using pca9685 mnodules
The 2.4 release is a stable public release, and will not impact any existing 2.x installation, while the 3.0.0-alpha-2 is a pre-release not thoroughly field tested, but provides all the 3.0 intended features (ph driver, calibration, multiple pca9685 etc etc).

Releases can be found here: https://github.com/reef-pi/reef-pi/releases/
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Hello friends,
I have just published two set of releases with few bug fixes, namely
- Disable ATO pump when alert level is breached
- Light charts on dashboard in auto-mode
- 0 & 100% pwm behavior when using pca9685 mnodules
The 2.4 release is a stable public release, and will not impact any existing 2.x installation, while the 3.0.0-alpha-2 is a pre-release not thoroughly field tested, but provides all the 3.0 intended features (ph driver, calibration, multiple pca9685 etc etc).

Releases can be found here: https://github.com/reef-pi/reef-pi/releases/
Just loaded 2.4 and all works, pwm bug gone!
Lighting graphs now appear!

Now to save my 2.4 database just in case and load 3.0 again! If that tests out good, time to get a ph probe on the way!!!

Great job!!!
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Just loaded 2.4 and all works, pwm bug gone!
Lighting graphs now appear!

Now to save my 2.4 database just in case and load 3.0 again! If that tests out good, time to get a ph probe on the way!!!

Great job!!!
If you have saved the dB you had with 3.0 prereleases , you can use it with the new 3.0 prerelease without any issue . It should work out as well
 

Stephen2

Community Member
View Badges
Joined
Jul 31, 2014
Messages
48
Reaction score
28
Rating - 0%
0   0   0
How do you wire the uln2803 to these boards?
Especially in refernce to the vcc and gnd?
d406684305453a62b9ff6d49283efa81.jpg
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
you forgot me, my little contribution
Good morning from California,
I just release an early release of reef-pi 3.0.0. This release aimed to onboard ph sensors for ph board and pico board users. This is a very early beta release, and not as rigorously field tested as the other public releases, but I have been running it for a week at least without any issues across light, power, temperature and ph modules. Its in 3.x series and wont be compatible to 2.x database, users have to recreate their setup. This release brings a host of new things, notably HAL (hardware abstraction layer) , internationalization, ph/pico board drivers, calibration support etc. The newly introduced HAL layer means users have to create a driver first (under Configuration -> Drivers) which is then associated with connectors. On the plus side, this mean users can now add multiple pca9685 , ph sensor board etc. The new HAL layer also allows using pca9685 as standard outlet control, this enables user to overcome the Pi GPIO limits in terms of outlet control :0-). Release builds can be found in usual place: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-pre-alpha-1

I am jotting down the ph board setup, to give you a glimpse of how this works. The calibration part is not yet supported via UI, we'll have to do it using the API.

  1. Wire up your ph board and power up your raspberry pi. Once up,you should see the ph board regisetered as i2c addres 0x40 (64 in decimal)
    Screen Shot 2019-05-26 at 9.37.13 AM.png
  2. Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. Details can be found in the troubleshooting guide
  3. Once running , go ahead and create a new driver from the Configuration -> Drivers section, select phboard as type (pico board for pico base board users). Make sure to click on the drop down and select the type, even if the one shown in the UI by default is the one you are using (i.e. do an explicit selection). Set 64 as the driver address (for pico base board users, it will be 72, @theatrus can you verify this is uniform across all pico base board users?). Specify a name, keep it unique across different drivers.
    Screen Shot 2019-05-26 at 9.32.44 AM.png
  4. Next, create a connector under analog input section and associate it with the new driver, specify channel as "0" and give it a name.
    Screen Shot 2019-05-26 at 9.36.13 AM.png
  5. Next, create a pH monitor (if you dont see ph tab, then probably its not enabled, enable this module under Configuration -> Settings, and reload reef-pi). Associate the ph monitor with the newly created analog input. And thats it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw milivolts, which for me is around -8K.
    Screen Shot 2019-05-26 at 9.36.45 AM.png
  6. Next, perform calibration. reef-pi allows one or two point calibration. Each calibration point is indicated by an expected and an observed value. If you are using reference solution (like ph 7 and 10), keep them in tank temperature and immerse probe in them and note down the reading from the dashboard. It will take a few minute to stabilize the reading. We'll be applying the calibration via API (due to UI still being worked on). Create a json file (calibration.json) containing the calibration data in this format. The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
    Code:
    [/LIST]
    [
     {"expected":8.21, "observed": -8768},
     {"expected":8.12, "observed": -8189}
    ]

    reef-pi requires authentication for api, we'll use one curl command to get the authentication token, and another to use the token to apply our calibration data. Remember to disable the ph monitor before applying calibration.
    Code:
    curl -d @creds.json -X POST http://<IP>/auth/signin -c cookie.txt
    curl -X POST -d @calibration.json -b cookie.txt  http://<IP>/api/phprobes/1/calibrate


    Note, the last command assumes the ph monitor id is 1, which will be the case if you create a ph monitor first. If you delete and create another one it will be 2 and so on.. so if you are making a re-attempt then update the command accrodingly. Calibration details are specific to individual probes/ph monitors. You can always checkout your existing ph probes and their ids using this command

    Code:
    curl  -b cookie.txt  http://<IP>/api/phprobes/
    And it will return all the ph probe and their id, name etc. You can use the id returned by this command to calibrate,

    let me know how it goes,
    thank you for testing out this early build, we are very excited to ship this :) . Thanks to @Roberto_b @theatrus @Michael Lane @Zekth for all the awesome work they did.

    p.s. we are still looking for help with translations, so if you want to see your favorite language supported in reef-pi or improve the existing translations, please get in touch with us
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib , what am I missing here?
Nothing i can spot, let me try it out on my end, your signin is working, the data looks corret (it will be easier if you can cat the file and share the screenshot, instead), calibration should work
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Nothing i can spot, let me try it out on my end, your signin is working, the data looks corret (it will be easier if you can cat the file and share the screenshot, instead), calibration should work
I just ran this same data with my development setup and it worked just fine.

Code:
curl -c cookie.txt -X POST -d  '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
# returns null
 curl -b cookie.txt  http://127.0.0.1/api/phprobes
# returns the probes, notice my test probe id is 1: [{"id":"1","name":"Foo","enable":false,"period":60,"analog_input":"1","control":false,"notify":{"enable":false,"min":0,"max":0}}]
curl -b cookie.txt  -X POST -d @calibration.json http://127.0.0.1/api/phprobes/1/calibrate
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I just ran this same data with my development setup and it worked just fine.

Code:
curl -c cookie.txt -X POST -d  '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
# returns null
 curl -b cookie.txt  http://127.0.0.1/api/phprobes
# returns the probes, notice my test probe id is 1: [{"id":"1","name":"Foo","enable":false,"period":60,"analog_input":"1","control":false,"notify":{"enable":false,"min":0,"max":0}}]
curl -b cookie.txt  -X POST -d @calibration.json http://127.0.0.1/api/phprobes/1/calibrate
BTW @DirtDiggler2823 your second calibration point is way off i think :-/ , we'll see
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
BTW @DirtDiggler2823 your second calibration point is way off i think :-/ , we'll see
@ranjib the [ \list] is an error? I calibrate my pico board but i was delete [\list] of my json file
I follow the instruccion: curl -d to get the cookie. Txt, an later curl - X Post, its work fine for my
1559425959150.jpeg
 

Good trouble: Have mushrooms ever become pests in your aquarium?

  • Mushrooms would never be pests even if they kept replicating.

    Votes: 26 16.3%
  • Mushrooms have not become a pest for me.

    Votes: 68 42.5%
  • Mushroom have become overgrown, but not to the point of becoming pests.

    Votes: 22 13.8%
  • Mushrooms have become pests in my aquarium.

    Votes: 35 21.9%
  • Other.

    Votes: 9 5.6%
Back
Top