Class: Nomiku

Nomiku

new Nomiku()

Creates a new Nomiku adapter
Properties:
Name Type Description
STATE_ON String The value to indicate that a unit is "ON"
STATE_OFF String The value to indicate that a unit is "OFF"
STATE_OFFLINE String The value to indicate that a unit is "OFFLINE"
Source:

Methods

auth(email, password, cb)

Authenticates and grabs an access token
Parameters:
Name Type Description
email String email to login to the Nomiku API with
password String password for the login
cb authenticateCallback The callback that handles the response.
Source:

CtoF(c) → {Number}

Converts temperatures in Celcius to Farenheight
Parameters:
Name Type Description
c String The temp value in degrees Celcius
Source:
Returns:
The converted temperature in Farenheight
Type
Number

debug(arg)

Manually sets if debugging is on or off
Parameters:
Name Type Description
arg Boolean The future state of the debugger's on state
Source:

FtoC(f) → {Number}

Converts temperatures in Farenheight to Celcius
Parameters:
Name Type Description
f String The temp value in degrees Farenheight
Source:
Returns:
The converted temperature in Celcius
Type
Number

get(variableName, cb)

Grabs an arbitrary variable value
Parameters:
Name Type Description
variableName String the variable name to grab
cb getSetCallback The callback that handles the response.
Source:

getDevices(email, password, cb)

Authenticates and grabs an access token
Parameters:
Name Type Description
email String email to login to the Nomiku API with
password String password for the login
cb authenticateCallback The callback that handles the response.
Source:

getReceipeID(cb)

Grabs the most recent recipe ID
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

getSetPoint(cb)

Grabs the most recent set point temperature in Celcius
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

getState(cb)

Grabs the most recent state (0 = off, 1 = on, -1 = offline)
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

getTemp(cb)

Grabs the most recent temperature in Celcius
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

getToken() → {String}

Returns the current apiToken
Source:
Returns:
The current apiToken / access token
Type
String

getVersion(cb)

Grabs the most recent version
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

set(variableName, value, cb)

Sets an arbitrary variable value
Parameters:
Name Type Description
variableName String the variable name to set
value String the value to set the variable to
cb getSetCallback The callback that handles the response.
Source:

setDebug(arg)

Manually sets if debugging is on or off
Parameters:
Name Type Description
arg Boolean The future state of the debugger's on state
Source:

setDeviceID(id) → {Boolean}

Manually sets the device ID
Parameters:
Name Type Description
id String the device ID to use
Source:
Returns:
true if a id is provided. False otherwise
Type
Boolean

setSetPoint(cb)

Sets the current temperature set point in Celcius of the device
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

setState(cb)

Sets the current state of the device
Parameters:
Name Type Description
cb getSetCallback The callback that handles the response.
Source:

setToken(apiToken) → {Boolean}

Manually sets a token
Parameters:
Name Type Description
apiToken String the API token to use
Source:
Returns:
true if a token is provided. False otherwise
Type
Boolean

setUserID(id) → {Boolean}

Manually sets a userID
Parameters:
Name Type Description
id String the user ID to use
Source:
Returns:
true if a id is provided. False otherwise
Type
Boolean

Type Definitions

authenticateCallback(error)

Parameters:
Name Type Description
error Boolean | object False if no error occured; an error obejct if an error did occur
Source:

getSetCallback(error, value)

Parameters:
Name Type Description
error Boolean | object False if no error occured; an error obejct if an error did occur
value String the value returned from the get request if an error did not occur
Source: