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,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
I didn't have to flush the DB, I just removed and reinstalled. It's too bad that we couldn't figure out what caused it and how to correct it though.
 
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 fellow reefers,
I have cut a new minor release (1.2) of reef-pi, with following changes
New Features:
  • Add support for https. Users can now enable https based api from settings page. Once enabled, user can either place their own tls certificates or reef-pi will auto generate certificate/keys. Once enabled, reef-pi will only server API/UI over https (i.e. your reef-pi URL will be changed to https://<IP:port) . This is a recommended setting (along with a strong password, say 32 character) if you are exposing reef-pi ui outside home network
  • Persist chart data across reboots. reef-pi used to store telemetry data only in memory, which used to be get lost in every reboot. From this release reef-pi will save the telemetry data in disk during reboot, and restore it back. Charts will not be reset during reboots as a result
  • Add support for auto-revert of equipment state after a duration, in timer sub-system. Till 1.1 release automating any equipment using timer used to involve at least two jobs, one to start the equipment on, another to switch it off. 1.2 introduced a "revert" feature, which when enabled will revert the equipment state after a user defined duration. An example will be to turn on a dosing pump every night at 12 and turn it off after 30 seconds, all in a single timer job.
  • Timer sub system now allows reminders. Instead of acting against equipment, timer can be used to trigger a reminder via email/text.
Bug fixes:
  • Light cycle charts now show light names
  • ATO pump triggering logic was reversed
  • Temperature controller UI now allows fractional values (78.9) for thresholds.
Other than this, there's a handful of non-user-facing (tech) changes also, including automatic detection of dev mode and code coverage reporting integration.

Release packages can be found in usual location:
https://github.com/reef-pi/reef-pi/releases/tag/1.2
Upgrade documentation is available here: https://reef-pi.github.io/additional-documentation/upgrade/


happy reefing,
 
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
An example screenshot of the new timer feature. This will run the dosing pump after every two hours for 10 seconds,
Screen Shot 2018-01-15 at 4.46.52 PM.png
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
An example screenshot of the new timer feature. This will run the dosing pump after every two hours for 10 seconds,
Screen Shot 2018-01-15 at 4.46.52 PM.png

Awesome. How did you end up calibrating it? And which dosing pump did you end up going with?
 
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
Awesome. How did you end up calibrating it? And which dosing pump did you end up going with?
I went with the stock peristaltic pump from adafruit. The screen shot is for example (from reef-pi running in dev mode), I am not using it with my tank yet for dosing,its good for BRS style dosers. I am working in the dosing sub-system which will allow full blown pwm control with calibration UI that I intend to use for my peristaltic pumps. This is the tentative UI:
Users should be able to create pumps and associate PWM pin with it (similar to LED/lighting channels).
Screen Shot 2018-01-15 at 5.46.29 PM.png


Once created, each dosing pump will have three buttons. on-demand use, scheduled use and to delete the pump
on-demand button will let user to run the pump with a specific pwm speed (same as led channel intensity) for a specified duration. This can be used to manual dosing or calibration
Screen Shot 2018-01-15 at 5.46.35 PM.png
" Schedule" button will allow configuring the pump to run at a specific schedule, similar to timer UI, but also with a specific pwm speed
Screen Shot 2018-01-15 at 5.46.42 PM.png


This is the tentative UI. Its not in the software yet, I plan to introduce this in next minor release.
I can think of an easy way to calibrate dosing pumps using the timer UI. Since it assume you have declared the dosing pump as any other equipment, i assume you can take stop watch and run it from a fixed duration using the UI as a work around. Or use a temporary timer job ... but I am not sure. It does not sound easy :0(
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
327
Reaction score
391
Rating - 0%
0   0   0
Well so far my ato is working good. I swapped the sensor out and i have to leave the sensor at a angle almost 45 degrees for it to detect water right.

Is there a backup float i can use incase this one fails?
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
Maybe add a stop watch widget to the ui for calibration. Tap calibrate when the container reaches calibration volume user taps end. Then your going to have to run some funky math programing. It doesnt sound easy, especially if its not a given the minimum volume of the pump the user decided on.
 
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
Well so far my ato is working good. I swapped the sensor out and i have to leave the sensor at a angle almost 45 degrees for it to detect water right.

Is there a backup float i can use incase this one fails?
Not currently. But I plan to work on supporting multiple ato sensor . I am still thinking how reef-pi will allow using them (open for all suggestions).

I have fixed a bug where the ato controller would not on/off pump even if it’s set .
https://github.com/reef-pi/reef-pi/pull/293/files
I don’t know if this has impacted you, but if you are updating, please test the ato (by manually removing the sensor out of water and check if ato pump is turned on)
 
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
Maybe add a stop watch widget to the ui for calibration. Tap calibrate when the container reaches calibration volume user taps end. Then your going to have to run some funky math programing. It doesnt sound easy, especially if its not a given the minimum volume of the pump the user decided on.
In the timer ui ? Or in the doser ui.
I don’t want to add calibration features in the timer ui, since it’s not generic enough to be used by all timer use cases.
I was hoping the on-demand functionality in the doser ui will be good enough for this. Since user tap can be error prone (in terms of time measurement) I was inclined to provide a ui that would run the doser for a specific time and then user can measure the volume of the liquid delivered, then adjust the speed and duration. I would assume that it’s preferred to run the dosing pumps longer in low speed to achieve better accuracy . Does this sound silly ? Open for suggestions:)
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
In the timer ui ? Or in the doser ui.
I don’t want to add calibration features in the timer ui, since it’s not generic enough to be used by all timer use cases.
I was hoping the on-demand functionality in the doser ui will be good enough for this. Since user tap can be error prone (in terms of time measurement) I was inclined to provide a ui that would run the doser for a specific time and then user can measure the volume of the liquid delivered, then adjust the speed and duration. I would assume that it’s preferred to run the dosing pumps longer in low speed to achieve better accuracy . Does this sound silly ? Open for suggestions:)

