Skip to content

Commit

Permalink
Remove deprecated networking capabilities
Browse files Browse the repository at this point in the history
Signed-off-by: jsetton <[email protected]>
  • Loading branch information
jsetton committed Feb 27, 2024
1 parent 4257e0f commit 433f0e1
Show file tree
Hide file tree
Showing 31 changed files with 32 additions and 939 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ To configure your server path and credentials, you will need to setup the CloudF
```

2. If updating from ASK CLI v1:
1. Copy relevant settings from `lambda/smarthome/config.js` (ask-cli-v1) to [`ask-resources.json`](ask-resources.json) (ask-cli-v2). If configuring `OpenHABBaseURL`, be aware that it should now point to your server root level and not the rest endpoint. Additionally, move your client certificate to `lambda/ssl` if using that authentication method.
1. Copy relevant settings from `lambda/smarthome/config.js` (ask-cli-v1) to [`ask-resources.json`](ask-resources.json) (ask-cli-v2). If configuring `OpenHABBaseURL`, beware that it should now point to your server root level and not the rest endpoint. Additionally, move your client certificate to `lambda/ssl` if using that authentication method.

2. Create the ASK CLI states file as `.ask/ask-states.json`, adding the skill ID listed in your [Alexa developer console](https://developer.amazon.com/alexa/console/ask). This will prevent duplicate skills from being created in your account.

Expand Down
68 changes: 2 additions & 66 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ The skill connects your openHAB setup through the [myopenHAB.org](http://myopenH
* [Group Endpoint](#group-endpoint)
* [Item State](#item-state)
* [Item Unit of Measurement](#item-unit-of-measurement)
* [Networking Capabilities](#networking-capabilities)
* [Generic Capabilities](#generic-capabilities)
* [Semantic Extensions](#semantic-extensions)
* [Item Configuration](#item-configuration)
Expand All @@ -53,7 +52,6 @@ The skill connects your openHAB setup through the [myopenHAB.org](http://myopenH
* [Camera](#camera-attributes)
* [Door/Window Covering](#cover-attributes)
* [Fan](#fan-attributes)
* [Networking](#networking-attributes)
* [Vacuum](#vacuum-attributes)
* Updated existing capabilities:
* New security [arm state](#armstate) errors handling.
Expand Down Expand Up @@ -312,22 +310,6 @@ Number:Temperature Temperature2 "Temperature" {alexa="CurrentTemperatu
Number:Temperature Temperature3 "Temperature" {alexa="CurrentTemperature"}
```

## Networking Capabilities

