Giter Club home page Giter Club logo

homebridge-harmonyhub's Introduction

homebridge-harmonyhub

Logitech Harmony Hub plugin for Homebridge

Currently, this plugin displays Activities as switches. This way you can turn on the "Watch TV" activity by saying "Hey Siri, turn on Watch TV". You can also configure HomeKit (using an app like Insteon+) to rename the Siri command for the "Watch TV" activity to something like "TV" and put it in the "Living Room" room, that way you can say "Hey Siri, turn on the Living Room TV" and Siri will start/switch to the "Watch TV" activity.

Important 0.2.x changes

In version 0.2.x, the plugin was drastically changed to allow much better connectivity handling, faster response, simplified integration, and true multi-hub support including auto adding newly discovered hubs.

As part of this, how your activities show up in HomeKit are very different. Each hub will now properly show up as a single device in HomeKit instead of a device for each activity. That device (accessory) for the hub will contain a switch for each activity on that hub. Just like before, turning on any activity on that hub will turn off all the others and just switching off the current activity is equivalent to pressing the off button on the Harmony remote. This will drastically clean up a HomeKit for most people and makes it easier to determine which activity goes with which hub (if you have multiple).

Since multi-hub support is built right into the platform (as of this release), users who used the work around of adding the platform multiple times (with different IP address's specified) should just remove the IP addresses and go back to just one platform in your homebridge config.

In order to fix many connectivity issues, give faster responses, and add auto discovery, the discovery/connection systems wer greatly altered and integrated with one another. Given this, plus the fact that multi-hub support is built right into the platform, the ability to hard code the IP address of the hub in the config has been removed (for now). Eventually, we will likely reintegrate that feature in some way, but we will likely work on better, alternative solutions to unique cases as hard coding IP addresses is not a good long term solution. If you have one of these unique cases, feel free to write up an issue in GitHub or (preferably) submit a pull request with a better solution to your case.

Warning: when updating from 0.1.x to 0.2.x will remove any all HarmonyHub devices/activities/settings from HomeKit, replacing them with the new setup. This will NOT effect your Harmony Hubs themselves. This will NOT effect any other HomeKit/HomeBridge devices/settings/etc. The only real change is that any customizations you did to the old HarmonyHub HomeKit devices will be reset; things like renaming an activity in HomeKit (which can effect Siri), adding an activity to a room/scene, etc will be reset. All this means is that you will need to go back and redo anything customizations (reorganizing, renaming for Siri, etc) you did to HarmonyHub devices in HomeKit.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-harmonyhub
  3. Update your configuration file. See sample config.json snippet below.

Configuration

Configuration sample:

   "platforms": [
   	{
   		"platform": "HarmonyHub",
   		"name": "Harmony Hub"
   	}
   ]

Fields:

  • "platform": Must always be "HarmonyHub" (required)
  • "name": Can be anything (used in logs)

homebridge-harmonyhub's People

Contributors

alistairg avatar elseym avatar enriquez avatar jason0x43 avatar kraigm avatar madmod avatar masonjames avatar mschmidt avatar nfarina avatar nibty avatar sphtkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-harmonyhub's Issues

If harmony hub disconnected it crashes Homebridge

Probably should be some error handling for the plugin for if the hub is unplugged otherwise it brings down Homebridge. I realise its not a situation that happen very often, but its good practice for a have a fallback that recognises the Harmony Hub has been disconnect so Homebridge won't quit.

Please update sample config.json

Current sample configs state the following:
"platform": "LogitechHarmony"

but according to the code in index.js, it should be:
"platform": "HarmonyHub",

Volume control?

Wouldn't it be possible to control volume with the new Speaker service introduced with iOS 10 beta?

Siri commands for HarmonyHub

So I've been playing around with the Elgato Eve app, to configure my Harmony on Homebridge, and it's not the simplest thing to control

My Activities on the Harmony are called Freeview, Watch Apple TV, and Play XBOX One.

This is because you can't call the activity the same as a device, which sucks

Now I've renamed the activities on Eve to Apple TV and XBOX, but it's not playing ball.

With the activities all in a room called Living Room, if I say 'switch living room Xbox on', it switches on the Freeview activity. Why is it activating the wrong command? Further, in Eve, the Freeview is reporting as On

If I just say 'Switch Xbox on', it doesn't know what I mean. With my LightWaveRF stuff, if I say 'Switch LEGO street on,' it switches on the Office LEGO street, without having to say 'office'

Odd!

Unhandled Error Event 0.2.0 alpha

pi@raspberrypi:~ $ homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
[8/7/2016, 9:08:39 PM] Loaded plugin: homebridge-harmonyhub
[8/7/2016, 9:08:41 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[8/7/2016, 9:08:41 PM] ---
[8/7/2016, 9:08:41 PM] Loaded config.json with 0 accessories and 1 platforms.
[8/7/2016, 9:08:41 PM] ---
[8/7/2016, 9:08:41 PM] Loading 1 platforms...
[8/7/2016, 9:08:41 PM] [Living Room] Initializing HarmonyHub platform...
[8/7/2016, 9:08:41 PM] Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[8/7/2016, 9:08:41 PM] Homebridge is running on port 51826.
events.js:141
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::51826
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at Server._listen2 (net.js:1231:14)
at listen (net.js:1267:10)
at Server.listen (net.js:1363:5)
at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:155:20)
at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:480:16)
at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:92:16)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:82:10)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

