homebridge-alexa 0.5.60 → 0.5.62

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/CHANGELOG.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).
4
4
 
5
- ## 0.5.59 (2022-03-21)
5
+ ## 0.5.61 (2022-03-21)
6
6
 
7
- ## [Version 0.5.56](https://github.com/northernman54/homebridge-alexa/compare/v0.5.56...v0.5.59)
7
+ ## [Version 0.5.61](https://github.com/northernman54/homebridge-alexa/compare/v0.5.56...v0.5.61)
8
8
 
9
9
  #### Changes
10
10
 
11
- - Updates to README in regards to switch to subscription based model for the cloud services to support the services.
11
+ - Updates to README in regards to switch to subscription based model for the cloud services.
12
12
  - Further fixes for #507/#508
13
13
 
14
14
  ## 0.5.56 (2022-03-21)
@@ -0,0 +1,574 @@
1
+ Installation and Configuration of Homebridge Alexa
2
+
3
+ <!--ts-->
4
+ * [Setup Instructions for users of the Homebridge UI](#setup-instructions-for-users-of-the-homebridge-ui)
5
+ * [Create Homebridge-Alexa Cloud Services Account](#create-homebridge-alexa-cloud-services-account)
6
+ * [Install and Configure the Plugin](#install-and-configure-the-plugin)
7
+ * [Installation in Homebridge UI](#installation-in-homebridge-ui)
8
+ * [Configuration in Homebridge UI](#configuration-in-homebridge-ui)
9
+ * [Enabling and linking the Homebridge Smart Home Skill](#enabling-and-linking-the-homebridge-smart-home-skill)
10
+ * [Viewing Account Status](#viewing-account-status)
11
+ * [Legacy Setup Instructions for users not using the Homebridge UI](#legacy-setup-instructions-for-users-not-using-the-homebridge-ui)
12
+ * [Prepare Homebridge for plugin installation](#prepare-homebridge-for-plugin-installation)
13
+ * [Install Plugin](#install-plugin)
14
+ * [Create homebridge-alexa account](#create-homebridge-alexa-account)
15
+ * [HomeBridge-alexa plugin configuration](#homebridge-alexa-plugin-configuration)
16
+ * [Required parameters](#required-parameters)
17
+ * [Optional parameters](#optional-parameters)
18
+ * [pin](#pin)
19
+ * [routines](#routines)
20
+ * [blind](#blind)
21
+ * [door](#door)
22
+ * [debug](#debug)
23
+ * [refresh](#refresh)
24
+ * [filter](#filter)
25
+ * [deviceList &amp; deviceListHandling](#devicelist--devicelisthandling)
26
+ * [combine](#combine)
27
+ * [speakers](#speakers)
28
+ * [Inputs](#inputs)
29
+ * [Apple TV](#apple-tv)
30
+ * [Yamaha Spotify Controls](#yamaha-spotify-controls)
31
+ * [New Parser](#new-parser)
32
+ * [Initial Testing and confirming configuration](#initial-testing-and-confirming-configuration)
33
+ * [Enable Homebridge smarthome skill and link accounts](#enable-homebridge-smarthome-skill-and-link-accounts)
34
+ * [Discover Devices](#discover-devices)
35
+
36
+ <!-- Added by: sgracey, at: -->
37
+
38
+ <!--te-->
39
+
40
+ # Setup Instructions for users of the Homebridge UI
41
+
42
+ ## Create Homebridge-Alexa Cloud Services Account
43
+
44
+ This plugin requires the usage of cloud services to link your Amazon Alexa Account to the plugin. Please create an account at https://www.homebridge.ca/. The account details will be needed as part of plugin configuration and for linking the Homebridge smart home skill.
45
+
46
+ ## Install and Configure the Plugin
47
+
48
+ ### Installation in Homebridge UI
49
+
50
+ From the Plugins tab, search for and install the "Homebridge Alexa" plugin
51
+
52
+ ### Configuration in Homebridge UI
53
+
54
+ Please enter the username and password you created earlier at https://www.homebridge.ca/.
55
+
56
+ If you have changed your homebridge PIN from the default `031-45-154`, please enter it under the optional settings.
57
+
58
+ Restart homebridge
59
+
60
+ ## Enabling and linking the Homebridge Smart Home Skill
61
+
62
+ In the Amazon Alexa Application on your smart phone, search for the Homebridge Skill and enable it. When you enable the skill, it will take you to the https://www.homebridge.ca/ website to enable and link the skill to the plugin.
63
+
64
+ ### Viewing Account Status
65
+
66
+ On the homebridge.ca website you can view your account status, and identify any setup issues.
67
+
68
+ # Legacy Setup Instructions for users not using the Homebridge UI
69
+
70
+ * If you are looking for a basic setup to get this plugin up and running check out this guide (https://sambrooks.net/controlling-homebridge-using-alexa/). And here is another setup guide (https://www.youtube.com/watch?v=Ylg4yiw8ofM).
71
+
72
+ ## Prepare Homebridge for plugin installation
73
+
74
+ The setup of the plugin is very straight forward, and requires enabling insecure mode of each homebridge instance you want to control from Alexa.
75
+
76
+ 1. All homebridge instances that you want to control from Alexa need to run in insecure mode with -I included on the command line. How you make this change will depend on your installation of homebridge, and how you start homebridge. If you start from the command line, it would look like this:
77
+
78
+ ```
79
+ homebridge -I
80
+ ```
81
+
82
+ * If your using systemd to manage homebridge, the -I is added to the file /etc/default/homebridge in the line, HOMEBRIDGE_OPTS ie.
83
+
84
+ ```
85
+ # Defaults / Configuration options for homebridge
86
+ # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
87
+ HOMEBRIDGE_OPTS=-I
88
+
89
+ # If you uncomment the following line, homebridge will log more
90
+ # You can display this via systemd's journalctl: journalctl -f -u homebridge
91
+ #DEBUG=
92
+ ```
93
+
94
+ * If your using pm2 to manage the startup of homebridge, you can add the -I option with these steps
95
+
96
+ ```
97
+ pm2 delete homebridge
98
+ pm2 cleardump
99
+ pm2 start homebridge -- -I
100
+ pm2 save
101
+ ```
102
+ To review your settings, use command below to check if homebridge was sucessfully registered to pm2. After that, you can try to reboot your system and check whether you can control homebridge devices with Alexa app.
103
+
104
+
105
+ ```
106
+ pm2 show homebridge
107
+ ```
108
+
109
+
110
+ * If you have multiple homebridge options, the -I should be listed first. ie
111
+
112
+ ```
113
+ HOMEBRIDGE_OPTS=-I -U /var/homebridge
114
+ ```
115
+
116
+ * If you are running with a docker container ( Oznu's), you can add the -I flag following these instructions:
117
+
118
+ https://github.com/oznu/docker-homebridge/issues/79
119
+
120
+ ```
121
+ Variable=HOMEBRIDGE_INSECURE
122
+ Value=1
123
+ ```
124
+
125
+ ```
126
+ Go to the Docker app
127
+ Stop the Homebridge container
128
+ Edit the container and go to the Environment tab
129
+ Add environment variable
130
+ Save and start container
131
+ ```
132
+
133
+ ## Install Plugin
134
+
135
+ 2. The setup of homebridge-alexa is similar to other plugins, except it doesn't have any devices in the Home app;-) I'm just reusing the runtime and configuration file management. And it only needs to installed once if you have multiple homeridge's installed. It will auto-discover and connect to the other instances.
136
+
137
+ ```
138
+ sudo npm install -g homebridge-alexa
139
+ ```
140
+
141
+ ## Create homebridge-alexa account
142
+
143
+ 3. An account to link your Amazon Alexa to HomeBridge needs to created on this website https://www.homebridge.ca/. This account will be used when you enable the home skill in the Alexa App on your mobile, and in the configuration of the plugin in homebridge.
144
+
145
+
146
+ ## HomeBridge-alexa plugin configuration
147
+
148
+ 4. Add the plugin to your config.json. The login and password in the config.json, are the credentials you created earlier for the https://www.homebridge.ca/ website. This only needs to be completed for one instance of homebridge in your environment, it will discover the accessories connected to your other homebridges automatically.
149
+
150
+ ```
151
+ "platforms": [
152
+ {
153
+ "platform": "Alexa",
154
+ "name": "Alexa",
155
+ "username": "....",
156
+ "password": "...."
157
+ }
158
+ ],
159
+ ```
160
+
161
+ ### Required parameters
162
+
163
+ * username - Login created for the skill linking website https://www.homebridge.ca/
164
+ * password - Login created for the skill linking website https://www.homebridge.ca/
165
+
166
+ ### Optional parameters
167
+
168
+ #### pin
169
+ - If you had changed your homebridge pin from the default of "pin": "031-45-154" ie
170
+
171
+ ```
172
+ "platforms": [
173
+ {
174
+ "platform": "Alexa",
175
+ "name": "Alexa",
176
+ "username": "....",
177
+ "password": "....",
178
+ "pin": "031-45-155"
179
+ }
180
+ ],
181
+ ```
182
+
183
+ #### routines
184
+ - Enables passing to Alexa of real time events from Motion and Contact sensors. For use in the Alexa app to create Routines triggered by these sensors. Not required unless you are using Alexa Routines.
185
+
186
+ ```
187
+ "platforms": [
188
+ {
189
+ "platform": "Alexa",
190
+ "name": "Alexa",
191
+ "username": "....",
192
+ "password": "....",
193
+ "routines": true
194
+ }
195
+ ],
196
+ ```
197
+
198
+ #### blind
199
+ - Enables natural wording for opening and closing blinds, and window coverings. Not supported in all countries. Defaults to false
200
+
201
+ ```
202
+ "platforms": [
203
+ {
204
+ "platform": "Alexa",
205
+ "name": "Alexa",
206
+ "username": "....",
207
+ "password": "....",
208
+ "blind": true
209
+ }
210
+ ],
211
+ ```
212
+
213
+ #### door
214
+ - Enables natural wording for opening and closing garage doors. Not supported in all countries. Please note that opening a garage door requires setting a voice pin within the Alexa app. Defaults to false
215
+
216
+ ```
217
+ "platforms": [
218
+ {
219
+ "platform": "Alexa",
220
+ "name": "Alexa",
221
+ "username": "....",
222
+ "password": "....",
223
+ "door": true
224
+ }
225
+ ],
226
+ ```
227
+
228
+ #### debug
229
+ - This enables debug logging mode, can be used instead of the command line option ( DEBUG=* homebridge )
230
+
231
+ ```
232
+ "platforms": [
233
+ {
234
+ "platform": "Alexa",
235
+ "name": "Alexa",
236
+ "username": "....",
237
+ "password": "....",
238
+ "debug": true
239
+ }
240
+ ],
241
+ ```
242
+
243
+ #### refresh
244
+ - Frequency of refreshes of the homebridge accessory cache, in seconds. Defaults to 15 minutes.
245
+
246
+ ```
247
+ "platforms": [
248
+ {
249
+ "platform": "Alexa",
250
+ "name": "Alexa",
251
+ "username": "....",
252
+ "password": "....",
253
+ "refresh": 900
254
+ }
255
+ ],
256
+ ```
257
+
258
+ #### filter
259
+ - Limits accessories shared with Alexa to a single homebridge instance. ( I'm using this setting with Amazon for skill testing. ). The setting is ip:port of homebridge instance.
260
+
261
+ ```
262
+ "platforms": [
263
+ {
264
+ "platform": "Alexa",
265
+ "name": "Alexa",
266
+ "username": "....",
267
+ "password": "....",
268
+ "filter": "192.168.1.122:51826"
269
+ }
270
+ ],
271
+ ```
272
+
273
+ #### deviceList & deviceListHandling
274
+ - allow or deny devices by name to be exposed to alexa. Values are checked to see if they are contained within the name. ( Under the covers it is using regex, so more complex options are available )
275
+
276
+ ```
277
+ "platforms": [
278
+ {
279
+ "platform": "Alexa",
280
+ "name": "Alexa",
281
+ "username": "....",
282
+ "password": "....",
283
+ "deviceListHandling": "deny", // or allow
284
+ "deviceList":
285
+ [
286
+ "LightBulb",
287
+ "GarageDoor",
288
+ "SecureDevice"
289
+ ]
290
+ }
291
+ ],
292
+ ```
293
+
294
+ #### combine
295
+ - Combine disparate accessories into one common device. My example here is combining my TV Remote (KODI), which only has ON/OFF and Volume controls into the Apple TV (TV) playback controls. And combining the spotify controls from my Yamaha receiver into the Zone.
296
+
297
+ ```
298
+ "platforms": [
299
+ {
300
+ "platform": "Alexa",
301
+ "name": "Alexa",
302
+ "username": "....",
303
+ "password": "....",
304
+ "combine": [{
305
+ "into": "TV",
306
+ "from": ["KODI", "Power (TV)"]
307
+ }, {
308
+ "into": "Front",
309
+ "from": ["Yamaha"]
310
+ }, {
311
+ "into": "Rear",
312
+ "from": ["Yamaha"]
313
+ }],
314
+ }
315
+ ],
316
+ ```
317
+
318
+ * into - Device name to combine into
319
+ * from - Device name to combine from, can be a list of multiple devices.
320
+
321
+
322
+ #### speakers
323
+ - Devices to configure as speakers as HomeKit currently does not have a Speaker service, and enable the alexa phase `Alexa, raise the volume on`.
324
+
325
+ ```
326
+ "platforms": [
327
+ {
328
+ "platform": "Alexa",
329
+ "name": "Alexa",
330
+ "username": "....",
331
+ "password": "....",
332
+ "speakers": [{
333
+ "manufacturer": "...",
334
+ "name": "..."
335
+ }]
336
+ }
337
+ ],
338
+ ```
339
+
340
+ * manufacturer - Is the manufacturer of the accessory as shown in the Home App
341
+ * name - Is the name of the accessory as shown in the Home App
342
+
343
+ ie
344
+ ```
345
+ {
346
+ "platform": "Alexa",
347
+ "username": "...",
348
+ "password": "...",
349
+ "name": "Alexa",
350
+ "speakers": [{
351
+ "manufacturer": "Yamaha",
352
+ "name": "Front"
353
+ },
354
+ {
355
+ "manufacturer": "Yamaha",
356
+ "name": "Rear"
357
+ },
358
+ {
359
+ "manufacturer": "HTTP-IRBlaster",
360
+ "name": "Panasonic"
361
+ }
362
+ ]
363
+ }
364
+ ```
365
+
366
+ #### Inputs
367
+
368
+ - This combines several buttons that control inputs on a TV or Stereo into an Alexa input control and enables the phrase `Alexa, change to input to`. For the names of the inputs, Amazon provided a list ( see alexa name below ) that you can choose from. You can map multiple alexa names to the same button as well.
369
+
370
+ `Alexa, change input to Tuner on the TV`
371
+
372
+ `Alexa, change input to HDMI 1 on the TV`
373
+
374
+ ```
375
+ {
376
+ "platform": "Alexa",
377
+ "username": "...",
378
+ "password": "...",
379
+ "name": "Alexa",
380
+ "inputs": [{
381
+ "into": "TV",
382
+ "devices": [{
383
+ "manufacturer": "HTTP-IRBlaster",
384
+ "name": "Tuner",
385
+ "alexaName": "TUNER"
386
+ }, {
387
+ "manufacturer": "HTTP-IRBlaster",
388
+ "name": "Tuner",
389
+ "alexaName": "TV TUNER"
390
+ }, {
391
+ "manufacturer": "HTTP-IRBlaster",
392
+ "name": "Tuner",
393
+ "alexaName": "TV"
394
+ }, {
395
+ "manufacturer": "HTTP-IRBlaster",
396
+ "name": "HDMI1",
397
+ "alexaName": "HDMI 1"
398
+ }, {
399
+ "manufacturer": "HTTP-IRBlaster",
400
+ "name": "HDMI1",
401
+ "alexaName": "TV KODI"
402
+ }, {
403
+ "manufacturer": "HTTP-IRBlaster",
404
+ "name": "HDMI1",
405
+ "alexaName": "MEDIA PLAYER"
406
+ }, {
407
+ "manufacturer": "HTTP-IRBlaster",
408
+ "name": "HDMI2",
409
+ "alexaName": "HDMI 2"
410
+ }, {
411
+ "manufacturer": "HTTP-IRBlaster",
412
+ "name": "HDMI2",
413
+ "alexaName": "TV NETFLIX"
414
+ }]
415
+ }],
416
+ ```
417
+
418
+ In my setup I use an OTA Antenna, hence the Tuner option and have a KODI box on HDMI 1, and a Apple TV we use for Netflix on HDMI 2. For the alexaName's "TV KODI", "TV TUNER", and "TV NETFLIX" these were not part of the Amazon documentation and may stop working at any time or may not work in your region.
419
+
420
+ * into - Name of the existing accessory to add the input function to. In my setup this is my Apple TV accessory.
421
+
422
+ * manufacturer - Is the manufacturer of the accessory as shown in the Home App
423
+
424
+ * name - Is the name of the accessory as shown in the Home App
425
+
426
+ * alexaName - This the input your are asking Alexa to change to.
427
+
428
+ ```
429
+ AUX 1, AUX 2, AUX 3, AUX 4, AUX 5, AUX 6, AUX 7, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME,
430
+ HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI 4, HDMI 5, HDMI 6, HDMI 7, HDMI 8, HDMI 9, HDMI 10, HDMI ARC, INPUT 1,
431
+ INPUT 2, INPUT 3, INPUT 4, INPUT 5, INPUT 6, INPUT 7, INPUT 8, INPUT 9, INPUT 10, IPOD, LINE 1, LINE 2, LINE 3,
432
+ LINE 4, LINE 5, LINE 6, LINE 7, MEDIA PLAYER, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3,
433
+ PLAYSTATION 4, SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX
434
+ ```
435
+
436
+ #### Apple TV
437
+
438
+ - This is the config from my Apple TV using the homebridge-apple-tv plugin after completing the pairing. Please note, *"showDefaultSwitches": true* and *"defaultSwitchesIncludeATVName": true*, are required parameters. Please note I blanked out the devices/credentials section with my ATV credentials.
439
+
440
+ ```
441
+ {
442
+ "platform":"AppleTV",
443
+ "name":"Apple TV",
444
+ "devices": [{
445
+ "id": "Cottage",
446
+ "name": "TV",
447
+ "credentials": "...." }
448
+ ],
449
+ "showDefaultSwitches": true,
450
+ "defaultSwitchesIncludeATVName": true,
451
+ "showPairSwitches": false,
452
+ "hideWelcomeMessage": true
453
+ }
454
+ ```
455
+
456
+ - This is the config for the homebridge-apple-tv-remote plugin. This allows you to pause/play forward/rewind on device.
457
+
458
+ Please note that the name in brackets ie (TV) will be the Name alexa uses to control your AppleTV
459
+
460
+ ```
461
+ {
462
+ "platform": "AppleTvPlatform",
463
+ "devices": [{
464
+ "name": "Family Room (TV)",
465
+ "credentials": "XXXXXXXXXXXX",
466
+ "isOnOffSwitchEnabled": true,
467
+ "onOffSwitchName": "Power (TV)",
468
+ "isPlayPauseSwitchEnabled": true,
469
+ "playPauseSwitchName": "Play (TV)",
470
+ "commandSwitches": [{
471
+ "name": "Right (TV)",
472
+ "commands": [{
473
+ "key": "right",
474
+ "longPress": false
475
+ }]
476
+ }, {
477
+ "name": "Left (TV)",
478
+ "commands": [{
479
+ "key": "left",
480
+ "longPress": false
481
+ }]
482
+ }]
483
+ }],
484
+ "isApiEnabled": false
485
+ }
486
+ ```
487
+
488
+ Also to enable turning on and off your Apple TV, add this to your homebridge-alexa configuration.
489
+
490
+ ```
491
+ "combine": [{
492
+ "into": "TV",
493
+ "from": ["Power (TV)"]
494
+ }]
495
+ ```
496
+
497
+ #### Yamaha Spotify Controls
498
+
499
+ This uses the plugin homebridge-yamaha-home and a Yamaha Receiver which includes Spotify and Spotify Playback Controls.
500
+
501
+ #### New Parser
502
+
503
+ ~~As of April 14, 2019 I changed the Homebridge device parser massively, to add support for Locks and Heater/Cooler devices. To go back to the old device parser, you can set an option oldParser to true. Default is to the new parser.~~
504
+
505
+ ```
506
+ "oldParser": true
507
+ ```
508
+
509
+ Support for the oldParser option was **deprecated** with version 0.5.0
510
+
511
+ ## Initial Testing and confirming configuration
512
+
513
+ 5. Start homebridge in DEBUG mode, to ensure configuration of homebridge-alexa is correct. This will need to be executed with your implementations configuration options and as the same user as you are running homebridge. If you are homebridge with an autostart script ie systemd, you will need to stop the autostart temporarily.
514
+
515
+ ie
516
+ ```
517
+ DEBUG=alexa* homebridge -I
518
+ ```
519
+
520
+ 6. Please ensure that homebridge starts without errors, and output should be similar to this. This is from my setup, and I have several instances of homebridge so you may have a different number of alexaHAP lines.
521
+
522
+ ```
523
+ alexaHAP Starting Homebridge instance discovery +0ms
524
+ alexaLocal Connecting to Homebridge Smart Home Skill +1ms
525
+ [2018-3-17 11:23:57] Homebridge is running on port 51826.
526
+ alexaHAP HAP Device discovered Porch Camera [ '192.168.1.226' ] +87ms
527
+ alexaHAP HAP instance address: Porch Camera -> howard.local -> 192.168.1.226 +1ms
528
+ alexaHAP HAP Device discovered Howard [ '192.168.1.226' ] +4ms
529
+ alexaHAP HAP instance address: Howard -> howard.local -> 192.168.1.226 +0ms
530
+ alexaHAP HAP Device discovered Howard-Hue [ '192.168.1.226' ] +0ms
531
+ alexaHAP HAP instance address: Howard-Hue -> howard.local -> 192.168.1.226 +0ms
532
+ alexaHAP HAP Device discovered Spare Camera [ '192.168.1.226' ] +1ms
533
+ alexaHAP HAP instance address: Spare Camera -> howard.local -> 192.168.1.226 +0ms
534
+ alexaLocal offline +5ms
535
+ alexaHAP HAP Device discovered Penny [ 'fe80::ba27:ebff:febf:bbaa', '192.168.1.4', '169.254.185.85' ] +42ms
536
+ alexaHAP HAP instance address: Penny -> penny.local -> 192.168.1.4 +0ms
537
+ alexaHAP Homebridge instance discovered Howard with 12 accessories +7ms
538
+ alexaHAP Homebridge instance discovered Porch Camera with 1 accessories +11ms
539
+ alexaHAP Homebridge instance discovered Howard-Hue with 5 accessories +1ms
540
+ alexaHAP Homebridge instance discovered Spare Camera with 1 accessories +10ms
541
+ alexaHAP Homebridge instance discovered Penny with 26 accessories +101ms
542
+ alexaHAP HAP Device discovered Bart-Dev [ 'fe80::1c05:2c:5ae4:abdc', '192.168.1.231' ] +662ms
543
+ alexaHAP HAP instance address: Bart-Dev -> Bart.local -> 192.168.1.231 +0ms
544
+ alexaHAP Homebridge instance discovered Bart-Dev with 1 accessories +7ms
545
+ alexaLocal reconnect +4s
546
+ alexaLocal connect command/northernMan/# +174ms
547
+ ```
548
+
549
+ Please note, that if you have other HomeKit devices on your network, like Philip's hue hub's, they will generate a `HAP Discover failed` message that can be ignored.
550
+
551
+ ## Enable Homebridge smarthome skill and link accounts
552
+
553
+ 7. In your Amazon Alexa app on your phone, please search for the "Homebridge" skill, and enable the skill. You will need to Enable and link the skill to the account you created earlier on https://www.homebridge.ca/
554
+
555
+ ## Discover Devices
556
+
557
+ 8. At this point you are ready to have Alexa discover devices. Once you say Alexa, discover devices, the output will get very verbose for a minute. After discovery is complete you should see a line showing the number of devices returned to Alexa.
558
+
559
+ ie
560
+
561
+ ```
562
+ .
563
+ .
564
+ .
565
+ alexaTranslator Alexa Controllable Penny 22 +1ms
566
+ alexaTranslator Alexa Controllable Bart-Dev 0 +0ms
567
+ [2018-3-17 11:01:03] [Alexa] alexaDiscovery - returned 36 devices
568
+ ```
569
+
570
+ In the event you have errors, or no devices returned please review your config.
571
+
572
+ Please note, as part of the verbose output from discovery devices, all your devices with the Alexa voice commands for each accessory are output in CSV format. You could grab these, format them into something usable and share.
573
+
574
+ 9. Installation is now complete, good luck and enjoy.
package/README.md CHANGED
@@ -74,29 +74,6 @@ Country availability - The plugin is available in these countries, English (AU),
74
74
  * [Contact and Motion Sensors](#contact-and-motion-sensors)
75
75
  * [Door bell devices](#door-bell-devices)
76
76
  * [Installation of homebridge-alexa](#installation-of-homebridge-alexa)
77
- * [Prepare Homebridge for plugin installation](#prepare-homebridge-for-plugin-installation)
78
- * [Install Plugin](#install-plugin)
79
- * [Create homebridge-alexa account](#create-homebridge-alexa-account)
80
- * [HomeBridge-alexa plugin configuration](#homebridge-alexa-plugin-configuration)
81
- * [Required parameters](#required-parameters)
82
- * [Optional parameters](#optional-parameters)
83
- * [pin](#pin)
84
- * [routines](#routines)
85
- * [blind](#blind)
86
- * [door](#door)
87
- * [debug](#debug)
88
- * [refresh](#refresh)
89
- * [filter](#filter)
90
- * [deviceList &amp; deviceListHandling](#devicelist--devicelisthandling)
91
- * [combine](#combine)
92
- * [speakers](#speakers-1)
93
- * [Inputs](#inputs)
94
- * [Apple TV](#apple-tv)
95
- * [Yamaha Spotify Controls](#yamaha-spotify-controls)
96
- * [New Parser](#new-parser)
97
- * [Initial Testing and confirming configuration](#initial-testing-and-confirming-configuration)
98
- * [Enable Homebridge smarthome skill and link accounts](#enable-homebridge-smarthome-skill-and-link-accounts)
99
- * [Discover Devices](#discover-devices)
100
77
  * [Service Availability and Issues](#service-availability-and-issues)
101
78
  * [Homebridge cloud service monitoring ( homebridge.ca )](#homebridge-cloud-service-monitoring--homebridgeca-)
102
79
  * [Raising Issues and Troubleshooting](#raising-issues-and-troubleshooting)
@@ -329,511 +306,7 @@ These are the remote buttons
329
306
 
330
307
  # Installation of homebridge-alexa
331
308
 
332
- * If you are looking for a basic setup to get this plugin up and running check out this guide (https://sambrooks.net/controlling-homebridge-using-alexa/). And here is another setup guide (https://www.youtube.com/watch?v=Ylg4yiw8ofM).
333
-
334
- ## Prepare Homebridge for plugin installation
335
-
336
- The setup of the plugin is very straight forward, and requires enabling insecure mode of each homebridge instance you want to control from Alexa.
337
-
338
- 1. All homebridge instances that you want to control from Alexa need to run in insecure mode with -I included on the command line. How you make this change will depend on your installation of homebridge, and how you start homebridge. If you start from the command line, it would look like this:
339
-
340
- ```
341
- homebridge -I
342
- ```
343
-
344
- * If your using systemd to manage homebridge, the -I is added to the file /etc/default/homebridge in the line, HOMEBRIDGE_OPTS ie.
345
-
346
- ```
347
- # Defaults / Configuration options for homebridge
348
- # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
349
- HOMEBRIDGE_OPTS=-I
350
-
351
- # If you uncomment the following line, homebridge will log more
352
- # You can display this via systemd's journalctl: journalctl -f -u homebridge
353
- #DEBUG=
354
- ```
355
-
356
- * If your using pm2 to manage the startup of homebridge, you can add the -I option with these steps
357
-
358
- ```
359
- pm2 delete homebridge
360
- pm2 cleardump
361
- pm2 start homebridge -- -I
362
- pm2 save
363
- ```
364
- To review your settings, use command below to check if homebridge was sucessfully registered to pm2. After that, you can try to reboot your system and check whether you can control homebridge devices with Alexa app.
365
-
366
-
367
- ```
368
- pm2 show homebridge
369
- ```
370
-
371
-
372
- * If you have multiple homebridge options, the -I should be listed first. ie
373
-
374
- ```
375
- HOMEBRIDGE_OPTS=-I -U /var/homebridge
376
- ```
377
-
378
- * If you are running with a docker container ( Oznu's), you can add the -I flag following these instructions:
379
-
380
- https://github.com/oznu/docker-homebridge/issues/79
381
-
382
- ```
383
- Variable=HOMEBRIDGE_INSECURE
384
- Value=1
385
- ```
386
-
387
- ```
388
- Go to the Docker app
389
- Stop the Homebridge container
390
- Edit the container and go to the Environment tab
391
- Add environment variable
392
- Save and start container
393
- ```
394
-
395
- ## Install Plugin
396
-
397
- 2. The setup of homebridge-alexa is similar to other plugins, except it doesn't have any devices in the Home app;-) I'm just reusing the runtime and configuration file management. And it only needs to installed once if you have multiple homeridge's installed. It will auto-discover and connect to the other instances.
398
-
399
- ```
400
- sudo npm install -g homebridge-alexa
401
- ```
402
-
403
- ## Create homebridge-alexa account
404
-
405
- 3. An account to link your Amazon Alexa to HomeBridge needs to created on this website https://www.homebridge.ca/. This account will be used when you enable the home skill in the Alexa App on your mobile, and in the configuration of the plugin in homebridge.
406
-
407
-
408
- ## HomeBridge-alexa plugin configuration
409
-
410
- 4. Add the plugin to your config.json. The login and password in the config.json, are the credentials you created earlier for the https://www.homebridge.ca/ website. This only needs to be completed for one instance of homebridge in your environment, it will discover the accessories connected to your other homebridges automatically.
411
-
412
- ```
413
- "platforms": [
414
- {
415
- "platform": "Alexa",
416
- "name": "Alexa",
417
- "username": "....",
418
- "password": "...."
419
- }
420
- ],
421
- ```
422
-
423
- ### Required parameters
424
-
425
- * username - Login created for the skill linking website https://www.homebridge.ca/
426
- * password - Login created for the skill linking website https://www.homebridge.ca/
427
-
428
- ### Optional parameters
429
-
430
- #### pin
431
- - If you had changed your homebridge pin from the default of "pin": "031-45-154" ie
432
-
433
- ```
434
- "platforms": [
435
- {
436
- "platform": "Alexa",
437
- "name": "Alexa",
438
- "username": "....",
439
- "password": "....",
440
- "pin": "031-45-155"
441
- }
442
- ],
443
- ```
444
-
445
- #### routines
446
- - Enables passing to Alexa of real time events from Motion and Contact sensors. For use in the Alexa app to create Routines triggered by these sensors. Not required unless you are using Alexa Routines.
447
-
448
- ```
449
- "platforms": [
450
- {
451
- "platform": "Alexa",
452
- "name": "Alexa",
453
- "username": "....",
454
- "password": "....",
455
- "routines": true
456
- }
457
- ],
458
- ```
459
-
460
- #### blind
461
- - Enables natural wording for opening and closing blinds, and window coverings. Not supported in all countries. Defaults to false
462
-
463
- ```
464
- "platforms": [
465
- {
466
- "platform": "Alexa",
467
- "name": "Alexa",
468
- "username": "....",
469
- "password": "....",
470
- "blind": true
471
- }
472
- ],
473
- ```
474
-
475
- #### door
476
- - Enables natural wording for opening and closing garage doors. Not supported in all countries. Please note that opening a garage door requires setting a voice pin within the Alexa app. Defaults to false
477
-
478
- ```
479
- "platforms": [
480
- {
481
- "platform": "Alexa",
482
- "name": "Alexa",
483
- "username": "....",
484
- "password": "....",
485
- "door": true
486
- }
487
- ],
488
- ```
489
-
490
- #### debug
491
- - This enables debug logging mode, can be used instead of the command line option ( DEBUG=* homebridge )
492
-
493
- ```
494
- "platforms": [
495
- {
496
- "platform": "Alexa",
497
- "name": "Alexa",
498
- "username": "....",
499
- "password": "....",
500
- "debug": true
501
- }
502
- ],
503
- ```
504
-
505
- #### refresh
506
- - Frequency of refreshes of the homebridge accessory cache, in seconds. Defaults to 15 minutes.
507
-
508
- ```
509
- "platforms": [
510
- {
511
- "platform": "Alexa",
512
- "name": "Alexa",
513
- "username": "....",
514
- "password": "....",
515
- "refresh": 900
516
- }
517
- ],
518
- ```
519
-
520
- #### filter
521
- - Limits accessories shared with Alexa to a single homebridge instance. ( I'm using this setting with Amazon for skill testing. ). The setting is ip:port of homebridge instance.
522
-
523
- ```
524
- "platforms": [
525
- {
526
- "platform": "Alexa",
527
- "name": "Alexa",
528
- "username": "....",
529
- "password": "....",
530
- "filter": "192.168.1.122:51826"
531
- }
532
- ],
533
- ```
534
-
535
- #### deviceList & deviceListHandling
536
- - allow or deny devices by name to be exposed to alexa. Values are checked to see if they are contained within the name. ( Under the covers it is using regex, so more complex options are available )
537
-
538
- ```
539
- "platforms": [
540
- {
541
- "platform": "Alexa",
542
- "name": "Alexa",
543
- "username": "....",
544
- "password": "....",
545
- "deviceListHandling": "deny", // or allow
546
- "deviceList":
547
- [
548
- "LightBulb",
549
- "GarageDoor",
550
- "SecureDevice"
551
- ]
552
- }
553
- ],
554
- ```
555
-
556
- #### combine
557
- - Combine disparate accessories into one common device. My example here is combining my TV Remote (KODI), which only has ON/OFF and Volume controls into the Apple TV (TV) playback controls. And combining the spotify controls from my Yamaha receiver into the Zone.
558
-
559
- ```
560
- "platforms": [
561
- {
562
- "platform": "Alexa",
563
- "name": "Alexa",
564
- "username": "....",
565
- "password": "....",
566
- "combine": [{
567
- "into": "TV",
568
- "from": ["KODI", "Power (TV)"]
569
- }, {
570
- "into": "Front",
571
- "from": ["Yamaha"]
572
- }, {
573
- "into": "Rear",
574
- "from": ["Yamaha"]
575
- }],
576
- }
577
- ],
578
- ```
579
-
580
- * into - Device name to combine into
581
- * from - Device name to combine from, can be a list of multiple devices.
582
-
583
-
584
- #### speakers
585
- - Devices to configure as speakers as HomeKit currently does not have a Speaker service, and enable the alexa phase `Alexa, raise the volume on`.
586
-
587
- ```
588
- "platforms": [
589
- {
590
- "platform": "Alexa",
591
- "name": "Alexa",
592
- "username": "....",
593
- "password": "....",
594
- "speakers": [{
595
- "manufacturer": "...",
596
- "name": "..."
597
- }]
598
- }
599
- ],
600
- ```
601
-
602
- * manufacturer - Is the manufacturer of the accessory as shown in the Home App
603
- * name - Is the name of the accessory as shown in the Home App
604
-
605
- ie
606
- ```
607
- {
608
- "platform": "Alexa",
609
- "username": "...",
610
- "password": "...",
611
- "name": "Alexa",
612
- "speakers": [{
613
- "manufacturer": "Yamaha",
614
- "name": "Front"
615
- },
616
- {
617
- "manufacturer": "Yamaha",
618
- "name": "Rear"
619
- },
620
- {
621
- "manufacturer": "HTTP-IRBlaster",
622
- "name": "Panasonic"
623
- }
624
- ]
625
- }
626
- ```
627
-
628
- #### Inputs
629
-
630
- - This combines several buttons that control inputs on a TV or Stereo into an Alexa input control and enables the phrase `Alexa, change to input to`. For the names of the inputs, Amazon provided a list ( see alexa name below ) that you can choose from. You can map multiple alexa names to the same button as well.
631
-
632
- `Alexa, change input to Tuner on the TV`
633
-
634
- `Alexa, change input to HDMI 1 on the TV`
635
-
636
- ```
637
- {
638
- "platform": "Alexa",
639
- "username": "...",
640
- "password": "...",
641
- "name": "Alexa",
642
- "inputs": [{
643
- "into": "TV",
644
- "devices": [{
645
- "manufacturer": "HTTP-IRBlaster",
646
- "name": "Tuner",
647
- "alexaName": "TUNER"
648
- }, {
649
- "manufacturer": "HTTP-IRBlaster",
650
- "name": "Tuner",
651
- "alexaName": "TV TUNER"
652
- }, {
653
- "manufacturer": "HTTP-IRBlaster",
654
- "name": "Tuner",
655
- "alexaName": "TV"
656
- }, {
657
- "manufacturer": "HTTP-IRBlaster",
658
- "name": "HDMI1",
659
- "alexaName": "HDMI 1"
660
- }, {
661
- "manufacturer": "HTTP-IRBlaster",
662
- "name": "HDMI1",
663
- "alexaName": "TV KODI"
664
- }, {
665
- "manufacturer": "HTTP-IRBlaster",
666
- "name": "HDMI1",
667
- "alexaName": "MEDIA PLAYER"
668
- }, {
669
- "manufacturer": "HTTP-IRBlaster",
670
- "name": "HDMI2",
671
- "alexaName": "HDMI 2"
672
- }, {
673
- "manufacturer": "HTTP-IRBlaster",
674
- "name": "HDMI2",
675
- "alexaName": "TV NETFLIX"
676
- }]
677
- }],
678
- ```
679
-
680
- In my setup I use an OTA Antenna, hence the Tuner option and have a KODI box on HDMI 1, and a Apple TV we use for Netflix on HDMI 2. For the alexaName's "TV KODI", "TV TUNER", and "TV NETFLIX" these were not part of the Amazon documentation and may stop working at any time or may not work in your region.
681
-
682
- * into - Name of the existing accessory to add the input function to. In my setup this is my Apple TV accessory.
683
-
684
- * manufacturer - Is the manufacturer of the accessory as shown in the Home App
685
-
686
- * name - Is the name of the accessory as shown in the Home App
687
-
688
- * alexaName - This the input your are asking Alexa to change to.
689
-
690
- ```
691
- AUX 1, AUX 2, AUX 3, AUX 4, AUX 5, AUX 6, AUX 7, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME,
692
- HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI 4, HDMI 5, HDMI 6, HDMI 7, HDMI 8, HDMI 9, HDMI 10, HDMI ARC, INPUT 1,
693
- INPUT 2, INPUT 3, INPUT 4, INPUT 5, INPUT 6, INPUT 7, INPUT 8, INPUT 9, INPUT 10, IPOD, LINE 1, LINE 2, LINE 3,
694
- LINE 4, LINE 5, LINE 6, LINE 7, MEDIA PLAYER, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3,
695
- PLAYSTATION 4, SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX
696
- ```
697
-
698
- #### Apple TV
699
-
700
- - This is the config from my Apple TV using the homebridge-apple-tv plugin after completing the pairing. Please note, *"showDefaultSwitches": true* and *"defaultSwitchesIncludeATVName": true*, are required parameters. Please note I blanked out the devices/credentials section with my ATV credentials.
701
-
702
- ```
703
- {
704
- "platform":"AppleTV",
705
- "name":"Apple TV",
706
- "devices": [{
707
- "id": "Cottage",
708
- "name": "TV",
709
- "credentials": "...." }
710
- ],
711
- "showDefaultSwitches": true,
712
- "defaultSwitchesIncludeATVName": true,
713
- "showPairSwitches": false,
714
- "hideWelcomeMessage": true
715
- }
716
- ```
717
-
718
- - This is the config for the homebridge-apple-tv-remote plugin. This allows you to pause/play forward/rewind on device.
719
-
720
- Please note that the name in brackets ie (TV) will be the Name alexa uses to control your AppleTV
721
-
722
- ```
723
- {
724
- "platform": "AppleTvPlatform",
725
- "devices": [{
726
- "name": "Family Room (TV)",
727
- "credentials": "XXXXXXXXXXXX",
728
- "isOnOffSwitchEnabled": true,
729
- "onOffSwitchName": "Power (TV)",
730
- "isPlayPauseSwitchEnabled": true,
731
- "playPauseSwitchName": "Play (TV)",
732
- "commandSwitches": [{
733
- "name": "Right (TV)",
734
- "commands": [{
735
- "key": "right",
736
- "longPress": false
737
- }]
738
- }, {
739
- "name": "Left (TV)",
740
- "commands": [{
741
- "key": "left",
742
- "longPress": false
743
- }]
744
- }]
745
- }],
746
- "isApiEnabled": false
747
- }
748
- ```
749
-
750
- Also to enable turning on and off your Apple TV, add this to your homebridge-alexa configuration.
751
-
752
- ```
753
- "combine": [{
754
- "into": "TV",
755
- "from": ["Power (TV)"]
756
- }]
757
- ```
758
-
759
- #### Yamaha Spotify Controls
760
-
761
- This uses the plugin homebridge-yamaha-home and a Yamaha Receiver which includes Spotify and Spotify Playback Controls.
762
-
763
- #### New Parser
764
-
765
- ~~As of April 14, 2019 I changed the Homebridge device parser massively, to add support for Locks and Heater/Cooler devices. To go back to the old device parser, you can set an option oldParser to true. Default is to the new parser.~~
766
-
767
- ```
768
- "oldParser": true
769
- ```
770
-
771
- Support for the oldParser option was **deprecated** with version 0.5.0
772
-
773
- ## Initial Testing and confirming configuration
774
-
775
- 5. Start homebridge in DEBUG mode, to ensure configuration of homebridge-alexa is correct. This will need to be executed with your implementations configuration options and as the same user as you are running homebridge. If you are homebridge with an autostart script ie systemd, you will need to stop the autostart temporarily.
776
-
777
- ie
778
- ```
779
- DEBUG=alexa* homebridge -I
780
- ```
781
-
782
- 6. Please ensure that homebridge starts without errors, and output should be similar to this. This is from my setup, and I have several instances of homebridge so you may have a different number of alexaHAP lines.
783
-
784
- ```
785
- alexaHAP Starting Homebridge instance discovery +0ms
786
- alexaLocal Connecting to Homebridge Smart Home Skill +1ms
787
- [2018-3-17 11:23:57] Homebridge is running on port 51826.
788
- alexaHAP HAP Device discovered Porch Camera [ '192.168.1.226' ] +87ms
789
- alexaHAP HAP instance address: Porch Camera -> howard.local -> 192.168.1.226 +1ms
790
- alexaHAP HAP Device discovered Howard [ '192.168.1.226' ] +4ms
791
- alexaHAP HAP instance address: Howard -> howard.local -> 192.168.1.226 +0ms
792
- alexaHAP HAP Device discovered Howard-Hue [ '192.168.1.226' ] +0ms
793
- alexaHAP HAP instance address: Howard-Hue -> howard.local -> 192.168.1.226 +0ms
794
- alexaHAP HAP Device discovered Spare Camera [ '192.168.1.226' ] +1ms
795
- alexaHAP HAP instance address: Spare Camera -> howard.local -> 192.168.1.226 +0ms
796
- alexaLocal offline +5ms
797
- alexaHAP HAP Device discovered Penny [ 'fe80::ba27:ebff:febf:bbaa', '192.168.1.4', '169.254.185.85' ] +42ms
798
- alexaHAP HAP instance address: Penny -> penny.local -> 192.168.1.4 +0ms
799
- alexaHAP Homebridge instance discovered Howard with 12 accessories +7ms
800
- alexaHAP Homebridge instance discovered Porch Camera with 1 accessories +11ms
801
- alexaHAP Homebridge instance discovered Howard-Hue with 5 accessories +1ms
802
- alexaHAP Homebridge instance discovered Spare Camera with 1 accessories +10ms
803
- alexaHAP Homebridge instance discovered Penny with 26 accessories +101ms
804
- alexaHAP HAP Device discovered Bart-Dev [ 'fe80::1c05:2c:5ae4:abdc', '192.168.1.231' ] +662ms
805
- alexaHAP HAP instance address: Bart-Dev -> Bart.local -> 192.168.1.231 +0ms
806
- alexaHAP Homebridge instance discovered Bart-Dev with 1 accessories +7ms
807
- alexaLocal reconnect +4s
808
- alexaLocal connect command/northernMan/# +174ms
809
- ```
810
-
811
- Please note, that if you have other HomeKit devices on your network, like Philip's hue hub's, they will generate a `HAP Discover failed` message that can be ignored.
812
-
813
- ## Enable Homebridge smarthome skill and link accounts
814
-
815
- 7. In your Amazon Alexa app on your phone, please search for the "Homebridge" skill, and enable the skill. You will need to Enable and link the skill to the account you created earlier on https://www.homebridge.ca/
816
-
817
- ## Discover Devices
818
-
819
- 8. At this point you are ready to have Alexa discover devices. Once you say Alexa, discover devices, the output will get very verbose for a minute. After discovery is complete you should see a line showing the number of devices returned to Alexa.
820
-
821
- ie
822
-
823
- ```
824
- .
825
- .
826
- .
827
- alexaTranslator Alexa Controllable Penny 22 +1ms
828
- alexaTranslator Alexa Controllable Bart-Dev 0 +0ms
829
- [2018-3-17 11:01:03] [Alexa] alexaDiscovery - returned 36 devices
830
- ```
831
-
832
- In the event you have errors, or no devices returned please review your config.
833
-
834
- Please note, as part of the verbose output from discovery devices, all your devices with the Alexa voice commands for each accessory are output in CSV format. You could grab these, format them into something usable and share.
835
-
836
- 9. Installation is now complete, good luck and enjoy.
309
+ Installation and configuration instructions are [here](Installation.md).
837
310
 
838
311
  # Service Availability and Issues
839
312
 
@@ -843,7 +316,7 @@ Please note, as part of the verbose output from discovery devices, all your devi
843
316
 
844
317
  * Real time monitoring of the homebridge.ca cloud service is provided by [Uptime Robot](https://stats.uptimerobot.com/2WmEDHyV6).
845
318
 
846
- * Cloud service operational event reporting and alerting is sent to the #homebridge-alexa channel in the Homebridge Discord instance, and the uptime robot reports events there in real time.
319
+ * Cloud service operational event reporting and alerting is sent to the #homebridge-alexa channel in the Homebridge Discord instance, and the uptime robot reports events there in real time. To access the homebridge discord server, here is an <a href="https://discord.gg/efg9ZESr">Invite</a>.
847
320
 
848
321
  ## Raising Issues and Troubleshooting
849
322
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "homebridge-alexa",
3
- "version": "0.5.60",
3
+ "version": "0.5.62",
4
4
  "description": "Control your Homebridge devices with Amazon Alexa.",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
8
  "api": "documentation build plugin.js lib/alexaActions.js lib/alexaLocal.js lib/alexaMessages.js lib/alexaTranslator.js -f md --config docs/documentation.yml > docs/API.md",
9
- "document": "./gh-md-toc --insert README.md;./gh-md-toc --insert Troubleshooting.md",
9
+ "document": "./gh-md-toc --insert README.md;./gh-md-toc --insert Troubleshooting.md;./gh-md-toc --insert Installation.md",
10
10
  "watch": "nodemon"
11
11
  },
12
12
  "nodemonConfig": {