dustindclark / homebridge-globalcache-itach

MIT License
11 stars 3 forks source link

Add support for IR devices - Follow up #2

Closed DaronLord closed 8 years ago

DaronLord commented 8 years ago

Dustin,

I just realized I was updating a closed ticket so I moved my comments to a new ticket.

DaronLord commented 8 years ago

Hello Dustin,

Sorry for the delay in responding. The plugin works great. I have a quick question. I was able to successfully set up one Itachi Device without issue. When I try to setup a second device it fails. How would I set up 3 separate devices with 3 ports. Home bridge complains that you cannot setup multiple accessories with the same UUID. Do I need to add an entry for each physical device under [platforms] or [devices] under the Itachi [devices] section. I tried it both ways and it fails. I will include the config.son in a separate post.

DaronLord commented 8 years ago

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:02", "pin": "987-65-432" }, "platforms": [ { "platform": "Nest", "username": "daron.lord@gmail.com", "password": "XXXXXX" }, { "platform": "HarmonyHub", "name": "Master Suite Hub", "ip_address": "192.168.1.91" }, { "platform": "HarmonyHub", "name": "Gameroom Hub", "ip_address": "192.168.1.93" }, { "platform": "GlobalCacheItach", "name": "IR Remote 1", "devices": [ { "name": "Kitchen Devices", "host": "192.168.1.7", "enableLearnLogging": false, "ports": [ { "name": "Kitchen TV", "commands": { "on": "1,38109,1,1,342,170,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,64,22,21,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,64,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,1517,342,85,22,3661,342,85,22,3810", "off": "1,38109,1,1,342,170,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,64,22,21,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,64,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,1517,342,85,22,3661,342,85,22,3810" } }, { "disable": true }, { "disable": true } ] }, { "name": "Room 2 Devices", "host": "192.168.1.6", "enableLearnLogging": false, "ports": [ { "name": "Room 2 TV", "commands": { "on": "1,39682,2,1,10,462,4,45,4,68,4,44,5,42,5,42,7,1040,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1023,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,3968", "off": "1,39682,2,1,10,462,4,45,4,68,4,44,5,42,5,42,7,1040,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1023,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,3968" } }, { "disable": true }, { "disable": true } ] }

    ]
}

] }

DaronLord commented 8 years ago

Here is the exact error:

/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:175 throw new Error("Cannot add a bridged Accessory with the same UUID as another bridged Accessory: " + existing.UUID); ^

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: f816f7e4-f665-4a31-97e7-b972412d8712 at Bridge.Accessory.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:175:13) at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:224:24) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:15:19 at ItachPlatform. (/usr/local/lib/node_modules/homebridge-globalcache-itach/index.js:104:25) at Socket. (/usr/local/lib/node_modules/homebridge-globalcache-itach/index.js:308:9) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16) at Socket.Readable.push (_stream_readable.js:110:10) at TCP.onread (net.js:523:20)

dustindclark commented 8 years ago

Thanks @DaronLord. This is fixed and published in 0.1.4. I didn't have 2 devices of the same type, so I didn't run into this issue with my setup. As long as your devices have different host names/IPs, the uuids will now be unique.

DaronLord commented 8 years ago

Hi Dustin,

Thanks for the response. How do I update versions. Do I simply reinstall or is there an update command?

dustindclark commented 8 years ago

Just run the install again and then restart homebridge:

npm install homebridge-globalcache-itach
DaronLord commented 8 years ago

HI Dustin,

I applied the updated and it is still not working I tried it as an entry under devices and platform. I ensured that the names and IP Addresses were different. Could you look at my config and tell me if you see a problem.

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:04", "pin": "987-65-432" }, "platforms": [ { "platform": "Nest", "username": "daron.lord@gmail.com", "password": "XXXXX" }, { "platform": "HarmonyHub", "name": "Master Suite Hub", "ip_address": "192.168.1.91" }, { "platform": "HarmonyHub", "name": "Gameroom Hub", "ip_address": "192.168.1.93" }, { "platform": "GlobalCacheItach", "name": "IR Remote 1", "devices": [ { "name": "Kitchen Devices", "host": "192.168.1.7", "enableLearnLogging": false, "ports": [ { "name": "Kitchen TV", "commands": { "on": "1,38109,1,1,342,170,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,64,22,21,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,64,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,1517,342,85,22,3661,342,85,22,3810", "off": "1,38109,1,1,342,170,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,64,22,21,22,21,22,21,22,64,22,21,22,21,22,21,22,21,22,64,22,64,22,64,22,21,22,64,22,64,22,64,22,64,22,1517,342,85,22,3661,342,85,22,3810" } }, { "disable": true }, { "disable": true } ] } ] }, { "platform": "GlobalCacheItach", "name": "IR Remote 2", "devices": [ { "name": "Room 2 Devices", "host": "192.168.1.6", "enableLearnLogging": false, "ports": [ { "name": "Room 2 TV", "commands": { "on": "1,39682,2,1,10,462,4,45,4,68,4,44,5,42,5,42,7,1040,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1023,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,3968", "off": "1,39682,2,1,10,462,4,45,4,68,4,44,5,42,5,42,7,1040,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1023,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,1024,96,23,49,23,24,23,49,23,24,23,49,23,24,23,24,23,49,23,24,23,24,23,24,23,24,3968" } }, { "name":"unused3", "disable": true }, { "name":"unused4", "disable": true } ] } ] } ] }