Mini IR Blasters dont seem to function

I was able to set everything up and fire an activity through Homekit. The only problem is every device but theTV runs through a connected mini blaster and are assigned discreetly to each blaster. When I run a device with the cabinet doors closed, only the TV powers on etc. When I open the cabinet doors activities fire correctly. This seems to indicate to me that all the IR commands (even ones setup for the mini blasters only) are coming out of the main blaster? Am I missing something in my setup?

how to input the config.json

after I installed the homebridge-harmonyhub and I try to run homebridge I get this:

Rogers-iMac:~ roger$ homebridge
Loaded plugin: homebridge-harmonyhub

Registering platform 'homebridge-harmonyhub.HarmonyHub'

Couldn't find a config.json file at '/Users/roger/.homebridge/config.json'. Look at config-sample.json for examples of how to format your config.js and add your home accessories.

I know step 3 of your guide @ "https://www.npmjs.com/package/homebridge-harmonyhub" says to "Update your configuration file. See sample config.json snippet below".

What is the command to type to update the configuration file. Thank you for your help. Also this if my first time using npm and I do not know coding.

Multiple Hubs

Not sure where else to ask this question but is there a way to add multiple harmony hubs? I have 2 in separate rooms and would love to have both working with HomeKit. Thanks for this great plugin! Really enjoying it!

Plugin not connecting to harmony hub

Hello,

Does this plugin work with most recent version of homebridge and node.js?

I have added the homebridge-harmonyhub plugin to a working homebridge setup, but the plugin does not seem to be connecting to the hub. The Harmony hub activities are not loaded into homebridge. I have tried manually specifying the ip_address as well.

When loading homebridge it displays;

[Living Room Harmony Hub] Initializing HarmonyHub platform...
harmonyhubjs:discover:explorer Explorer(61991) +0ms harmonyhubjs:discover:ping Ping(61991) +1ms harmonyhubjs:discover:explorer start() +3ms harmonyhubjs:discover:responsecollector ResponseCollector(61991) +1ms harmonyhubjs:discover:responsecollector start() +1ms harmonyhubjs:discover:ping start() +5ms

But it never actually tries to connect, if I run homebridge in debug mode(DEBUG=* homebridge -D) I also see;

[Living Room Harmony Hub] Finalizing Plugin Launch

There are no errors generated, shouldn't it show something like this when starting homebridge;

[9/7/2016, 9:14:24 AM] [Living Room Harmony Hub] Found Logitech Harmony remote hub: 192.168.1.31 [9/7/2016, 9:14:24 AM] [Living Room Harmony Hub] Connecting to Logitech Harmony remote hub...

Here is my config.json;

http://pastebin.com/yJsHZFbX

the plugin will not install

I'm a bit of a noob when it comes to linux and coding, but I managed to install homebridge and the netatmo plugin on my new raspberry pi 2 model b and it works fine.

