homebridge-kasa 8.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +152 -0
- package/config.schema.json +229 -0
- package/lib/accessory-information.d.ts +4 -0
- package/lib/accessory-information.d.ts.map +1 -0
- package/lib/accessory-information.js +26 -0
- package/lib/accessory-information.js.map +1 -0
- package/lib/characteristics/amperes.d.ts +4 -0
- package/lib/characteristics/amperes.d.ts.map +1 -0
- package/lib/characteristics/amperes.js +15 -0
- package/lib/characteristics/amperes.js.map +1 -0
- package/lib/characteristics/default-characteristic.d.ts +3 -0
- package/lib/characteristics/default-characteristic.d.ts.map +1 -0
- package/lib/characteristics/default-characteristic.js +19 -0
- package/lib/characteristics/default-characteristic.js.map +1 -0
- package/lib/characteristics/index.d.ts +3 -0
- package/lib/characteristics/index.d.ts.map +1 -0
- package/lib/characteristics/index.js +25 -0
- package/lib/characteristics/index.js.map +1 -0
- package/lib/characteristics/kilowatt-hours.d.ts +4 -0
- package/lib/characteristics/kilowatt-hours.d.ts.map +1 -0
- package/lib/characteristics/kilowatt-hours.js +15 -0
- package/lib/characteristics/kilowatt-hours.js.map +1 -0
- package/lib/characteristics/kilowatt-volt-ampere-hour.d.ts +4 -0
- package/lib/characteristics/kilowatt-volt-ampere-hour.d.ts.map +1 -0
- package/lib/characteristics/kilowatt-volt-ampere-hour.js +16 -0
- package/lib/characteristics/kilowatt-volt-ampere-hour.js.map +1 -0
- package/lib/characteristics/types.d.ts +7 -0
- package/lib/characteristics/types.d.ts.map +1 -0
- package/lib/characteristics/types.js +4 -0
- package/lib/characteristics/types.js.map +1 -0
- package/lib/characteristics/volt-amperes.d.ts +4 -0
- package/lib/characteristics/volt-amperes.d.ts.map +1 -0
- package/lib/characteristics/volt-amperes.js +15 -0
- package/lib/characteristics/volt-amperes.js.map +1 -0
- package/lib/characteristics/volts.d.ts +4 -0
- package/lib/characteristics/volts.d.ts.map +1 -0
- package/lib/characteristics/volts.js +15 -0
- package/lib/characteristics/volts.js.map +1 -0
- package/lib/characteristics/watts.d.ts +4 -0
- package/lib/characteristics/watts.d.ts.map +1 -0
- package/lib/characteristics/watts.js +15 -0
- package/lib/characteristics/watts.js.map +1 -0
- package/lib/config.d.ts +146 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +138 -0
- package/lib/config.js.map +1 -0
- package/lib/homekit-device/bulb.d.ts +41 -0
- package/lib/homekit-device/bulb.d.ts.map +1 -0
- package/lib/homekit-device/bulb.js +307 -0
- package/lib/homekit-device/bulb.js.map +1 -0
- package/lib/homekit-device/create.d.ts +11 -0
- package/lib/homekit-device/create.d.ts.map +1 -0
- package/lib/homekit-device/create.js +18 -0
- package/lib/homekit-device/create.js.map +1 -0
- package/lib/homekit-device/index.d.ts +33 -0
- package/lib/homekit-device/index.d.ts.map +1 -0
- package/lib/homekit-device/index.js +120 -0
- package/lib/homekit-device/index.js.map +1 -0
- package/lib/homekit-device/plug.d.ts +43 -0
- package/lib/homekit-device/plug.d.ts.map +1 -0
- package/lib/homekit-device/plug.js +244 -0
- package/lib/homekit-device/plug.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/platform.d.ts +54 -0
- package/lib/platform.d.ts.map +1 -0
- package/lib/platform.js +221 -0
- package/lib/platform.js.map +1 -0
- package/lib/settings.d.ts +3 -0
- package/lib/settings.d.ts.map +1 -0
- package/lib/settings.js +6 -0
- package/lib/settings.js.map +1 -0
- package/lib/utils.d.ts +29 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +129 -0
- package/lib/utils.js.map +1 -0
- package/package.json +107 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Donald Patrick Seal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<!-- markdownlint-disable MD033 -->
|
|
2
|
+
|
|
3
|
+
# homebridge-tplink-smarthome
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/homebridge-tplink-smarthome)
|
|
6
|
+
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
7
|
+
|
|
8
|
+
TPLink Smart Home Plugin for [Homebridge](https://github.com/nfarina/homebridge). (formerly `homebridge-hs100`)
|
|
9
|
+
|
|
10
|
+
## Looking for Maintainer
|
|
11
|
+
|
|
12
|
+
I haven't actively used Homebridge or TP-Link devices in several years and lack the time and resources to test or maintain this project properly.
|
|
13
|
+
|
|
14
|
+
I'm open to transferring repository ownership to an individual or organization with a strong track record in open-source contributions. Alternatively, anyone is welcome to fork the project under the MIT license. If you maintain an active fork, feel free to reach out so I can add a link here for others to find it.
|
|
15
|
+
|
|
16
|
+
Please see [this discussion](https://github.com/plasticrake/homebridge-tplink-smarthome/discussions/380).
|
|
17
|
+
|
|
18
|
+
## Models Supported
|
|
19
|
+
|
|
20
|
+
- **Plugs:** EP25, EP40, HS100, HS103, HS105, HS107, HS110, HS300, KP105, KP115, KP303, KP400
|
|
21
|
+
- **Switches:** ES20M, HS200, HS210, HS220, HS230
|
|
22
|
+
- **Bulbs:** KL50, KL120, KL125, LB100, LB110, LB120, LB130, LB200, LB230
|
|
23
|
+
- **Lightstrips:** KL400, KL430
|
|
24
|
+
|
|
25
|
+
More models may be supported than listed. If you have another model working please let me know so I can add here.
|
|
26
|
+
|
|
27
|
+
**Tapo devices are not supported and are out of scope with this plugin.**
|
|
28
|
+
|
|
29
|
+
## HomeKit
|
|
30
|
+
|
|
31
|
+
| Model | Service | Characteristics |
|
|
32
|
+
| ----------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| HS100, HS103, HS105, HS107, KP105, KP303, KP400 | Outlet | On<br/>OutletInUse (based on On state) |
|
|
34
|
+
| HS110, HS300, KP115 | Outlet | On<br/>OutletInUse (based on energy monitoring)<br/>Volts (Custom)<br/>Amperes (Custom)<br/>Watts (Custom)<br/>VoltAmperes (Custom)<br/>KilowattHours (Custom)<br/>KilowattVoltAmpereHour (Custom) |
|
|
35
|
+
| EP25, EP40 | Outlet | On<br/>OutletInUse (based on On state) |
|
|
36
|
+
| HS200, HS210 | Switch | On |
|
|
37
|
+
| HS220, HS230 | Lightbulb | On<br/>Brightness |
|
|
38
|
+
| KL50, LB100, LB110, LB200 | Lightbulb | On<br/>Brightness<br/>Watts (Custom) |
|
|
39
|
+
| LB120, KL120 | Lightbulb | On<br/>Brightness<br/>ColorTemperature<br/>Watts (Custom) |
|
|
40
|
+
| KL125, KL400, KL430, LB130, LB230 | Lightbulb | On<br/>Brightness<br/>ColorTemperature<br/>Hue<br/>Saturation<br/>Watts (Custom) |
|
|
41
|
+
| ES20M | Lightbulb | On<br/>Brightness |
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
### Manual Installation
|
|
46
|
+
|
|
47
|
+
1. **Node v18 or greater is required.** Check by running: `node --version`
|
|
48
|
+
2. Install Homebridge: ([instructions](https://github.com/homebridge/homebridge#installation))
|
|
49
|
+
3. **Homebridge v1.6.0 or greater is required.** Check by running `homebridge --version`
|
|
50
|
+
4. Install this plugin using: `npm install -g homebridge-tplink-smarthome`
|
|
51
|
+
5. Update your configuration file. See the sample below.
|
|
52
|
+
|
|
53
|
+
### Homebridge Config UI X Installation
|
|
54
|
+
|
|
55
|
+
Check out [Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x) for easier setup. This plugin can be installed from the **Plugins** tab by searching.
|
|
56
|
+
|
|
57
|
+
## Updating
|
|
58
|
+
|
|
59
|
+
- `npm update -g homebridge-tplink-smarthome`
|
|
60
|
+
|
|
61
|
+
## Configuration
|
|
62
|
+
|
|
63
|
+
### Sample Configuration
|
|
64
|
+
|
|
65
|
+
#### Minimal
|
|
66
|
+
|
|
67
|
+
Most setups do not require any other configuration to get up and runing.
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
"platforms": [{
|
|
71
|
+
"platform": "TplinkSmarthome",
|
|
72
|
+
"name": "TplinkSmarthome"
|
|
73
|
+
}]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### All options with defaults
|
|
77
|
+
|
|
78
|
+
See [config.ts](src/config.ts) for documention on these options. It is recommended to use [Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x) to setup the configuration if you don't want to manually edit JSON files.
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
"platforms": [{
|
|
82
|
+
"platform": "TplinkSmarthome",
|
|
83
|
+
"name": "TplinkSmarthome",
|
|
84
|
+
|
|
85
|
+
"addCustomCharacteristics": true,
|
|
86
|
+
"inUseThreshold": 0,
|
|
87
|
+
"switchModels": ["HS200", "HS210"],
|
|
88
|
+
|
|
89
|
+
"discoveryPort": 0,
|
|
90
|
+
"broadcast": "255.255.255.255",
|
|
91
|
+
"pollingInterval": 10,
|
|
92
|
+
"deviceTypes": ["bulb", "plug"],
|
|
93
|
+
"macAddresses": [],
|
|
94
|
+
"excludeMacAddresses": [],
|
|
95
|
+
"devices": [],
|
|
96
|
+
|
|
97
|
+
"timeout": 15,
|
|
98
|
+
"transport": "tcp",
|
|
99
|
+
"waitTimeUpdate": 100
|
|
100
|
+
}]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
##### MAC Addresses
|
|
104
|
+
|
|
105
|
+
MAC Addresses are normalized, special characters are removed and made uppercase for comparison. So any format should work: `AA:BB:CC:00:11:22` or `aaBbcc001122` are valid. Glob-style pattern matching is supported: `?` will match a single character and `*` matches zero or more. To specify all MAC addresses that start with `AA` you could use `AA*`
|
|
106
|
+
|
|
107
|
+
<img src="https://user-images.githubusercontent.com/1383980/30236344-5ca0e866-94cc-11e7-9cf7-bb5632291082.png" align="right" alt="Eve Screenshot - Custom Characteristics" width=250>
|
|
108
|
+
|
|
109
|
+
### Custom Characteristics in Eve
|
|
110
|
+
|
|
111
|
+
Devices that support energy monitoring (HS110, etc) will have extra characteristics that are viewable in the Eve app (such as Watts). Turn this off by setting `addCustomCharacteristics` false.
|
|
112
|
+
|
|
113
|
+
### Discovery and Broadcast
|
|
114
|
+
|
|
115
|
+
This plugin uses UDP broadcast to find devices on your network. This is also how the Kasa app finds devices. Try setting the `broadcast` configuration if you're having discovery issues. Some users have reported that rebooting their router or changing some router settings have fixed discovery issues.
|
|
116
|
+
|
|
117
|
+
### Manually Specifying Devices
|
|
118
|
+
|
|
119
|
+
If you have a network setup where UDP broadcast is not working, you can manually specify the devices you'd like this plugin to use. This will send the discovery message directly to these devices in addition to the UDP broadcast. **Note that your device must have a static IP to work.**
|
|
120
|
+
|
|
121
|
+
```js
|
|
122
|
+
"platforms": [{
|
|
123
|
+
"platform": "TplinkSmarthome",
|
|
124
|
+
"name": "TplinkSmarthome",
|
|
125
|
+
|
|
126
|
+
"devices": [
|
|
127
|
+
{ "host": "192.168.0.100" },
|
|
128
|
+
{ "host": "192.168.0.101" },
|
|
129
|
+
{ "host": "192.168.0.102", "port": "9999" } // port defaults to "9999" but can be overriden
|
|
130
|
+
]
|
|
131
|
+
}]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Accessory Names
|
|
135
|
+
|
|
136
|
+
Note the name in Homebridge/HomeKit may be out of sync from the Kasa app. This is a [Homebridge/HomeKit limitation](https://github.com/nfarina/homebridge#limitations). You can rename your accessory through the Home app.
|
|
137
|
+
|
|
138
|
+
## Troubleshooting
|
|
139
|
+
|
|
140
|
+
### UUID Errors
|
|
141
|
+
|
|
142
|
+
`Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory`
|
|
143
|
+
If you get an error about duplicate UUIDs you'll have to either remove your cached configuration files or manually edit them to remove the offending entry. By default they are stored in `~/.homebridge/accessories`. In some cases you may also need to remove `~/.homebridge/persist` and re-pair homebridge to your home.
|
|
144
|
+
|
|
145
|
+
You can remove them by running:
|
|
146
|
+
|
|
147
|
+
- `rm -rf ~/.homebridge/accessories`
|
|
148
|
+
- `rm -rf ~/.homebridge/persist`
|
|
149
|
+
|
|
150
|
+
## Credits
|
|
151
|
+
|
|
152
|
+
Thanks to George Georgovassilis and Thomas Baust for [reverse engineering the HS1XX protocol](https://blog.georgovassilis.com/2016/05/07/controlling-the-tp-link-hs100-wi-fi-smart-plug/).
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "TplinkSmarthome",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": true,
|
|
5
|
+
"headerDisplay": "TP-Link Smart Home Plugin.<p>Most users do not require configuration and can just click \"Save\" to get started. See [README](https://github.com/plasticrake/homebridge-tplink-smarthome/blob/master/README.md) for more information.</p>",
|
|
6
|
+
"footerDisplay": "",
|
|
7
|
+
"schema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"required": ["name"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"name": {
|
|
12
|
+
"title": "Name",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"default": "TplinkSmarthome",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"addCustomCharacteristics": {
|
|
18
|
+
"title": "Adds energy monitoring characteristics viewable in Eve app",
|
|
19
|
+
"description": "<b>Plug</b>: Amperes, KilowattHours, VoltAmperes, Volts, Watts.<br/><b>Bulb</b>: Watts",
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"default": true
|
|
22
|
+
},
|
|
23
|
+
"emeterPollingInterval": {
|
|
24
|
+
"title": "Energy Monitoring Polling Interval (seconds)",
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"description": "How often to check device energy monitoring the background (seconds). Set to 0 to disable.",
|
|
27
|
+
"placeholder": "20"
|
|
28
|
+
},
|
|
29
|
+
"inUseThreshold": {
|
|
30
|
+
"title": "In Use Threshold (Watts)",
|
|
31
|
+
"type": "number",
|
|
32
|
+
"description": "(Watts) For plugs that support energy monitoring (e.g. HS110), min power draw for <b>OutletInUse</b>",
|
|
33
|
+
"placeholder": "0"
|
|
34
|
+
},
|
|
35
|
+
"switchModels": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"description": "Matching models are created in HomeKit as a Switch instead of an Outlet. Default: ['HS200', 'HS210']",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"discoveryPort": {
|
|
43
|
+
"title": "Port",
|
|
44
|
+
"type": "number",
|
|
45
|
+
"description": "Port to bind UDP socket for discovery. If port is not specified or is 0, the operating system will attempt to bind to a random port. Default: 0",
|
|
46
|
+
"placeholder": "0"
|
|
47
|
+
},
|
|
48
|
+
"broadcast": {
|
|
49
|
+
"title": "Broadcast Address",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Broadcast Address. If discovery is not working tweak to match your subnet, eg: 192.168.0.255",
|
|
52
|
+
"placeholder": "255.255.255.255",
|
|
53
|
+
"format": "ipv4"
|
|
54
|
+
},
|
|
55
|
+
"pollingInterval": {
|
|
56
|
+
"title": "Polling Interval (seconds)",
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"description": "How often to check device status in the background (seconds)",
|
|
59
|
+
"placeholder": "10"
|
|
60
|
+
},
|
|
61
|
+
"deviceTypes": {
|
|
62
|
+
"title": "Device Types",
|
|
63
|
+
"type": "array",
|
|
64
|
+
"description": "Choose which types of devices this plugin should discover",
|
|
65
|
+
"default": ["plug", "bulb"],
|
|
66
|
+
"titleMap": [
|
|
67
|
+
{ "name": "Plugs", "value": "plug" },
|
|
68
|
+
{ "name": "Bulbs", "value": "bulb" }
|
|
69
|
+
],
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": ["plug", "bulb"]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"macAddresses": {
|
|
76
|
+
"title": "Allow MAC Addresses",
|
|
77
|
+
"description": "Allow-list of MAC addresses to include. If specified will ignore other devices. Supports glob-style patterns",
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": {
|
|
80
|
+
"title": "Mac Address",
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"excludeMacAddresses": {
|
|
85
|
+
"title": "Exclude MAC Addresses",
|
|
86
|
+
"description": "Deny-list of MAC addresses to exclude. Supports glob-style patterns",
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"title": "Mac Address",
|
|
90
|
+
"type": "string"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"devices": {
|
|
94
|
+
"title": "Manual List Of Devices",
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"title": "Device",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": ["host"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"host": {
|
|
102
|
+
"title": "Host",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"port": {
|
|
106
|
+
"title": "Port",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"placeholder": "9999"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"timeout": {
|
|
114
|
+
"title": "Timeout (seconds)",
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"description": "(seconds) Communication Timeout",
|
|
117
|
+
"placeholder": "15"
|
|
118
|
+
},
|
|
119
|
+
"transport": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "Use TCP or UDP for device communication. Discovery will always use UDP. Default: TCP",
|
|
122
|
+
"placeholder": "tcp",
|
|
123
|
+
"enum": ["tcp", "udp"],
|
|
124
|
+
"titleMap": [
|
|
125
|
+
{ "name": "TCP", "value": "tcp" },
|
|
126
|
+
{ "name": "UDP", "value": "udp" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"waitTimeUpdate": {
|
|
130
|
+
"title": "Wait Time Update (ms)",
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"description": "The time (ms) to wait to combine similar commands for a device before sending a command to a device. Default: 100.",
|
|
133
|
+
"placeholder": "100"
|
|
134
|
+
},
|
|
135
|
+
"devicesUseDiscoveryPort": {
|
|
136
|
+
"title": "Devices Use Discovery Port",
|
|
137
|
+
"description": "When true, sets the device port to the port the device used when responding to the discovery ping. When false, always uses default port (9999). You probably don't want to change this.",
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": false
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"layout": [
|
|
144
|
+
"name",
|
|
145
|
+
{
|
|
146
|
+
"type": "fieldset",
|
|
147
|
+
"title": "HomeKit (Optional)",
|
|
148
|
+
"description": "Customize how devices are exposed in HomeKit",
|
|
149
|
+
"expandable": true,
|
|
150
|
+
"items": [
|
|
151
|
+
"addCustomCharacteristics",
|
|
152
|
+
"emeterPollingInterval",
|
|
153
|
+
"inUseThreshold",
|
|
154
|
+
{
|
|
155
|
+
"key": "switchModels",
|
|
156
|
+
"type": "array",
|
|
157
|
+
"buttonText": "Add Switch Model",
|
|
158
|
+
"items": {
|
|
159
|
+
"title": "Model",
|
|
160
|
+
"type": "string",
|
|
161
|
+
"required": true
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "fieldset",
|
|
168
|
+
"title": "Device Discovery (Optional)",
|
|
169
|
+
"description": "Customize device discovery",
|
|
170
|
+
"expandable": true,
|
|
171
|
+
"items": [
|
|
172
|
+
"broadcast",
|
|
173
|
+
"pollingInterval",
|
|
174
|
+
"deviceTypes",
|
|
175
|
+
"discoveryPort",
|
|
176
|
+
{
|
|
177
|
+
"key": "macAddresses",
|
|
178
|
+
"type": "array",
|
|
179
|
+
"buttonText": "Add MAC Address",
|
|
180
|
+
"items": {
|
|
181
|
+
"title": "Allow MAC Address",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"required": true
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"key": "excludeMacAddresses",
|
|
188
|
+
"type": "array",
|
|
189
|
+
"buttonText": "Add MAC Address",
|
|
190
|
+
"items": {
|
|
191
|
+
"title": "Exclude MAC Address",
|
|
192
|
+
"type": "string",
|
|
193
|
+
"required": true
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "fieldset",
|
|
198
|
+
"title": "Manual Discovery",
|
|
199
|
+
"description": "If automatic discovery is not working, try this.",
|
|
200
|
+
"expandable": true,
|
|
201
|
+
"items": [
|
|
202
|
+
{
|
|
203
|
+
"key": "devices",
|
|
204
|
+
"type": "array",
|
|
205
|
+
"buttonText": "Add Device",
|
|
206
|
+
"items": ["devices[].host", "devices[].port"]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "help",
|
|
210
|
+
"helpvalue": "Before resorting to manually specifying devices. Try setting the broadcast address and check your router/switch/firewall configuration. You must assign static IP addresses to your devices to use this configuration."
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "fieldset",
|
|
218
|
+
"title": "Advanced Settings (Optional)",
|
|
219
|
+
"description": "Don't change these, unless you understand what you're doing.",
|
|
220
|
+
"expandable": true,
|
|
221
|
+
"items": [
|
|
222
|
+
"timeout",
|
|
223
|
+
"waitTimeUpdate",
|
|
224
|
+
"transport",
|
|
225
|
+
"devicesUseDiscoveryPort"
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HAP, PlatformAccessory, Service } from 'homebridge';
|
|
2
|
+
import type HomekitDevice from './homekit-device';
|
|
3
|
+
export default function accessoryInformation(hap: HAP): (accessory: PlatformAccessory, hkDevice: HomekitDevice) => Service | undefined;
|
|
4
|
+
//# sourceMappingURL=accessory-information.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessory-information.d.ts","sourceRoot":"","sources":["../src/accessory-information.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,GAAG,EAAE,GAAG,GACP,CACD,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,aAAa,KACpB,OAAO,GAAG,SAAS,CA6BvB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function accessoryInformation(hap) {
|
|
4
|
+
const { Characteristic } = hap;
|
|
5
|
+
return (accessory, hkDevice) => {
|
|
6
|
+
const infoService = accessory.getService(hap.Service.AccessoryInformation);
|
|
7
|
+
if (infoService === undefined)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (!infoService.getCharacteristic(Characteristic.FirmwareRevision)) {
|
|
10
|
+
infoService.addCharacteristic(Characteristic.FirmwareRevision);
|
|
11
|
+
}
|
|
12
|
+
if (!infoService.getCharacteristic(Characteristic.HardwareRevision)) {
|
|
13
|
+
infoService.addCharacteristic(Characteristic.HardwareRevision);
|
|
14
|
+
}
|
|
15
|
+
infoService
|
|
16
|
+
.setCharacteristic(Characteristic.Name, hkDevice.name)
|
|
17
|
+
.setCharacteristic(Characteristic.Manufacturer, hkDevice.manufacturer)
|
|
18
|
+
.setCharacteristic(Characteristic.Model, hkDevice.model)
|
|
19
|
+
.setCharacteristic(Characteristic.SerialNumber, hkDevice.serialNumber)
|
|
20
|
+
.setCharacteristic(Characteristic.FirmwareRevision, hkDevice.firmwareRevision)
|
|
21
|
+
.setCharacteristic(Characteristic.HardwareRevision, hkDevice.hardwareRevision);
|
|
22
|
+
return infoService;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.default = accessoryInformation;
|
|
26
|
+
//# sourceMappingURL=accessory-information.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessory-information.js","sourceRoot":"","sources":["../src/accessory-information.ts"],"names":[],"mappings":";;AAGA,SAAwB,oBAAoB,CAC1C,GAAQ;IAKR,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;IAE/B,OAAO,CAAC,SAA4B,EAAE,QAAuB,EAAE,EAAE;QAC/D,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC3E,IAAI,WAAW,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAEhD,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACpE,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACpE,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACjE,CAAC;QACD,WAAW;aACR,iBAAiB,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;aACrD,iBAAiB,CAAC,cAAc,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC;aACrE,iBAAiB,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC;aACvD,iBAAiB,CAAC,cAAc,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC;aACrE,iBAAiB,CAChB,cAAc,CAAC,gBAAgB,EAC/B,QAAQ,CAAC,gBAAgB,CAC1B;aACA,iBAAiB,CAChB,cAAc,CAAC,gBAAgB,EAC/B,QAAQ,CAAC,gBAAgB,CAC1B,CAAC;QAEJ,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;AACJ,CAAC;AAlCD,uCAkCC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WithUUID } from 'homebridge';
|
|
2
|
+
import DefaultCharacteristicClass from './types';
|
|
3
|
+
export default function amperes(DefaultCharacteristic: typeof DefaultCharacteristicClass): WithUUID<new () => DefaultCharacteristicClass>;
|
|
4
|
+
//# sourceMappingURL=amperes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amperes.d.ts","sourceRoot":"","sources":["../../src/characteristics/amperes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,0BAA0B,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,OAAO,CAC7B,qBAAqB,EAAE,OAAO,0BAA0B,GACvD,QAAQ,CAAC,UAAU,0BAA0B,CAAC,CAWhD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function amperes(DefaultCharacteristic) {
|
|
4
|
+
return class Amperes extends DefaultCharacteristic {
|
|
5
|
+
static UUID = 'E863F126-079E-48FF-8F27-9C2605A29F52';
|
|
6
|
+
constructor() {
|
|
7
|
+
super('Amperes', Amperes.UUID, {
|
|
8
|
+
unit: 'A',
|
|
9
|
+
minStep: 0.01,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.default = amperes;
|
|
15
|
+
//# sourceMappingURL=amperes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amperes.js","sourceRoot":"","sources":["../../src/characteristics/amperes.ts"],"names":[],"mappings":";;AAGA,SAAwB,OAAO,CAC7B,qBAAwD;IAExD,OAAO,MAAM,OAAQ,SAAQ,qBAAqB;QAChD,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,GAAG;gBACT,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAbD,0BAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-characteristic.d.ts","sourceRoot":"","sources":["../../src/characteristics/default-characteristic.ts"],"names":[],"mappings":"AAIA,OAAO,0BAA0B,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAAc,EAAE,OAAO,0BAA0B,GAChD,OAAO,0BAA0B,CAkBnC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function defaultCharacteristic(Characteristic) {
|
|
4
|
+
return class DefaultCharacteristic extends Characteristic {
|
|
5
|
+
constructor(displayName, UUID, props) {
|
|
6
|
+
const combinedProps = {
|
|
7
|
+
format: "float" /* Formats.FLOAT */,
|
|
8
|
+
minValue: 0,
|
|
9
|
+
maxValue: 65535,
|
|
10
|
+
perms: ["pr" /* Perms.PAIRED_READ */, "ev" /* Perms.NOTIFY */],
|
|
11
|
+
...props,
|
|
12
|
+
};
|
|
13
|
+
super(displayName, UUID, combinedProps);
|
|
14
|
+
this.value = this.getDefaultValue();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
exports.default = defaultCharacteristic;
|
|
19
|
+
//# sourceMappingURL=default-characteristic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-characteristic.js","sourceRoot":"","sources":["../../src/characteristics/default-characteristic.ts"],"names":[],"mappings":";;AAMA,SAAwB,qBAAqB,CAC3C,cAAiD;IAEjD,OAAO,MAAM,qBAAsB,SAAQ,cAAc;QACvD,YACE,WAAmB,EACnB,IAAY,EACZ,KAA6D;YAE7D,MAAM,aAAa,GAAG;gBACpB,MAAM,6BAAe;gBACrB,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,KAAK;gBACf,KAAK,EAAE,uDAAiC;gBACxC,GAAG,KAAK;aACT,CAAC;YACF,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC;AApBD,wCAoBC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Characteristic as CharacteristicClass, WithUUID } from 'homebridge';
|
|
2
|
+
export default function characteristic(Characteristic: typeof CharacteristicClass): Record<'Amperes' | 'KilowattHours' | 'KilowattVoltAmpereHour' | 'VoltAmperes' | 'Volts' | 'Watts', WithUUID<new () => CharacteristicClass>>;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,IAAI,mBAAmB,EACrC,QAAQ,EACT,MAAM,YAAY,CAAC;AAUpB,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,cAAc,EAAE,OAAO,mBAAmB,GACzC,MAAM,CACL,SAAS,GACT,eAAe,GACf,wBAAwB,GACxB,aAAa,GACb,OAAO,GACP,OAAO,EACT,QAAQ,CAAC,UAAU,mBAAmB,CAAC,CACxC,CAWA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const default_characteristic_1 = __importDefault(require("./default-characteristic"));
|
|
7
|
+
const amperes_1 = __importDefault(require("./amperes"));
|
|
8
|
+
const kilowatt_hours_1 = __importDefault(require("./kilowatt-hours"));
|
|
9
|
+
const kilowatt_volt_ampere_hour_1 = __importDefault(require("./kilowatt-volt-ampere-hour"));
|
|
10
|
+
const volt_amperes_1 = __importDefault(require("./volt-amperes"));
|
|
11
|
+
const volts_1 = __importDefault(require("./volts"));
|
|
12
|
+
const watts_1 = __importDefault(require("./watts"));
|
|
13
|
+
function characteristic(Characteristic) {
|
|
14
|
+
const DefaultCharacteristic = (0, default_characteristic_1.default)(Characteristic);
|
|
15
|
+
return {
|
|
16
|
+
Amperes: (0, amperes_1.default)(DefaultCharacteristic),
|
|
17
|
+
KilowattHours: (0, kilowatt_hours_1.default)(DefaultCharacteristic),
|
|
18
|
+
KilowattVoltAmpereHour: (0, kilowatt_volt_ampere_hour_1.default)(DefaultCharacteristic),
|
|
19
|
+
VoltAmperes: (0, volt_amperes_1.default)(DefaultCharacteristic),
|
|
20
|
+
Volts: (0, volts_1.default)(DefaultCharacteristic),
|
|
21
|
+
Watts: (0, watts_1.default)(DefaultCharacteristic),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
exports.default = characteristic;
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/characteristics/index.ts"],"names":[],"mappings":";;;;;AAKA,sFAAmE;AACnE,wDAAsC;AACtC,sEAAmD;AACnD,4FAAuE;AACvE,kEAA+C;AAC/C,oDAAkC;AAClC,oDAAkC;AAElC,SAAwB,cAAc,CACpC,cAA0C;IAU1C,MAAM,qBAAqB,GAAG,IAAA,gCAA2B,EAAC,cAAc,CAAC,CAAC;IAE1E,OAAO;QACL,OAAO,EAAE,IAAA,iBAAa,EAAC,qBAAqB,CAAC;QAC7C,aAAa,EAAE,IAAA,wBAAmB,EAAC,qBAAqB,CAAC;QACzD,sBAAsB,EAAE,IAAA,mCAA4B,EAAC,qBAAqB,CAAC;QAC3E,WAAW,EAAE,IAAA,sBAAiB,EAAC,qBAAqB,CAAC;QACrD,KAAK,EAAE,IAAA,eAAW,EAAC,qBAAqB,CAAC;QACzC,KAAK,EAAE,IAAA,eAAW,EAAC,qBAAqB,CAAC;KAC1C,CAAC;AACJ,CAAC;AArBD,iCAqBC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WithUUID } from 'homebridge';
|
|
2
|
+
import type DefaultCharacteristicClass from './types';
|
|
3
|
+
export default function kilowattHours(DefaultCharacteristic: typeof DefaultCharacteristicClass): WithUUID<new () => DefaultCharacteristicClass>;
|
|
4
|
+
//# sourceMappingURL=kilowatt-hours.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilowatt-hours.d.ts","sourceRoot":"","sources":["../../src/characteristics/kilowatt-hours.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,0BAA0B,MAAM,SAAS,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,qBAAqB,EAAE,OAAO,0BAA0B,GACvD,QAAQ,CAAC,UAAU,0BAA0B,CAAC,CAWhD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function kilowattHours(DefaultCharacteristic) {
|
|
4
|
+
return class KilowattHours extends DefaultCharacteristic {
|
|
5
|
+
static UUID = 'E863F10C-079E-48FF-8F27-9C2605A29F52';
|
|
6
|
+
constructor() {
|
|
7
|
+
super('Total Consumption', KilowattHours.UUID, {
|
|
8
|
+
unit: 'kWh',
|
|
9
|
+
minStep: 0.001,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.default = kilowattHours;
|
|
15
|
+
//# sourceMappingURL=kilowatt-hours.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilowatt-hours.js","sourceRoot":"","sources":["../../src/characteristics/kilowatt-hours.ts"],"names":[],"mappings":";;AAGA,SAAwB,aAAa,CACnC,qBAAwD;IAExD,OAAO,MAAM,aAAc,SAAQ,qBAAqB;QACtD,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,KAAK,CAAC,mBAAmB,EAAE,aAAa,CAAC,IAAI,EAAE;gBAC7C,IAAI,EAAE,KAAK;gBACX,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAbD,gCAaC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WithUUID } from 'homebridge';
|
|
2
|
+
import type DefaultCharacteristicClass from './types';
|
|
3
|
+
export default function kilowattVoltAmpereHours(DefaultCharacteristic: typeof DefaultCharacteristicClass): WithUUID<new () => DefaultCharacteristicClass>;
|
|
4
|
+
//# sourceMappingURL=kilowatt-volt-ampere-hour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilowatt-volt-ampere-hour.d.ts","sourceRoot":"","sources":["../../src/characteristics/kilowatt-volt-ampere-hour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,KAAK,0BAA0B,MAAM,SAAS,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,qBAAqB,EAAE,OAAO,0BAA0B,GACvD,QAAQ,CAAC,UAAU,0BAA0B,CAAC,CAYhD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function kilowattVoltAmpereHours(DefaultCharacteristic) {
|
|
4
|
+
return class KilowattVoltAmpereHour extends DefaultCharacteristic {
|
|
5
|
+
static UUID = 'E863F127-079E-48FF-8F27-9C2605A29F52';
|
|
6
|
+
constructor() {
|
|
7
|
+
super('Apparent Energy', KilowattVoltAmpereHour.UUID, {
|
|
8
|
+
format: "uint32" /* Formats.UINT32 */,
|
|
9
|
+
unit: 'kVAh',
|
|
10
|
+
minStep: 1,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.default = kilowattVoltAmpereHours;
|
|
16
|
+
//# sourceMappingURL=kilowatt-volt-ampere-hour.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilowatt-volt-ampere-hour.js","sourceRoot":"","sources":["../../src/characteristics/kilowatt-volt-ampere-hour.ts"],"names":[],"mappings":";;AAKA,SAAwB,uBAAuB,CAC7C,qBAAwD;IAExD,OAAO,MAAM,sBAAuB,SAAQ,qBAAqB;QAC/D,MAAM,CAAU,IAAI,GAAG,sCAAsC,CAAC;QAE9D;YACE,KAAK,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,IAAI,EAAE;gBACpD,MAAM,+BAAgB;gBACtB,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,CAAC;aACX,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAdD,0CAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Characteristic as CharacteristicClass, CharacteristicProps } from 'homebridge';
|
|
2
|
+
import type { MarkOptional } from 'ts-essentials';
|
|
3
|
+
declare class DefaultCharacteristicClass extends CharacteristicClass {
|
|
4
|
+
constructor(displayName: string, UUID: string, props?: MarkOptional<CharacteristicProps, 'format' | 'perms'>);
|
|
5
|
+
}
|
|
6
|
+
export default DefaultCharacteristicClass;
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/characteristics/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,IAAI,mBAAmB,EACrC,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,OAAO,0BAA2B,SAAQ,mBAAmB;gBAEhE,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,YAAY,CAAC,mBAAmB,EAAE,QAAQ,GAAG,OAAO,CAAC;CAEhE;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/characteristics/types.ts"],"names":[],"mappings":";;AAcA,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WithUUID } from 'homebridge';
|
|
2
|
+
import DefaultCharacteristicClass from './types';
|
|
3
|
+
export default function voltAmperes(DefaultCharacteristic: typeof DefaultCharacteristicClass): WithUUID<new () => DefaultCharacteristicClass>;
|
|
4
|
+
//# sourceMappingURL=volt-amperes.d.ts.map
|