DaronLord commented 8 years ago

BTW: I saw in you message that you don't have 2 devices. I have a brand new unopened Global Cache IR to Wifi device that I am willing to mail you in appreciation for your efforts and in exchange for getting this working with multiple similar devices.

dustindclark commented 8 years ago

That would be awesome...thank you! I'll send my address to the Gmail address from your config. Can you confirm that you have 0.1.4 by running this command? Also, did you restart home bridge?

npm list homebridge-globalcache-itach
DaronLord commented 8 years ago

Dustin

When I ran that command it returned an error. But when I checked the package.json file it said it was 0.1.3. I see on GitHub it is 0.1.4.

I ran the install again and it is still 0.1.3. Does the npm install command pull directly from the github repository. Even though the latest code is in Github the install command is still pulling and installing the previous version.

Daron

On Jan 25, 2016, at 2:19 PM, Dustin Clark notifications@github.com wrote:

That would be awesome...thank you! I'll send my address to the Gmail address from your config. Can you confirm that you have 0.1.4 by running this command? Also, did you restart home bridge?

npm list homebridge-globalcache-itach — Reply to this email directly or view it on GitHub https://github.com/dustindclark/homebridge-globalcache-itach/issues/2#issuecomment-174649342.

DaronLord commented 8 years ago

Dustin, It is working now. I figured out the issue with the version. I ran the following command: npm install homebridge-globalcache-itach I should have run this command:

nam install -g homebridge-globalcache-itach This is how I installed the plugin initially and when I ran the plugin manually instead of under pm2 it basically said it was installed twice.

Daron

On Jan 25, 2016, at 3:35 PM, Daron Lord daron.lord@gmail.com wrote:

Dustin

When I ran that command it returned an error. But when I checked the package.son file it said it was 0.1.3. Is see on GitHub it is 0.1.4.

I ran the install again and it is still 0.1.3. Does the npm install command pull directly from the github repository. Even though the latest code is in Github the install command is still pulling and installing the previous version.

Daron

On Jan 25, 2016, at 2:19 PM, Dustin Clark <notifications@github.com mailto:notifications@github.com> wrote:

That would be awesome...thank you! I'll send my address to the Gmail address from your config. Can you confirm that you have 0.1.4 by running this command? Also, did you restart home bridge?

npm list homebridge-globalcache-itach — Reply to this email directly or view it on GitHub https://github.com/dustindclark/homebridge-globalcache-itach/issues/2#issuecomment-174649342.

dustindclark commented 8 years ago

Ahh..that makes sense. Glad you got it working. Thanks.

Dustin

Sent from my iPhone

On Jan 25, 2016, at 4:12 PM, Daron Lord notifications@github.com wrote:

Dustin, It is working now. I figured out the issue with the version. I ran the following command: npm install homebridge-globalcache-itach I should have run this command:

nam install -g homebridge-globalcache-itach This is how I installed the plugin initially and when I ran the plugin manually instead of under pm2 it basically said it was installed twice.

Daron

On Jan 25, 2016, at 3:35 PM, Daron Lord daron.lord@gmail.com wrote:

Dustin

When I ran that command it returned an error. But when I checked the package.son file it said it was 0.1.3. Is see on GitHub it is 0.1.4.

I ran the install again and it is still 0.1.3. Does the npm install command pull directly from the github repository. Even though the latest code is in Github the install command is still pulling and installing the previous version.

Daron

On Jan 25, 2016, at 2:19 PM, Dustin Clark <notifications@github.com < mailto:notifications@github.com notifications@github.com>> wrote:

That would be awesome...thank you! I'll send my address to the Gmail address from your config. Can you confirm that you have 0.1.4 by running this command? Also, did you restart home bridge?

npm list homebridge-globalcache-itach — Reply to this email directly or view it on GitHub < https://github.com/dustindclark/homebridge-globalcache-itach/issues/2#issuecomment-174649342 .

— Reply to this email directly or view it on GitHub https://github.com/dustindclark/homebridge-globalcache-itach/issues/2#issuecomment-174691246 .