When I try to install the harmonyhub plugin i get errors and it will not install:

sudo npm install -g homebridge-harmonyhub
npm WARN engine [email protected]: wanted: {"node":">=0.8 <=0.12"} (current: {"node":"5.3.0","npm":"3.3.12"})
npm ERR! addLocal Could not install /tmp/npm-868-ff7aef65/git-cache-5cc7fec56addf09611cbc6d6c9ad2b3b/2a8f1303712c6b6f10eaf49c80f6db7ef21e4336
npm WARN install Couldn't install optional dependency: No version provided in package.json

Is there a bug or is it just me thats too stupid to understand :)

Hope you can help!

Thomas

Installation does not work

Hello, I want to install the Harmony Hub. But it fails:

pi@raspberrypi:~ $ sudo npm install -g [email protected]
npm WARN engine [email protected]: wanted: {"npm":">=3.0.0"} (current: {"node":"0.12.1","npm":"2.5.1"})
npm ERR! fetch failed https://github.com/swissmanu/ltx.git#cdata-for-ltx-parser
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 406
npm ERR! fetch failed https://github.com/swissmanu/ltx.git#cdata-for-ltx-parser
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 406
npm ERR! fetch failed https://github.com/swissmanu/ltx.git#cdata-for-ltx-parser
npm ERR! Linux 4.4.11-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "[email protected]"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! fetch failed with status code 406
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log

What can I do? THX!

Ignoring Harmony Platform setup because it is not configured

Hey Folks,

My apologies for what is probably an amateur question, but I'm lookin for a little help. Just installed homekit on a Win10 PC and can pair it with my iPhone. I then tried installing the harmonyhub plugin via
_npm install -g homebridge-harmonyhub_

which returned the below (presumably good).

