×

http api

This api will deliver access to pump internal data and for command execution via http(s) protocol.

acquire api username

before starting any access via http api, the access username has to be acquired.
pls. be aware, that this username is not a fixed one. retrieve this before every api session.

http://<ip_of_pump>/api

Output:

admin

url format

http://<ip_of_pump>/api/<api_usr>/func/<func>/state/<selector>

<func> is the command function
<selector> parameter(s) for <func>

http response

mime type: text/plain

http status

If api command execution was successful, http status 200 (OK) will be delivered.
Unsuccessful execution will return 450 (method not supported) error code.

showval

This command is intended to retrieve various internal data.

http://<ip_of_pump>/api/<api_usr>/func/showval/state/<selector>

selector:

  2:        Profile[2/0]: Pressure profile for OPER mode
  1:        Profile[1/0]: Pressure profile for STBY mode
  0:        Profile[0/0]: Pressure profile actual selected
 -1:        VAL[SetP/0]:  SetPoint pressure values
 -2:        VAL[PV/0]:    ProcessValue pressure values
 -3:        VAL[avg/0]:   average pressure values
 -4:        VAL[Dflt/0]:  default pressure values
 -5:        VAL[Pmin/0]:  OPER pressure values 
 -6:        VAL[PStby/0]: STBY pressure values 
 -7:        VAL[PTyp/0]:  reservoir type (-1:vakuum 1:pressure)
 -8:        VAL[Stby]:    pressure value for Stby
 -9:        VAL[Init]:    pressure value for Init
-10:        VAL[Clean]:   pressure value for Cleaning
-11:        VAL[idx]:     available reservoirs
-12:        VAL[desc]:    reservoir names
-13:        VAL[title]:   reservoir titles
-21:        VAL[PSET]:     
-22:        VAL[OPS]:     OPS Menu items
-23:        VAL[SVC]:     SVC Menu items
-24:        VAL[SOL]:     SOL Menu items

Example:

http://pump.local/api/admin/func/showval/state/-24
http://pump.local/api/admin/func/showval/state/-23
http://pump.local/api/admin/func/showval/state/-22
http://pump.local/api/admin/func/showval/state/-13
http://pump.local/api/admin/func/showval/state/-12
http://pump.local/api/admin/func/showval/state/-11
http://pump.local/api/admin/func/showval/state/-10
http://pump.local/api/admin/func/showval/state/-9
http://pump.local/api/admin/func/showval/state/-8
http://pump.local/api/admin/func/showval/state/-7
http://pump.local/api/admin/func/showval/state/-6
http://pump.local/api/admin/func/showval/state/-5
http://pump.local/api/admin/func/showval/state/-4
http://pump.local/api/admin/func/showval/state/-3
http://pump.local/api/admin/func/showval/state/-2
http://pump.local/api/admin/func/showval/state/-1
http://pump.local/api/admin/func/showval/state/0
http://pump.local/api/admin/func/showval/state/1
http://pump.local/api/admin/func/showval/state/2

Output:

VAL[SOL]: Solution1 Solution2 ... Solution6 SolALLOff
VAL[SVC]: IPShow PwrOff Reboot SWUpdate ... SetWlanUSB FctryDflt
VAL[OPS]: AllOff Stby Oper Init Clean
VAL[title]: PON POFF VRecirc VRecirc2
VAL[desc]: P1 P2 P3 P4
VAL[idx]: 1 2 3 4
VAL[Clean]: 300.0
VAL[Init]: 220.0
VAL[Stby]: 20.0
VAL[PTyp/0]: 1 1 -1 -1 -1 1 1 -1
VAL[PStby/0]: 10.0 10.0 -45.0 -10.0 -10.0 0.0 0.0 0.0
VAL[Pmin/0]: 220.0 20.0 -115.0 -115.0 -115.0 110.0 -110.0 -110.0
VAL[Dflt/0]: 220.0 20.0 -115.0 -115.0 -115.0 110.0 -110.0 -110.0
VAL[avg/0]: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
VAL[PV/0]: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
VAL[SetP/0]: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Profile[0/0]: 220.0 20.0 -115.0 -115.0 -115.0 110.0 110.0 -110.0
Profile[1/0]: 10.0 10.0 -45.0 -10.0 -10.0 0.0 0.0 0.0
Profile[2/0]: 220.0 20.0 -115.0 -115.0 -115.0 110.0 110.0 -110.0

pump.ini file

The config file pump.ini is located in directory /var/lib/BASIS/pump
and follow the typical ini file syntax described e.g. here:

https://en.wikipedia.org/wiki/INI_file

pls. use each section name only once

DEFAULT

DEFAULT section

part SMTP