To interact with the networking capabilities of a router, such as controlling the network access for a specific device, the [networking attributes](#networking-attributes) are available to configure a representation of a home network and its connected devices.

In order to take advantage of these capabilities, your router must be configured as a [group endpoint](#group-endpoint) based on [`HomeNetwork`](#homenetwork) supported device types. If it doesn't have any other capabilities, it can be an empty group. Likewise, connected devices must be configured based on [`ConnectedDevice`](#connecteddevice) supported device types and metadata parameters.

```xtend
Group Router "Router" {alexa="Router"}
Group Laptop "Laptop" (Router) {alexa="Laptop" [macAddress="00:21:86:B5:6E:10"]}
Switch Access1 "Access" (Laptop) {alexa="NetworkAccess"}
Group Tablet "Tablet" (Router) {alexa="Tablet" [macAddress="00:21:86:B5:6E:11"]}
Switch Access2 "Access" (Tablet) {alexa="NetworkAccess"}
```

<a name="building-block-apis"></a>

## Generic Capabilities
Expand Down Expand Up @@ -561,7 +543,7 @@ Device Types | Supported Attributes | Description
`Washer` | *[`PowerState`](#powerstate)* | A device that cleans clothing.
`WaterHeater` | *[`PowerState`](#powerstate)*, [`TargetTemperature`](#targettemperature), [`CurrentTemperature`](#currenttemperature) | A device that heats water, often consisting of a large tank.
`Wearable`| *[`PowerState`](#powerstate)*, [`BatteryLevel`](#batterylevel), [`NetworkAccess`](#networkaccess) | A network-connected wearable device, such as an Apple Watch, Fitbit, or Samsung Gear.
`Other`| [All attributes](#device-attributes), except [networking](#networking-attributes) and [scenes](#scene-attributes) | An endpoint that doesn't belong to one of the other categories.
`Other`| [All attributes](#device-attributes), except [scenes](#scene-attributes) | An endpoint that doesn't belong to one of the other categories.

## Device Attributes

Expand Down Expand Up @@ -1148,51 +1130,6 @@ Items that represents a color temperature. It is important to note that temperat
* *Alexa, make the `<device name>` whiter.*
* *Alexa, set the `<device name>` cooler.*

### Networking Attributes

#### `HomeNetwork`

Items that represent a network router. This attribute cannot be specified by name. It is automatically added when configuring a [group endpoint](#group-endpoint) as one of the supported [device types](#device-types).

* Supported device types:
* `NetworkHardware`
* `Router`

#### `ConnectedDevice`

Items that represent a network device, such as a computer or mobile phone, connected to a router. This attribute cannot be specified by name. It is automatically added when configuring a [group endpoint](#group-endpoint) as one of the supported [device types](#device-types), that is a member of the group representing the router, as [`HomeNetwork`](#homenetwork), where the device is connected to, and having at least the metadata parameter `macAddress` defined.

* Supported device types:
* `Computer`
* `GameConsole`
* `Laptop`
* `MobilePhone`
* `Tablet`
* `Wearable`
* Supported metadata parameters:
* hostname=`<name>`
* defaults to `N/A`
* macAddress=`<address>`
* formatted as EUI-48 or EUI-64 address with colon or dash separators (e.g. `macAddress="00:21:86:B5:6E:10"`)

#### `NetworkAccess`

Items that represent the internet/network access control of a Wi-Fi/Ethernet connection to a router. This needs to be paired with [`ConnectedDevice`](#connecteddevice). To enable the access control by voice, you will need to select the configured device in your Alexa app, by going to Devices > Wi-Fi Access > Add a device. To limit the control based on voice profiles, turn on the option in the Wi-Fi Access settings.

* Supported item types:
* Switch [ALLOWED="ON", BLOCKED="OFF"]
* Supported metadata parameters:
* inverted=`<boolean>`
* set to true to invert item state
* defaults to false
* Utterance examples:
* *Alexa, pause the Internet for `<device name>`.*
* *Alexa, resume the Wi-Fi for `<device name>`.*
* *Alexa, enable the Internet for `<device name>`.*
* *Alexa, disable the Wi-Fi for `<device name>`.*
* *Alexa, turn on the Internet for `<device name>`.*
* *Alexa, turn off the Wi-Fi for `<device name>`.*

### Scene Attributes

<a name="scenecontroller-scene"></a>
Expand Down Expand Up @@ -1959,7 +1896,7 @@ Items that represent components of a device that can be toggled on or off. Multi

* Alexa will respond with "Sorry something wrong, to control *device* try disabling the skill and re-enabling it from your Alexa app".
* It indicates that Alexa isn't able to control the given device because of an authentication issue.
* To resolve this error, for users that are using the official skill, just disable and re-enable it through the Alexa app. For users that have setup their own custom skill, make sure that the proper credentials were configured in `ask-resources.json`. If running an openHAB 3.x server, make sure that the API Security Implicit User Role setting is enabled.
* To resolve this error, for users that are using the official skill, just disable and re-enable it through the Alexa app. For users that have setup their own custom skill, make sure that the proper credentials were configured in `ask-resources.json`. For openHAB 3.0 and above, make sure that the API Security Implicit User Role setting is enabled.

### Server Not Accessible

Expand Down Expand Up @@ -1992,7 +1929,6 @@ EqualizerController | [`EqualizerBass`](#equalizerbass), [`EqualizerMidrange`](#
LockController | [`LockState`](#lockstate) | `ar-SA`, `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
ModeController | [`Mode`](#mode), [`FanDirection`](#fandirection), [`FanSpeed`](#fanspeed), [`Input`](#input), [`OpenState`](#openstate), [`PositionState`](#positionstate), [`TiltAngle`](#tiltangle), [`ThermostatFan`](#thermostatfan), [`VacuumMode`](#vacuummode) | `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
MotionSensor | [`MotionDetectionState`](#motiondetectionstate) | `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
Networking | [`HomeNetwork`](#homenetwork), [`ConnectedDevice`](#connecteddevice), [`NetworkAccess`](#networkaccess) | `en-US`
PercentageController | [`Percentage`](#percentage) | `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
PlaybackController | [`Playback`](#playback), [`PlaybackStop`](#playbackstop), [`PlaybackStep`](#playbackstep) | `ar-SA`, `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
PlaybackStateReporter | [`Playback`](#playback), [`PlaybackStop`](#playbackstop) | `ar-SA`, `de-DE`, `en-AU`, `en-CA`, `en-GB`, `en-IN`, `en-US`, `es-ES`, `es-MX`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `pt-BR`
Expand Down
2 changes: 1 addition & 1 deletion lambda/alexa/smarthome/capabilities/capability.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default class AlexaCapability {

/**
* Adds property for a given config object
* @param {Object} config [name, component, tag, parameters, item, metadata, settings, groups]
* @param {Object} config [name, component, tag, parameters, item, metadata, settings]
*/
addProperty(config) {
const { name } = config;
Expand Down
3 changes: 0 additions & 3 deletions lambda/alexa/smarthome/capabilities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export { default as InputController } from './inputController.js';
export { default as LockController } from './lockController.js';
export { default as ModeController } from './modeController.js';
export { default as MotionSensor } from './motionSensor.js';
export { default as NetworkingAccessController } from './networkingAccessController.js';
export { default as NetworkingConnectedDevice } from './networkingConnectedDevice.js';
export { default as NetworkingHomeNetworkController } from './networkingHomeNetworkController.js';
export { default as PercentageController } from './percentageController.js';
export { default as PlaybackController } from './playbackController.js';
export { default as PlaybackStateReporter } from './playbackStateReporter.js';
Expand Down
65 changes: 0 additions & 65 deletions lambda/alexa/smarthome/capabilities/networkingAccessController.js

This file was deleted.

75 changes: 0 additions & 75 deletions lambda/alexa/smarthome/capabilities/networkingConnectedDevice.js

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion lambda/alexa/smarthome/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ export default class AlexaAssetCatalog extends AlexaGlobalCatalog {
/**
* Returns custom catalog label values
* This is a temporary solution until Amazon provides the ability to upload our own catalog:
* https://developer.amazon.com/docs/device-apis/resources-and-assets.html#upload-your-own-catalog
* https://developer.amazon.com/docs/device-apis/resources-and-assets.html#upload-catalog
*
* {
* '<assetId>': [
Expand Down
11 changes: 0 additions & 11 deletions lambda/alexa/smarthome/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export const Capability = Object.freeze({
LOCK_CONTROLLER: 'LockController',
MODE_CONTROLLER: 'ModeController',
MOTION_SENSOR: 'MotionSensor',
NETWORKING_ACCESS_CONTROLLER: 'NetworkingAccessController',
NETWORKING_CONNECTED_DEVICE: 'NetworkingConnectedDevice',
NETWORKING_HOME_NETWORK_CONTROLLER: 'NetworkingHomeNetworkController',
PERCENTAGE_CONTROLLER: 'PercentageController',
PLAYBACK_CONTROLLER: 'PlaybackController',
PLAYBACK_STATE_REPORTER: 'PlaybackStateReporter',
Expand Down Expand Up @@ -68,9 +65,6 @@ export const Interface = Object.freeze({
ALEXA_LOCK_CONTROLLER: 'Alexa.LockController',
ALEXA_MODE_CONTROLLER: 'Alexa.ModeController',
ALEXA_MOTION_SENSOR: 'Alexa.MotionSensor',
ALEXA_NETWORKING_ACCESS_CONTROLLER: 'Alexa.Networking.AccessController',
ALEXA_NETWORKING_CONNECTED_DEVICE: 'Alexa.Networking.ConnectedDevice',
ALEXA_NETWORKING_HOME_NETWORK_CONTROLLER: 'Alexa.Networking.HomeNetworkController',
ALEXA_PERCENTAGE_CONTROLLER: 'Alexa.PercentageController',
ALEXA_PLAYBACK_CONTROLLER: 'Alexa.PlaybackController',
ALEXA_PLAYBACK_STATE_REPORTER: 'Alexa.PlaybackStateReporter',
Expand Down Expand Up @@ -102,7 +96,6 @@ export const Property = Object.freeze({
CHANNEL_STEP: 'channelStep',
COLOR: 'color',
COLOR_TEMPERATURE: 'colorTemperatureInKelvin',
CONNECTED_DEVICE: 'connectedDevice',
CONNECTIVITY: 'connectivity',
DETECTION_STATE: 'detectionState',
EQUALIZER_BANDS: 'bands',
Expand All @@ -113,7 +106,6 @@ export const Property = Object.freeze({
LOWER_SETPOINT: 'lowerSetpoint',
MODE: 'mode',
MUTED: 'muted',
NETWORK_ACCESS: 'networkAccess',
OBSTACLE_ALERT: 'obstacleAlert',
PERCENTAGE: 'percentage',
PLAYBACK: 'playback',
Expand Down Expand Up @@ -148,15 +140,12 @@ export const Parameter = Object.freeze({
CAPABILITY_NAMES: 'capabilityNames',
CHANNEL_MAPPINGS: 'channelMappings',
COMFORT_RANGE: 'comfortRange',
CONNECTED_TO: 'connectedTo',
DEFAULT_LEVEL: 'defaultLevel',
DEVICE_NAME: 'deviceName',
EXIT_DELAY: 'exitDelay',
HOSTNAME: 'hostname',
INCREMENT: 'increment',
INVERTED: 'inverted',
LANGUAGE: 'language',
MAC_ADDRESS: 'macAddress',
NON_CONTROLLABLE: 'nonControllable',
ORDERED: 'ordered',
PASSWORD: 'password',
Expand Down
1 change: 0 additions & 1 deletion lambda/alexa/smarthome/device/attributes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export { default as Mode } from './mode.js';
export { default as MotionDetectionState } from './motionDetectionState.js';
export { default as MuteState } from './muteState.js';
export { default as MuteStep } from './muteStep.js';
export { default as NetworkAccess } from './networkAccess.js';
export { default as ObstacleAlert } from './obstacleAlert.js';
export { default as OpenState } from './openState.js';
export { default as Percentage } from './percentage.js';
Expand Down
Loading

0 comments on commit 433f0e1

Please sign in to comment.