_C:\Users\finge\AppData\Roaming\npm
`-- [email protected]
  `-- [email protected]
    `-- [email protected]  (git+https://github.com/swissmanu/ltx.git#ce9c34cc19319de8e65cadc3e360e8e5c290746d)_

I updated my config.json to be:

_{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "HomeBridge HTTP Status Control",

    "platforms": [{
        "platform": "HarmonyHub",
        "name": "Scotty's Harmony Hub",
        "ip_address": "192.168.1.15"
    }]

}

But when starting homekit, "Ignoring Harmony Platform setup because it is not configured":

C:\Users\finge\AppData\Roaming\npm\node_modules\homebridge\bin>node homebridge
[9/15/2016, 9:23:01 PM] Loaded plugin: homebridge-harmonyhub
[9/15/2016, 9:23:01 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[9/15/2016, 9:23:01 PM] ---
[9/15/2016, 9:23:02 PM] Loaded plugin: homebridge-http
[9/15/2016, 9:23:02 PM] Registering accessory 'homebridge-http.Http'
[9/15/2016, 9:23:02 PM] ---
Load homebridge-harmonyhub.HarmonyHub
[9/15/2016, 9:23:02 PM] [homebridge-harmonyhub.HarmonyHub] Ignoring Harmony Platform setup because it is not configured
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 031-45-154 │
    └────────────┘

[9/15/2016, 9:23:02 PM] Homebridge is running on port 51826.

Can anyone point me in the right direction? Is it something with the plugin install? The json file? I've tried messing with both to no success as of yet.

Thanks,
Scott

Turn on One Activity, then Loses Connection

I can sometimes get one command through (doesn't always work). But the second command always fails. Here's some logs I grabbed with debug on...

[10/4/2016, 6:40:45 PM] [Harmony Hub] Initializing HarmonyHub platform...
[10/4/2016, 6:40:45 PM] [Harmony Hub] Plugin - Configure Accessory: Elite Hub
[10/4/2016, 6:40:45 PM] [Harmony Hub] Finalizing Plugin Launch
[10/4/2016, 6:40:45 PM] [Harmony Hub] Updated reachability of undefined to false
[10/4/2016, 6:40:46 PM] [Harmony Hub] received update event from harmonyhubjs-discover. there are 1 hubs
[10/4/2016, 6:40:46 PM] [Harmony Hub] Updated reachability of undefined to false
[10/4/2016, 6:40:46 PM] [Harmony Hub] Updated reachability of undefined to false
[10/4/2016, 6:40:46 PM] [Harmony Hub] Updated reachability of undefined to false
[10/4/2016, 6:40:46 PM] [NestFirebase] User null is logged in with custom
[10/4/2016, 6:40:46 PM] [Harmony Hub] created new client for hub with uuid [REMOVED FOR PRIVACY]
[10/4/2016, 6:40:46 PM] [Harmony Hub] Updated reachability of undefined to true

First attempt to go to activity.

[10/4/2016, 6:41:06 PM] [Harmony Hub] Switching to Activity: 21124281
[10/4/2016, 6:41:06 PM] [Harmony Hub] Switching Task Started: 21124281
[10/4/2016, 6:41:06 PM] [Harmony Hub] got state digest. reemit it
[10/4/2016, 6:41:06 PM] [Harmony Hub] Preemptively marking finished.
[10/4/2016, 6:41:13 PM] [Harmony Hub] got state digest. reemit it
[10/4/2016, 6:41:13 PM] [Harmony Hub] got state digest. reemit it

This is what gets output when I try the second activity.

[10/4/2016, 6:42:06 PM] [Harmony Hub] client for hub 82e9e4d9-13ec-4403-1cf6-b5c164f2abd4 went offline. re-establish.
[10/4/2016, 6:42:06 PM] [Harmony Hub] Updated reachability of undefined to false

Error after some time in operation

Hello,

After a few succesful acitivty settings of activities i get this error.

[Living Room Harmony Hub] Finished setting activity to 14899592
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:874:11)
    at TCP.onread (net.js:544:26)

Node reversioned?

Hey Kraig. Thanks for writing this plugin (and the Nest plugin).

I'm new to nodejs. It looks like it was reversioned recently?

npm install -g homebridge-harmonyhub
npm WARN engine [email protected]: wanted: {"node":">=0.8 <=0.12"} (current: {"node":"5.3.0","npm":"3.3.12"})

What's the right way to deal with this?

Access to devices instead of activities?

Hi,

Is there any way to allow access to device features, instead of activities? Activities work as "switch", where it's not ok to put air conditioner acitivity, since it will turn off tv..

iOS 10 Connection Problem

Running the latest iOS 10 Beta and am experiencing an issue in setting up the Harmony Hub platform after adding a new accessory. Had this working with previous iOS 10 Betas, but stopped working when I added another Homebridge accessory, which happened when I was running iOS 10 Beta 7. Experiencing problems similar to those listed in https://github.com/nfarina/homebridge/issues/699. Tried changing the username/pin, clearing the persist directory and the cachedaccessories file, resetting HomeKit configuration, all to no avail.

iOS Home App is recognizing the bridge, my accessory, and the Harmony platform, but cannot connect to the activities when setting them up. Logs aren't showing any issues. Receiving Home App error "Could not complete operation" "Could not communicate with the accessory. Make sure you're connected to the Internet any try again."

Uncaught, unspecified "error" event

I am regularly getting Uncaught, unspecified "error" event with the 0.2.0-alpha release. It is by far the most frequent cause of my homebridge installation crashing. This did not occur with the previous version of homebridge-harmonyhub.

This error mostly seems to occur after receiving a notification about the state of my Philips Hue lights, but that may be a coincidence since those notifications are the most common entries in the log.

Here is an example from homebridge.err:

Tue, 07 Jun 2016 04:57:32 GMT xmpp:connection receive: <message content-length="367"/>
<message from="[email protected]" to="ab903454-7bee-4410-9eea-bb5355bb667e"><event xmlns="connect.logitech.com" type="automation.state?notify"><![CDATA[{"hue-00:17:88:01:10:3c:88:cc-0b":{"statusMsg":"nocon","color":{"xy":{"y":0.3726,"x":0.3696},"mode":"xy","temp":234,"hueSat":{"hue":32900,"sat":51}},"brightness":254,"on":false,"status":2}}]]></event></message>
events.js:87
      throw Error('Uncaught, unspecified "error" event.');
            ^
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at Client.emit (events.js:87:13)
    at Client._handleAuthState (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:297:10)
    at Client._handleStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:235:12)
    at Client.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-client/lib/Client.js:223:8)
    at Connection.emit (events.js:107:17)
    at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:377:10)
    at StreamParser.<anonymous> (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10)
    at StreamParser.emit (events.js:107:17)
    at SaxLtx.<anonymous> (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14)
    at SaxLtx.emit (events.js:107:17)
    at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:28:22)
    at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26)
    at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17)
    at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17)
    at Socket.emit (events.js:129:20)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at TCP.onread (net.js:540:20)

and the entries leading up to this from homebridge.log:

[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] Updated reachability of undefined to false
[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] [TimeoutError: operation timed out]
[6/7/2016, 5:57:31 AM] [Living Room Harmony Hub] Updated reachability of undefined to false
[6/7/2016, 5:57:32 AM] [Living Room Harmony Hub] Hub went online: 0d47c28d-87b2-4642-8840-9c2eb5a3727a
[6/7/2016, 5:57:32 AM] [Living Room Harmony Hub] received update event from harmonyhubjs-discover. there are 1 hubs

Timeout on startup

My whole turn on process takes about 12 seconds. This seems to be longer than the Siri timeout, so Siri returns a "no response" error part way through.

The Hub then proceeds to turn everything back off.

Error Message - UDID Problem

From what I read it seems the UUID of an accessory is pulled from the name.
Any idea? Here's my config:

[2016-07-18 21:38:59] [Harmony Hub] Found activities:
Smart TV wiedergeben
Anhören Wohnzimmer
Fussball im Zweiten
Wiedergabe PS4
Heimkino
PowerOff
[2016-07-18 21:38:59] [Harmony Hub] Unable to get current activity with error [Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0096AA089285' and subtype '21431470' as another Service in this Accessory.]
Unhandled rejection Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0096AA089285' and subtype '21431470' as another Service in this Accessory.
at Accessory.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:132:15)
at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:62:34)
at ActivityAccessory._getActivityService (/usr/local/lib/node_modules/homebridge-harmonyhub/lib/activity-accessory.js:158:28)
at /usr/local/lib/node_modules/homebridge-harmonyhub/lib/activity-accessory.js:121:22
at arrayEach (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/lodash/lodash.js:451:11)
at Function.forEach (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/lodash/lodash.js:8634:14)
at ActivityAccessory._updateActivities (/usr/local/lib/node_modules/homebridge-harmonyhub/lib/activity-accessory.js:120:4)
at ActivityAccessory. (/usr/local/lib/node_modules/homebridge-harmonyhub/lib/activity-accessory.js:68:9)
at ActivityAccessory.tryCatcher (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:501:35)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:630:18)
at PromiseArray._resolve (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise_array.js:125:19)
at PromiseArray._promiseFulfilled (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise_array.js:143:14)

Command single device

Hi,

The plugin seems to work really well for activities. However, I'd like to be able to toggle a single device e.g. I have an IR based mains plug. I can wrap this in an activity, but this then powers off other devices as it switches to activities.

Can the functionality to toggle the power of a single device be added?

Thanks,

D

PowerOff activity?

Thanks for writing/maintaining such a useful plugin.

I've been trying to figure out a way to create a "good night" scene that will shut off my current Harmony activity, whatever it is, without success. I noticed that during initialization, homebridge-harmonyhub lists an activity called PowerOff but it isn't available in any of the HomeKit configuration apps.

Is PowerOff supposed to be a trigger that users can access? Or is there a better way to accomplish what I'm trying to do?

Home bridge won't start because of the HarmonyHub plugin

Hello,

only this past week homebridge stopped working and won't finish setup/initialise, the cause of which is the harmony hub plugin. Uninstalling the plugin and removing it from config.json was the only way I've found to fix the issue.

Any ideas?

Command?

This has to be the dumbest question,

I've managed to install and it discovers the hub on the network however whats the Siri command? to turn on an activity?

Every time i say ex: Watch Apple TV it looks on the web for apple tv

Thanks

Alex

Integrate with new dynamic plugin system

HomeBridge now supports dynamic plugins (v >= 3) which should allow us to add and remove hubs as they appear/disappear from the network. If we integrate with this functionality properly, we should be able to solve a lot of the connection issues as well as multiple hubs support.

No response when turning off activity

When I turn of any activity siri says that it fails even though my harmony does turn of the tv.

I can see the following in the log
[Living Room Harmony Hub] Queue activity to -1
[Living Room Harmony Hub] Set activity to -1
It never succeeds such as when I activate my "se apple tv activity"
[Living Room Harmony Hub] Queue activity to 11233806
[Living Room Harmony Hub] Set activity to 11233806
[Living Room Harmony Hub] Finished setting activity to 11233806

Two Harmonies don't work in Harmony

ok bad jokes asside. I have two Harmony Hubs on the same network and when I try to use your homebridge plugin it crashed the whole home bridge instance.

error is
screen shot 2015-12-06 at 2 06 42 pm

config is

screen shot 2015-12-06 at 2 09 25 pm

crash

Hello !
I contact you cause i m using your plugin but I have many crashes (ECONNRESET) every day as attached .
Maybe an issue : do you handle the case that tcp socket get closed during reading ?
++
thanks for the work !

9d56dfea-acdf-11e5-8e87-cfbbe648e7d0

Multipal Hub Support

Hi I Have 3 hubs in my home? it seems that this plugin only supports one hub? is there a work around for this by chance? "

HarmonyHub not initialising

Not sure what's happening here.

I get [Harmony] Initializing HarmonyHub platform . . .

And then nothing. I'm assuming this means it didn't initialise because it doesn't seem to get on to actually searching/connecting with the Harmony Hub.

I think I have my config.json set up right:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is an example configuration file with one fake accessory and one fake pla
tform. You can use this as a template for creating your own configuration file containing devices 
you actually own.",

    "accessories": [],

    "platforms": [
        {
            "platform" : "HarmonyHub",
            "name" : "Harmony",
            "ip_address" : "192.168.0.146"
        }
    ]
}

Eventual Timeout Issues

After a long period of home ridge running with this plugin the server will crash and also the Harmony Hubs will crash along with it.

Harmony Hub not working / showing up

Hi, I've just installed the LIFX and Harmony Hub Plugins, LIFX is working but not Harmony Hub.

I'm running Raspberry Pi

Output from Pi:

pi@raspberrypi:~ $ homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
[7/23/2016, 1:28:35 AM] Loaded plugin: homebridge-harmonyhub
[7/23/2016, 1:28:35 AM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[7/23/2016, 1:28:35 AM] ---
[7/23/2016, 1:28:36 AM] Loaded plugin: homebridge-lifx-lan
[7/23/2016, 1:28:36 AM] Registering platform 'homebridge-lifx-lan.LifxLan'
[7/23/2016, 1:28:36 AM] ---
[7/23/2016, 1:28:36 AM] Loaded config.json with 0 accessories and 1 platforms.
[7/23/2016, 1:28:36 AM] ---
[7/23/2016, 1:28:36 AM] Loading 1 platforms...
[7/23/2016, 1:28:36 AM] [LiFx] Initializing LifxLan platform...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[7/23/2016, 1:28:36 AM] Homebridge is running on port 51826.
[7/23/2016, 1:28:37 AM] [LiFx] Server Listening...
[7/23/2016, 1:28:37 AM] [LiFx] Online: Lounge (Rear R) [d073d503285b]
[7/23/2016, 1:28:37 AM] [LiFx] Online: Lounge (Front R) [d073d5031fc4]
[7/23/2016, 1:28:37 AM] [LiFx] Online: Lounge (Rear L) [d073d5033624]
[7/23/2016, 1:28:37 AM] [LiFx] Online: Lounge (Front R) [d073d503a3b4]
[7/23/2016, 1:28:37 AM] [LiFx] Online: Dining (Lamp) [d073d5034a88]
[7/23/2016, 1:28:37 AM] [LiFx] Online: Lounge (Lamp) [d073d5030383]

And this is my JSON file:

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"platforms": [{
    "platform": "HarmonyHub",
    "name": "Harmony Hub",
    "ip_address": "192.168.1.44"
}],

"platforms": [{
    "platform": "LifxLan",
    "name": "LiFx"
}]

}

I've confirmed Hub Name and IP Address and Rebooted everything

Any help greatly appreciated

Harmony hub won't load after updating

I just updated my Harmony hub with some new activities. After refreshing Homebridge to try and get them to appear, I received this:

events.js:141
throw er; // Unhandled 'error' event
^

Error: bind EADDRINUSE 0.0.0.0:5224
at Object.exports._errnoException (util.js:873:11)
at exports._exceptionWithHostPort (util.js:896:20)
at dgram.js:214:18
at nextTickCallbackWith3Args (node.js:453:9)
at process._tickCallback (node.js:359:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
at node.js:968:3

What was previously there is there. What's new is not.

Error with 0.2.0 alpha

So I tried the new alpha version and am getting the following error:

events.js:141
throw er; // Unhandled 'error' event
^

Error: bind EADDRINUSE 0.0.0.0:5224
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at dgram.js:213:18
at doNTCallback3 (node.js:463:9)
at process._tickCallback (node.js:369:17)
at Function.Module.runMain (module.js:459:11)
at startup (node.js:138:18)
at node.js:974:3

I am running older versions of node 5.1.1 and NPM 3.8.2

Node.js v4.0.0

Great Plugin. Thank you.

The Harmony Hub plugin for homebridge seems not to work with Node.js v4.0.0. Is that right?

And if so, will the be a new version to work with Node.js v4.0.0.?

Thank you in advance.

Power Off not added

Hi,

PowerOff is not loaded in homebridge
Is there any solutions to add it ?

Thanks

UUID Problem with 0.2.0 alpha

Just recently, under 0.2.0-alpha I've been getting this error. All of my activities have unique names and it registers the first time properly. It causes this error after Homebridge is restarted. Not sure why it was fine up until yesterday as I had been using for about a week no problems

Unhandled rejection Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: de3806d6-73a9-4d18-8d83-ed144b59fa34
at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:219:13)
at Bridge.Accessory.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:265:10)
at Server._handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:416:16)
at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:32:10)
at emitOne (events.js:77:13)
at API.emit (events.js:169:7)
at API.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/api.js:143:8)
at /usr/local/lib/node_modules/homebridge-harmonyhub/lib/home-platform.js:134:15
at PassThroughHandlerContext.finallyHandler (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/finally.js:56:23)
at PassThroughHandlerContext.tryCatcher (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:502:31)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:559:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:628:18)
at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/promise.js:423:57)

Can this work for multiple hubs in one house

I currently have five harmony hubs in my house - can you control multiple hubs by giving them different names in the configuration file? How do you associate a given name with an IP? Do you separate them by separate curly brackets?

Here is something like what my config will look like - would this be correct?
"platforms": [
{
"platform": "HarmonyHub",
"name": "TV Room Harmony Hub",
"ip_address":"192.168.1.181"
}
{
"platform": "HarmonyHub",
"name": "Kitchen Harmony Hub",
"ip_address":"192.168.1.132"
}
{
"platform": "HarmonyHub",
"name": "Bedroom Harmony Hub",
"ip_address":"192.168.1.139"
}
]

Nothing happens in reality

Very new to this, sorry for my ignorance. have installed and configured per instructions, start homebridge, loads all activities from my Harmony, but whenever I try to start one of them, I get "setting activity took too long, assuming success" but nothing actually happens

udp port 5224 not unbound

there seems to be a problem given:

  • ~/.homebridge/config.json does not contain an ip_address for the harmony hub
  • homebridge has been started, quit by interrupt and started again
    then the following error appears:
[Harmony Hub] Initializing HarmonyHub platform...
[Harmony Hub] Searching for Logitech Harmony remote hubs...
Loading 0 accessories...
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: bind EADDRINUSE 0.0.0.0:5224
    at Object.exports._errnoException (util.js:855:11)
    at exports._exceptionWithHostPort (util.js:878:20)
    at dgram.js:213:18
    at nextTickCallbackWith3Args (node.js:466:9)
    at process._tickCallback (node.js:372:17)
    at Function.Module.runMain (module.js:432:11)
    at startup (node.js:141:18)
    at node.js:980:3

i do not know yet whether this can be solved in KraigM/homebridge-harmonyhub or in swissmanu/harmonyhubjs-discover

MAXCLIENT error

I've been getting this error fairly consistently. Is there a way to increase the maximum number of clients? I'm not sure if this is from the Harmony Hub - I upgraded, and can use up to 15 devices with the hub now ...

[9/27/2016, 12:28:27 AM] Homebridge is running on port 51827.
events.js:141
throw er; // Unhandled 'error' event
^

Error: MAX_CLIENTS=6
at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:363:17)
at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:231:10)
at emitOne (events.js:77:13)
at StreamParser.emit (events.js:169:7)
at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:59:14)
at emitOne (events.js:77:13)
at SaxLtx.emit (events.js:169:7)
at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:31:18)
at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:105:26)
at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:124:17)
at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:310:17)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:536:20)

Install error

pi@raspberrypi:~ $ sudo npm install -g homebridge-harmonyhub
loadDep:harmonyhubjs-disc ▄ ╢████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! addLocal Could not install /tmp/npm-5525-0540c1e2/git-cache-d80f2cf1/2a8f1303712c6b6f10eaf49c80f6db7ef21e4336
npm ERR! Linux 4.1.13+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-harmonyhub"
npm ERR! node v5.3.0
npm ERR! npm v3.5.2

npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log

Error Message During Startup

Can't get Homebridge to start at the minute due to this error.

undefined:1



SyntaxError: Unexpected end of input
at Object.parse (native)
at /usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/lib/harmonyclient.js:39:34
at Array.forEach (native)
at HarmonyClient.handleStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/lib/harmonyclient.js:31:32)
at emitOne (events.js:90:13)
at Client.emit (events.js:182:7)
at Client._handleStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:228:12)
at Client.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:222:8)
at emitOne (events.js:90:13)
at Connection.emit (events.js:182:7)

Might also add that in the Home app on iOS its been throwing out authentication errors since the last Harmony hub upgrade relating to Harmony activities.

Not loading homebridge after installing harmony hub

Hi,

I managed to get the homebridge working ok with my Hue lights, as soon as I added the harmony, it doesnt finishing loading the application. Gets stuck as seen below. Thanks :)

root@raspberrypi:~# homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
[3/26/2016, 3:25:29 PM] Loaded plugin: homebridge-harmonyhub
[3/26/2016, 3:25:29 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[3/26/2016, 3:25:29 PM] ---
[3/26/2016, 3:25:30 PM] Loaded plugin: homebridge-philipshue
[3/26/2016, 3:25:30 PM] Registering platform 'homebridge-philipshue.PhilipsHue'
[3/26/2016, 3:25:30 PM] ---
[3/26/2016, 3:25:30 PM] Loaded config.json with 0 accessories and 2 platforms.
[3/26/2016, 3:25:30 PM] ---
[3/26/2016, 3:25:30 PM] Loading 2 platforms...
[3/26/2016, 3:25:30 PM] [Philips Hue] Initializing PhilipsHue platform...
[3/26/2016, 3:25:30 PM] [Philips Hue] PhilipsHue Platform Plugin Version 0.0.2
[3/26/2016, 3:25:30 PM] [Philips Hue] Fetching Philips Hue lights...
[3/26/2016, 3:25:30 PM] [Harmony Hub] Initializing HarmonyHub platform...
[3/26/2016, 3:25:30 PM] [Harmony Hub] Searching for Logitech Harmony remote hubs...
[3/26/2016, 3:25:30 PM] [Philips Hue] Initializing platform accessory 'Table lamp'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'Left wall light'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'Right wall light'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'LightStrips 1'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'LightStrips 2'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'LightStrips 3'...
[3/26/2016, 3:25:31 PM] [Philips Hue] Initializing platform accessory 'LightStrips 4'...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.