Example:
[DEFAULT]
SMTP_SERVER=smtphost.yourdomain.com:587
SMTP_FromAdr=pump@yourdomain.com
SMTP_ToAdr=admin@yourdomain.com
SMTP_USER=userauth
SMTP_PWD=userpwd

SMTP_SERVER

set smtp server for outgoing emails

SMTP_SERVER=<fqdn|ip-addr>[:<port>]

Parameter:
fqdn:       fully qualified hostname or IP Address

port:       smtp communication port (e.g. 25, 587), can be omitted

SMTP_FromAdr

set smtp sender address

SMTP_FromAdr=<email>

SMTP_FromAdr

set smtp recipient address

SMTP_ToAdr=<email>

SMTP_USER

set smtp authorization username

SMTP_USER=<string>

SMTP_Pwd

set smtp authorization password

SMTP_Pwd=<string>

part WLAN

Example:

[DEFAULT]
WLAN_CNTRY=DE
WLAN_SSID=yourWLANssid
WLAN_PSK=yourWLANpassword
WLAN_OPTS=proto=WPA2;key_mgmt=WPA-PSK
WLAN_CFG=1

WLAN_CNTRY

set WLAN country. Important to comply with local regulations.

WLAN_CNTRY=<XX>

Parameter:
XX:         two letter country code (e.g. DE, SE, US, UK ...)

WLAN_SSID

set WLAN ssid

WLAN_SSID=<ssid>

Parameter:
ssid:       WLAN ssid name

WLAN_PSK

set WLAN password

WLAN_PSK=<pwd>

Parameter:
pwd:        WLAN password

WLAN_CFG

set WLAN connect config

WLAN_CFG=<1|2>

Parameter:
1:          connect to open WLAN
2:          connect to WLAN, given by WLAN_SSID and WLAN_PSK

WLAN_OPTS

set further WLAN wpa_supplicant options separated by ;

WLAN_OPTS=<key1=val1;{keyn=valn}>

Parameter:
key:        WLAN option key
val:        WLAN value

Detailed information for wpa_supplicant.conf can be found here:
https://linux.die.net/man/5/wpa_supplicant.conf

part hotspot

Example:

[DEFAULT]
HOSTAPD_SSID=wlan-abcded
HOSTAPD_PSK=yourWLANhotpotPassword
HOSTAPD_CHAN=11
HOSTAPD_CFG=1

HOSTAPD_SSID

set WLAN hotspot ssid

HOSTAPD_SSID=<ssid>

Parameter:
ssid:       WLAN hotpot ssid name (default: wlan-<MAC_Addr3Byte>)

HOSTAPD_PSK

set WLAN hotspot password

HOSTAPD_PSK=<pwd>

Parameter:
pwd:        WLAN hotpot password (default: hallohallo)

HOSTAPD_CFG

set hotpsot on or off, change requires reboot

HOSTAPD_CFG=<0|1>

Parameter:
0:          hotpot disable
1:          hotpot enable (default)

reboot required

part WEBSRV

Example:

[DEFAULT]
WEBSRV_Dir=/var/lib/BASIS/pump/www
WEBSRV_ThreadSpareCount=0
WEBSRV_PORT=8080
WEBSRV_PORTS=8443
WEBSRV_UseAuthType=1
WEBSRV_Start=1

WEBSRV_Dir

set webserver root directory

WEBSRV_Dir=<dir>

Parameter:
dir:        directory (default: /var/lib/BASIS/pump/www )

WEBSRV_Domain

WEBSRV_Domain=<domain>

Parameter:
domain:     domain name for Let's encrypt certificate

WEBSRV_KeyPWD

WEBSRV_KeyPWD=<pwd>

Parameter:
pwd:        decrypt pwd for certificate file (default: <no password>)

WEBSRV_PORT

set webgui http port

WEBSRV_PORT=<integer>

Parameter:
integer:    1-65535 (default: 8080)

WEBSRV_PORTS

set webgui https port

WEBSRV_PORTS=<integer>

Parameter:
integer:    1-65535 (default: 8443)

WEBSRV_Start

webgui enable/disable

WEBSRV_Start=<0|1>

Parameter:
0:          disable
1:          enable (default)

WEBSRV_ThreadSpareCount

set webgui thread spare count

WEBSRV_ThreadSpareCount=<smallint>

Parameter:
smallint:   0-127 (default: 0)

WEBSRV_UseAuthType

set webgui authorization mode

WEBSRV_UseAuthType=<0|1>

Parameter:
0:          off
1:          Basic auth (default)

HMENU_DEFAULT

HMENU_DEFAULT section

Example:

[HMENU_DEFAULT]
WEBROOTDIR=/var/lib/BASIS/pump/www
BUTTONBEEP=0
TOOLTIP=1
PAGELOCK=0

