Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Options

Hierarchy

Index

Properties

Optional agentOptions

agentOptions: AgentOptions | AgentOptions

An object for specifying options for the agent to be used for the requests (See Node.js API doc).
Defaults to { keepAlive: true, maxSockets: 1 }.
If you specify additional options, they will be merged with the defaults.
If you specify an option that has a default value, your value will override the default.

Optional getOptions

getOptions: RequestOptions | https.RequestOptions

An object for specifying request options for http[s].request (See Node.js API doc).
Defaults to { rejectUnauthorized: false } in case of https to accept self-signed certificates, {} otherwise.
If you specify additional options, they will be merged with the defaults.
If you specify an option that has a default value, your value will override the default.
If you specify a timeout, it will work as you would expect (i. e. throw an Error when a timeout occurs).

password

password: string

Must be supplied if you have enabled Basic Auth for the respective FHEMWEB device.

Optional retryIntervals

retryIntervals: [][]

An array whose elements are arrays containing an error code and a retry interval in millis.
If FhemClient.expirationPeriod property has been set to a positive value and a request fails, then, if the respective error code has a positive retry interval, it will be reissued after the specified time until it succeeds or expires.
Some errors already have a default retry interval; you can use this parameter to override defaults and to set retry intervals for errors that do not have a default one.

Example (the defaults)

[
    ['EFHEMCL_RES', 500],
    ['EFHEMCL_ABRT', 500],
    ['EFHEMCL_TIMEDOUT', 1000],
    ['EFHEMCL_CONNREFUSED', 10000],
    ['EFHEMCL_NETUNREACH', 10000]
]

url

url: string

The URL of the desired FHEMWEB device: 'http[s]://<host>:<port>/webname'.

username

username: string

Must be supplied if you have enabled Basic Auth for the respective FHEMWEB device.

Generated using TypeDoc