diff --git a/README.md b/README.md
index ab95f2b..682ba00 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,13 @@
-
+
- # Homebridge Hubspace
+ # Homebridge Home Depot Hubspace
-
-
-
-
-
-
+
+
@@ -20,7 +16,8 @@
Hubspace is a platform for range of devices sold at HomeDepot. This plugin tries to integrate as many of these devices so that you can control them from HomeKit.
# Disclaimer
-I do not own any rights to Hubspace. Any work published here is solely for my own convenience. I am not making any guarantees about the code or products referenced here.
+I do not own any rights to Hubspace. Any work published here is solely for my own convenience. I am not making any guarantees about the code or products referenced here. This was forked by the
+work done by sajmonr. Original repo can be found here
# Tested products
Below you can find a table of products that have been tested with this plugin. Some products share similarities among one another (e.g. lights), however, that does not guarantee that they will all work.
@@ -31,6 +28,7 @@ Not all features for all products are implemented. Please see the functions belo
| --- | --- |
| [Universal Smart Wi-Fi 4-Speed Ceiling Fan](https://www.homedepot.com/p/Hampton-Bay-Universal-Smart-Wi-Fi-4-Speed-Ceiling-Fan-White-Remote-Control-For-Use-Only-With-AC-Motor-Fans-Powered-by-Hubspace-76278/315169181?) | - Light on/off
- Fan on/off
- Light brightness
- Fan speed
|
| [Defiant Smart Plug](https://www.homedepot.com/p/Defiant-15-Amp-120-Volt-Smart-Wi-Fi-Bluetooth-Plug-with-1-Outlet-Powered-by-Hubspace-HPPA11AWB/315636834) | |
+| [Commercial Electric Single Pole Switch](https://www.homedepot.com/p/Commercial-Electric-15-Amp-Single-Pole-White-Smart-Light-Switch-with-Wi-Fi-and-Bluetooth-Technology-Powered-by-Hubspace-1-Pack-HPSA11CWB/320313682) | |
# Development
There is no official documentation for Hubspace products. Under the hood they use Afero cloud as the mechanism that controls the products. Any functionality here is gained by experimenting with various functions of the devices. Afero provides simple explanation of [their APIs](https://developer.afero.io/API-DeviceEndpoints), however, this is in no way comprehensive.
@@ -77,4 +75,4 @@ Your payload should include the following fields.
| username | YOUR_USERNAME |
| password | YOUR_PASSWORD |
-Once you receive the token you can make request to Afero with it to investigate the devices and commands.
\ No newline at end of file
+Once you receive the token you can make request to Afero with it to investigate the devices and commands.
diff --git a/package.json b/package.json
index 8b7dff8..72698a1 100644
--- a/package.json
+++ b/package.json
@@ -1,17 +1,17 @@
{
- "displayName": "Homebridge Hubspace",
- "name": "homebridge-hubspace",
- "version": "2.0.0-preview3",
- "description": "Homebridge plugin for controlling Hubspace accessories.",
- "homepage": "https://github.com/sajmonr/homebridge-hubspace#readme",
- "author": "Adam Simonicek",
+ "displayName": "Homebridge Hubspace by Home Depot",
+ "name": "homebridge-home-depot-hubspace",
+ "version": "1.0.0",
+ "description": "Homebridge plugin for controlling Home Depot Hubspace accessories.",
+ "homepage": "https://github.com/fiestachickens/homebridge-home-depot-hubspace#readme",
+ "author": "Adam Simonicek - Forked by Cyrus Keck",
"license": "Apache-2.0",
"repository": {
"type": "git",
- "url": "https://github.com/sajmonr/homebridge-hubspace.git"
+ "url": "https://github.com/fiestachickens/homebridge-home-depot-hubspace.git"
},
"bugs": {
- "url": "https://github.com/sajmonr/homebridge-hubspace/issues"
+ "url": "https://github.com/fiestachickens/homebridge-home-depot-hubspace/issues"
},
"engines": {
"node": ">=14.18.1",
diff --git a/src/hubspace-devices.ts b/src/hubspace-devices.ts
index 1537add..fd1d8be 100644
--- a/src/hubspace-devices.ts
+++ b/src/hubspace-devices.ts
@@ -51,5 +51,15 @@ export const Devices: DeviceDef[] = [
characteristic: FunctionCharacteristic.Power
}
]
+ },
+ {
+ deviceClass: 'switch',
+ deviceType: DeviceType.Switch,
+ functions: [
+ {
+ functionClass: 'power',
+ characteristic: FunctionCharacteristic.Power
+ }
+ ]
}
-];
\ No newline at end of file
+];
diff --git a/src/models/device-type.ts b/src/models/device-type.ts
index c4431cf..f932012 100644
--- a/src/models/device-type.ts
+++ b/src/models/device-type.ts
@@ -5,7 +5,8 @@ export enum DeviceType{
None = 'none',
Light = 'light',
Fan = 'fan',
- Outlet = 'power-outlet'
+ Outlet = 'power-outlet',
+ Switch = 'switch'
}
/**
@@ -21,7 +22,9 @@ export function getDeviceTypeForKey(key: string): DeviceType{
return DeviceType.Fan;
case 'power-outlet':
return DeviceType.Outlet;
+ case 'switch':
+ return DeviceType.Switch;
default:
return DeviceType.None;
}
-}
\ No newline at end of file
+}