WEBROOTDIR

set webgui root directory

WEBROOTDIR=<dir>

Parameter:
dir:        directory (default: /var/lib/BASIS/pump/www )

BUTTONBEEP

set button beep on or off

BUTTONBEEP=<0|1>

Parameter:
0:          off (default)
1:          on

TOOLTIP

set tooltips on or off

TOOLTIP=<0|1>

Parameter:
0:          off
1:          on (default)

PAGELOCK

set pagelock on or off

PAGELOCK=<0|1>

Parameter:
0:          off (default)
1:          on

HOME

HOME section

Register contact information. For future use (Certificate creation, support …)

Example:

[HOME]
LAT_LON_ELE=52.517,13.367,37
COUNTRYSHORT=DE
COMPANY=Your Company Name
DEPT=Organization Unit
TITLE=Prof. Dr.
LASTNAME=Familyname
FIRSTNAME=Firstname
STREET=Streetname 123
ZIP=10115
CITY=Berlin
COUNTRY=Germany
PHONE1=+49 30 1234567 -89
FAX=+49 30 1234567 -99
EMAIL=youremail@yourdomain.com
REMARK=your message to us

SENSOR

SENSOR section

Example:

[SENSOR]
AMS_DBAO=3

AMS_DBAO

set sync time mux for AMS sensors

AMS_DBAO=<muxnum>

Parameter:
muxnum:     1-5 (default: 3)

PUMP

PUMP section

part Pressure

Example:

[PUMP]                  # section required
P8_ENAB=0               # reservoir 8 disabled
P6_MEASSUREMODE=1       # set reservoir 6 to meassure mode

SIO=/dev/ttyUSB0@9600   # set baudrate to 9600 for device ttyUSB0

P_CLEAN

set CLEAN pressure to <float> mbar

P_CLEAN=<float>

Parameter:
float:      CLEAN pressure in mbar (default: 300 mbar)
Example:
P_CLEAN=321.0   # set cleaning for all reservoirs to 321.0 mbar 

P_INIT

set INIT pressure to <float> mbar

P_INIT=<float>

Parameter:
float:      INIT pressure in mbar (default: 220 mbar)
Example:
P_INIT=221.0    # set init pressure for all reservoirs to 221.0 mbar 

P_MAX

set maximal pressure to <float> mbar

P_MAX=<float>

Parameter:
float:      max. pressure in mbar (default: 500 mbar)
Example:
P_MAX=450.0     # set max. pressure for all reservoirs to 450.0 mbar 

P_OKVAR

treat global pressure deviation around optimal setpoint +- <float> mbar as ok value.

P_OKVAR=<float>

Parameter:
float:      pressure in mbar (default: 0.5 mbar)
Example:
P_OKVAR=1.0     # default for all reservoirs +- 1 mbar

P<num>_<runmode>_OKVAR

treat specific pressure deviation around optimal setpoint +- <float> mbar as ok value.

P<num>_<runmode>_OKVAR=<float>

Parameter:
num:        1-8

runmode:    00: STBY    01: OPER 

float:      pressure in mbar (default: 0.5 mbar)
Example:
                    # overwrite reservoir 1 default values
P1_00_OKVAR=1.0     # STBY: +- 1.0 mbar
P1_01_OKVAR=1.5     # OPER: +- 1.5 mbar

P<num>_ENAB

reservoir <num> enable or disable

P<num>_ENAB=<0|1>

Parameter:
num:        1-8

0:          reservoir disable 
1:          reservoir enable (default)
Example:
P6_ENAB=0   # disable reservoir 6

P<num>_MEASSUREMODE

set reservoir <num> to meassure mode

P<num>_MEASSUREMODE=<0|1>

Parameter:
num:        1-8

0:          meassure mode disable (default)
1:          meassure mode enable
Example:
P6_MEASSUREMODE=1   # set reservoir 6 to meassure mode

P<num>_MBAR

set OPER pressure for reservoir <num> to <float> mbar

P<num>_MBAR=<float>

Parameter:
num:        1-8

float:      OPER pressure in mbar
Example:
P1_MBAR=123.4   # set OPER pressure for reservoir 1 to 123.4 mbar 

P<num>_STBY

set STBY pressure for reservoir <num> to <float> mbar

P<num>_STBY=<float>

Parameter:
num:        1-8

float:      STBY pressure in mbar
Example:
P1_STBY=12.3    # set standby pressure for reservoir 1 to 12.3 mbar 

P<num>_<runmode>_VUSE

use reservoir <num> valve for rapid lowering pressure.
use valve if pressure difference is more or equal <float> mbar

P<num>_<runmode>_VUSE=<float>

Parameter:
reservoir:  1-8

runmode:    00: STBY    01: OPER 

float:      pressure in mbar (default: 5.0 mbar)
Example:
P1_00_VUSE=1.5      # use valve 1, if STBY pressure difference>=1.5
P1_01_VUSE=3.5      # use valve 1, if OPER pressure difference>=3.5

part setup HW

OLED_ScreenSaver

start screen saver for OLED display in seconds

OLED_ScreenSaver=<timeout>

Parameter:
timeout:    0-65535 (0: off     default: 120 sec)

SIO

set baudrate for serial port

SIO=<devpath>@<baudrate>

Parameter:
devpath:    /dev/serial0 
            /dev/serial1
            /dev/ttyUSB[0|1|2|3]

baudrate:   integer         (eg: 9600 115200 ...)

/dev/serial0 is already initialized at startup with 115200

VALVEPOL

set valve polarity for port A and B

VALVEPOL<A|B>=<byte>

Parameter:
A:          portA   GPA7-0: MF6-1 CV1,2 (default: 0x00) 
B:          portB   GPB7-0: CV3 RV1-7   (default: 0x7f)
byte:       0-0xff  bit 0=nc - normally closed; 1=no - normally open
Example:
VALVEPOLA=0x00      # Manifold 6-1 MF; CV 1&2: normally closed  
VALVEPOLB=0x7f      # CleanValve 3 CV: nc; RV1-7: no    

WDOG

enable/disable HW Watchdog

WDOG=<0|1>

Parameter:
0:          disable watchdog
1:          enable  watchdog (default retrigger time 15 sec)

part setup PID

PID<num>_<runmode>_00_KS

PID<num>_<runmode>_00_KS=<float>

num:        1-8

runmode:    00: STBY    01: OPER

float:      (default: 1.0)

PID<num>_<runmode>_00_MAX

PID<num>_<runmode>_00_MAX=<float>

num:        1-8

runmode:    00: STBY    01: OPER

float:      (default: 500.0)

PID<num>_<runmode>_00_MIN

PID<num>_<runmode>_00_MIN=<float>

num:        1-8

runmode:    00: STBY    01: OPER

float:      (default: -500.0)

PID<num>_<runmode>_00_SelfTuning

PID<num>_<runmode>_00_SelfTuning=<0|1>

num:        1-8

runmode:    00: STBY    01: OPER

0:          disable SelfTuning
1:          enable SelfTuning

PID<num>_<runmode>_VALVEUSE

use valve for fast pressure adjust

PID<num>_<runmode>_VALVEUSE=<0|1>

Parameter:
num:        1-8

runmode:    00: STBY    01: OPER 

0:          do not use valve for pressure adjust
1:          use valve
Example:
PID1_00_VALVEUSE=0  # do not use valve in STBY mode 
PID1_01_VALVEUSE=1  # use valve in OPER mode for fast pressure adjust 

part setup OEM

SOLUTION

set reservoir fill state for bar chart

SOLUTION<num>_SETUP=<desc>,<unit>,<fillstate_ml>, ... ,<fsamax_perc>

Parameter:
num:                1-8
desc:               string20    (default: Solution<num>)
unit:               string20    (default: ml)
fillstate:          float       (default: 0)
fillstate_max_ml_:  float       (default: 500)
discharge_per_sec:  float       (default: 4)
fsamin_perc:        float       (default: 0)
fsalow_perc:        float       (default: 0.25)
fsaopts_perc:       float       (default: 0.85)
fsahigh_perc:       float       (default: 0.66)
fsamax_perc:        float       (default: 1.00)
Example:
SOLUTION1_Setup=SolRED,ml,0,500,4,0,0.20,0.80,0.6,1 
SOLUTION2_Setup=,,0,250,2.2 

SYMDESC

set alternate names permanent for parser symbols.
Alternate name will appear in WEBgui and can be used as macro command.

SYMDESC<num>=<parsersym>,<altname1>[,<altname2>]

Parameter:
num:        0-99    (has to be unique)
altname1:   str20   
altname2:   str20   (optional)
str20:      string with max. 20 characters
parsersym:  PumpsOff,Clean,AllOff,Stby,Init,Oper,Normal,Evac,
            SolALLOff,Solution1,Solution2,Solution3,Solution4,
            Solution5,Solution6,Solution7,Solution8,Solution9,
            SetVswitch,SetPAll,SetPON,SetPOFF,SetVRecirc,
            SetVRecirc2,SetVRecirc1,SetP6,SetP7,SetP8
Example:
SYMDESC1=Solution1,Sol1,SolA1  
SYMDESC2=Solution2,Sol2  
SYMDESC3=Solution3,Sol3,SolA3  
SYMDESC5=PumpsOff,PumpenAUS