In the dosing tab :)

What i meant was:
(All these numbers are random just easily dividable lol)
If say the calibration amount is 50ml.
The pump took 100 secs to fill.
100/50= 2seconds for each ml of solution
User then inputs 10ml
Reefpi then multiplies by calibrated 1ml time to achieve 20 seconds.
Where i see it getting tricky would be if user1 is using pump a that has minimum dosing amount of 5ml. User 2 has pump b that the minimum dosing amount is 1ml. This would also need to be taken into account with some form of setting so user is not entering a value that their equipment is unable to deliver.
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
327
Reaction score
391
Rating - 0%
0   0   0
Not currently. But I plan to work on supporting multiple ato sensor . I am still thinking how reef-pi will allow using them (open for all suggestions).

I have fixed a bug where the ato controller would not on/off pump even if it’s set .
https://github.com/reef-pi/reef-pi/pull/293/files
I don’t know if this has impacted you, but if you are updating, please test the ato (by manually removing the sensor out of water and check if ato pump is turned on)

Hmm maybe there is a bug. Il update and see how it goes.

I never had a problem with the ato until i went to .9 i believe?
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
I just updated to 1.2, and timers are not working for me.

I am assuming this is because the ones that were in the .db from the previous version are not compatible?

Any thoughts on a remedy for this?
I have reloaded after the install, I have uninstalled with purge and still nothing. I tried downgrading back to 1.1 with no luck.
upload_2018-1-16_17-14-54.png

Code:
Jan 16 17:15:22 raspberrypi reef-pi[14115]: 2018/01/16 17:15:22 Successfully added cron entry. ID: 2
Jan 16 17:15:22 raspberrypi reef-pi[14115]: 2018/01/16 17:15:22 ERROR: Failed to list
Jan 16 17:15:22 raspberrypi reef-pi[14115]: 2018/01/16 17:15:22 ERROR: GET /api/timers json: cannot unmarshal string into Go struct field Job.equip               ment of type timer.UpdateEquipment
 
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
which version you were using before? it should work if you go back to that version.
Its complaining about schema mismatch for the timer entries.
You can delete the existing timers like this, and recreate new ones using the UI
Code:
curl -u <user>:<password> -X DELETE http://<IP>/api/timers/<ID>
change user, password and IP as par your setting. ID should be 1 to N where N is the number of timers you have. After deleting all the timers, you should be able to make /api/timers calls (it wont fail since there is no data to unmarshal)
 
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
In the dosing tab :)

What i meant was:
(All these numbers are random just easily dividable lol)
If say the calibration amount is 50ml.
The pump took 100 secs to fill.
100/50= 2seconds for each ml of solution
User then inputs 10ml
Reefpi then multiplies by calibrated 1ml time to achieve 20 seconds.
Where i see it getting tricky would be if user1 is using pump a that has minimum dosing amount of 5ml. User 2 has pump b that the minimum dosing amount is 1ml. This would also need to be taken into account with some form of setting so user is not entering a value that their equipment is unable to deliver.
I see what you are saying. It makes a lot of sense. In terms of innerworking this is same, but it makes a huge difference in user experience. Users only concerned about dosage/volume, hence its better to provide UI based on those semantics. While, in terms of controller/automation we cant really measure the volume, all we can count is time, and assume it directly impacts/controls the volume.
I'll try to rethink the UI, so that user can specify the expected pump throughput (for my case its 100ml/minute) and then run some calibration with a few limitations enforced, and then finally define when and how much dosing should be done. Does the sound reasonable (roughly) ?

Thank you, feedback likes this is very helpful and critical for better/usable reef-pi.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
which version you were using before? it should work if you go back to that version.
Its complaining about schema mismatch for the timer entries.
You can delete the existing timers like this, and recreate new ones using the UI
Code:
curl -u <user>:<password> -X DELETE http://<IP>/api/timers/<ID>
change user, password and IP as par your setting. ID should be 1 to N where N is the number of timers you have. After deleting all the timers, you should be able to make /api/timers calls (it wont fail since there is no data to unmarshal)
I was moving from 1.1. I am not sure if it would not list when i tried to roll back because I tried to create a timer in 1.2 with the new format?
I get this for each number I try.
Code:
{"error":"Failed to delete. Error: Cron ID not found for job ID:1"}
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Even after trying to create a timer and "successfully" doing so
Code:
Jan 16 18:59:02 raspberrypi reef-pi[14802]: 2018/01/16 18:59:02 Successfully added cron entry. ID: 1
Jan 16 18:59:02 raspberrypi reef-pi[14802]: 2018/01/16 18:59:02 ERROR: Failed to list
Jan 16 18:59:02 raspberrypi reef-pi[14802]: 2018/01/16 18:59:02 ERROR: GET /api/timers json: cannot unmarshal string into Go struct field Job.equipment of type timer.UpdateEquipment
Code:
{"error":"Failed to delete. Error: Cron ID not found for job ID:1"}
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 46 16.6%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 18 6.5%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.4%
  • I wear reef gear primarily to relax where I live.

    Votes: 35 12.6%
  • I don’t wear gear from reef brands.

    Votes: 158 57.0%
  • Other.

    Votes: 19 6.9%
Back
Top