Wi-Fi

getState([, propertyNames])

Declaration

hmkit.commands.WiFi.getState()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Returns

WiFiResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.getState(),
  accessCertificate
);

WiFiResponse

Parameters

status(Object)
data.value

(String) (enum)

timestamp

(Date)

networkConnected(Object)
data.value

(String) (enum)

timestamp

(Date)

networkSSID(Object)
data.value

(String) The network SSID

timestamp

(Date)

networkSecurity(Object)
data.value

(String) (enum)

timestamp

(Date)

Example

{
  "status": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "enabled"
      }
    }
  },
  "networkConnected": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "connected"
      }
    }
  },
  "networkSSID": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "HOME"
      }
    }
  },
  "networkSecurity": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "wpa2_personal"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.WiFi.getAvailability()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.getAvailability(['status']),
  accessCertificate
);

Response

Parameters

availability(Object)
updateRate.value

(String) enum

rateLimit.value

(Number)

rateLimit.unit

(String)

appliesPer.value

(String)

Discussion

The response contains an availability object for each property, as shown in the example

Example

{
  "status": {
    "availability": {
      "updateRate": {
        "value": "trip_high"
      },
      "rateLimit": {
        "value": 64,
        "unit": "hertz"
      },
      "appliesPer": {
        "value": "vehicle"
      }
    }
  }
}

connectToNetwork({ networkSSID, networkSecurity, password })

Parameters

networkSSID

(String) The network SSID

networkSecurity

(String) (enum)

password

(String) The network password

Example

hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.connectToNetwork({
    "networkSSID": "HOME",
    "networkSecurity": "wpa2_personal",
    "password": "great_secret12"
  }),
  accessCertificate
);

forgetNetwork({ networkSSID })

Parameters

networkSSID

(String) The network SSID

Example

hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.forgetNetwork({
    "networkSSID": "HOME"
  }),
  accessCertificate
);

enableDisableWiFi({ status })

Parameters

status

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.WiFi.enableDisableWiFi({
    "status": "enabled"
  }),
  accessCertificate
);