Class CommandService

The CommandService uses the /Command.htm endpoint of the ProCon.IP pool controller to turn on manual dosage for a given amount of time/seconds.

Hierarchy (view full)

Constructors

Properties

_endpoint: string = '/Command.htm'

Specific service endpoint.

A path relative to the IServiceConfig.controllerUrl.

_method: Method = 'get'

HTTP request method for this specific service endpoint. See: axios/Method

_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

Custom headers can be defined in form of a key value pair.

this._requestHeaders["Cache-Control"] = "no-cache";
log: ILogger

Logger which will be used for all logging events.

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    Returns AxiosRequestConfig<any>

  • get url(): string
  • Get the webservice url (joined base url and endpoint).

    Returns string

    URL string (joined base url and endpoint).

Methods

  • Set manuel chlorine dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

    Returns Promise<number>

  • Set the desired relay state.

    Parameters

    • dosageTarget: DosageTarget

      Dosage target (0 = chlorine, 1 = pH minus, 2 = pH plus).

    • dosageDuration: number

      Desired duration in seconds.

    Returns Promise<number>

  • Set manuel pH minus dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

    Returns Promise<number>

  • Set manuel pH plus dosage for given amount of time in seconds.

    Parameters

    • dosageTime: number

      Dosage duration in seconds.

    Returns Promise<number>