You would follow these instructions if you are already running JayFish without Dosing and you would like to upgrade without replacing your entire database. This is how.
- The setup has been upgraded you need to update your installer files. To do this please do the followowing.
create a new installer folder called j4dose in your pi folder location, and download the new setup.
- cd /home/pi
- mkdir j4dose
- cd j4dose
- wget http://www.jayfish.net/setup/base-setup.sh
- sh base-setup.sh
- sudo sh service-install.sh
- Now that you have all the new setup files, lets first update the website, and then run the SQL patch to add the dose tables.
- sudo sh webupdate.sh
- sudo mysql <patch.sql
- You done, if you goto your website you should see the new Dosing option under Modules.
You dont have to do anything, you can just follow the help guide below.
The code is pretty solid, but do your tests, the code cannot get confused about which day it is … as I have used the code identification method for a day, meaning Sun-Sat is 0,1,2,3,4,5,6 – I have also used the 24hr method of time to also ensure that their are no time mistakes. LOOPING is not possible … if your clock failed and your day does not change it will NOT repeat dosing for that day. The day HAS TO CHANGE for it to continue.
We have done liquid pump tests, and it’s very very accurate. If you add ridiculously concentrated formula’s .. dilute them for manageability, don’t try to add 0.25 ml … It will try 🙂 and what ever your dose pump is capable of emitting for an instant if you so desire … it will. Test Test Test … thanks all.
INTRODUCTION & BASICS
To open the dosing configuration and schedules, navigate to Modules – > Dosing.
In a nutshell this is how the dosing works in Jayfish, the entire system is based on the metric measuring system for liquids in ml (milliliters). Relays are first added with the following properties.
- Dose Relay (Chemical) Name
The name of the chemical you will be dosing.
This is based on BOARD MODE, you can use Led’s first if you would like to test the feature.
Polarity, is there in case the relays you bought respond the other way around, closed on low instead of high. Make sure you buy relays that are closed (as in on) when a high signal is given. I also suggest you used SSR relays for every dosing pump. Actually I HIGHLY recommend you do. DONT put in cheap relays for dosing and DONT use reed based relays. SSR only.
Basically this means literally enable or disable, Some prefer to start the relay disabled OR you might want to put it out of service for some reason.
It’s best that you add all the relays you need first, YOU DONT HAVE TO, just makes it simpler when you calibrate the relay/dose. Once you have added the relays they need to be calibrated. There is a help button just below the Add Dosing Relay option that explains the following.
Add your relays first, at least one before trying to run calibration.
DO NOT CALIBRATE INTO YOUR TANK !!!! Caliibrate into a meassuring beaker for ml(millilitres)
Since you have to calibrate each relay, it’s easier to add all the relays you intend to use first and then calibrate them via the command line calibration tool.
The tool does allow you to configure others later, or re-configure existing dose relays. YOU CANNOT enter the millitres per second value via the webpage, this can ONLY be done via the tool. This is for safety.
The reason you have to run a calibration tool first, is to determine exactly how much your dose pump dispenses in (ml) per second. From this we are work out how much time it would take in seconds to dispense X(ml).
HOW TO CALIBRATE
Calibration effectively figures out your ml per second, this will allow you to create percise dispenses.
Goto your raspberry pi command line and navigate to the following foolder by typing in cd /var/www/html/pycode
then type in the following command to calibrate relays added. python dose-calibrate.py follow the instructions there, and then your done.
Naturally once you have added all your relays here, you can use the calibration tool to test them at any point in time, or re-calibrate if needed.
Once you add a dose relay, and you edit it. You will see an additional field called, ml (per sec) calibrated, if it has a value of 0 you need to run the calibration tool. YOU WILL NOT BE ABLE TO SCHEDULE A DOSE WITHOUT CALIBRATION. I have setup warning messages that will remind you to calibrate the relay before you are able to continue.
SCHEDULING LOGIC (HOW IT WORKS)
Scheduling is created by selecting a day of the week, selecting an appropriate time (I suggest you use the selector time recommendation, if you type it in manually please ensure that you fill it in completely 8 PM would be 20:00:00) The time is based on 24 hr clock.
Because you relay has been calibrated, the Calc function will populate your seconds field based on how much ml you wish to dispense. Your calibration provided the ml to time ratio. Simply put in how many ml you would like to dispense in the Calc engine and it will fill in the seconds for you.
Some are asking why the Seconds field allows manual entry, I have a few people who want to specify a time specifically for their own reasons. I don’t see the harm at this point.
Schedule logic works like this, there is a 5 min window which will cater for reboots or anything you might do when it was meant to dispense, if the pi recovers in that five minute window it will still dispense. This helps protect against reboot’s or power dips that causes your system to be rebooted. Once it dispenses it will not dispense again for that time until the following week.
The next day all prior completed statuses will change to PENDING again, this means that they will go off again the following week. The status of completed will drop each time the day changes. The entire engine is cyclic and not designed for one off’s.
The rest is mostly logical. Any issues let us know.