Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Best practice to handle 2 TV accessories when only 1 hub #178

Closed
genfersee opened this issue Aug 23, 2019 · 9 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@genfersee
Copy link

Dear all,

On my setup, I have 1 Harmony hub handling 2 TV sets.
Each TV set has dedicated activities.
What is the best practice to handle that?

Should I declare the same hub 2 times in the config.json homebridge?
Then, should I hide the irrelevant activities within each of the 2 configs?

Thanks in advance,
Genfersee

@genfersee genfersee added the enhancement New feature or request label Aug 23, 2019
@nicoduj
Copy link
Owner

nicoduj commented Aug 23, 2019

Hi, I would do as you said I think

Sent with GitHawk

@genfersee
Copy link
Author

Many thanks! I will try this was and reopen the issue if needed.

@nicoduj
Copy link
Owner

nicoduj commented Aug 23, 2019

Don’t forget to put different names . The second one will have to be added manually . And please use 1.0.4 since .5 and .6 are buggy

Sent with GitHawk

@genfersee
Copy link
Author

genfersee commented Aug 25, 2019

Hi Nicolas,

I have tried the following:
`

	{
	"platform": "HarmonyHubWebSocket",
	"name": "Harmony_Sejour",
	"hubIP": "192.168.xx.yy",
	"TVPlatformMode" : true,
	"mainActivity" : "Apple TV Sejour",
	"switchAccessories" : true,
	"activitiesToPublishAsInputForTVMode" : ["Cable Sejour","Apple TV Sejour","PS3 Sejour","Airplay Sejour"],
	"activitiesToPublishAsAccessoriesSwitch" : ["Cable Sejour","Apple TV Sejour","PS3 Sejour","Airplay Sejour"]
	},


	{
	"platform": "HarmonyHubWebSocket",
	"name": "Harmony_Chambre",
	"hubIP": "192.168.xx.yy",
	"TVPlatformMode" : true,
	"mainActivity" : "Apple TV Chambre",
	"switchAccessories" : true,
	"activitiesToPublishAsInputForTVMode" : ["Cable Chambre","Apple TV Chambre","PS3 Chambre"],
	"activitiesToPublishAsAccessoriesSwitch" : ["Cable Chambre","Apple TV Chambre","PS3 Chambre"]
	},`

Then I clean cache, delete accessories and persist folders, then start homebridge and then add the Homebridge from scratch in my Home app, I get 2 TV accessories with the expected inputs, I also get the appropriate activitiy switches.

So I did not even had to add manually the second TV as you said. It is normal ricght, since I added everything from scratch by adding Homebridge to Home app?

The only issue I have is the following:
I launch an activity linked to the first TV set. Everything is ok: First TV shows ON and the imput is correctly displayed in the icon, the second TV set also remains OFF.
Then, I launch an activity on second TV set. The issue I have is that the first TV set remains ON (and the input display name is replaced by "allumé(e)".)
Is there any way to avoid that? I would expect the first TV set to get OFF...

Thanks in advance!
Genfersee

@genfersee genfersee reopened this Aug 25, 2019
@genfersee
Copy link
Author

And after a few homebridge restart, I now got some similar issue as with 1.0.5 or 1.0.6:
`
[2019-8-25 20:51:23] Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 7717e79c-aec8-44df-b515-cf0350d252b2
at Bridge.Accessory.addBridgedAccessory (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:268:13)
at Server._configCachedPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:396:18)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:93:8)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
[2019-8-25 20:51:23] Got SIGTERM, shutting down Homebridge...

`

I am running plugin version 1.0.4. and now some accessories activities started to disappear, Also, the Harmony_Sejour TV lost its configuration and was recreated...

@nicoduj
Copy link
Owner

nicoduj commented Aug 25, 2019

Sorry, i answered too quickly. You must set only one platform with a second one as subplatform

@genfersee
Copy link
Author

genfersee commented Aug 26, 2019

Thanks a lot, clear!

I have reconfigured cleaned and readded homebridge from scratch in Home app. During that process, only the first TV accessory was added (but with the accessory switches of first TV and secondTV), I believe it is normal? Then I added manually the second TV accessory.
Should be ok now.
But I still have the initial problem which is that first TV accessory gets ON if I launch some activity on second TV (and the other way around).. Any way to avoid this?

Here is my new config:

`

	{
	"platform": "HarmonyHubWebSocket",
	"name": "Harmony",
	"hubIP": "192.168.xx.yy",
	"TVPlatformMode" : true,
	"mainActivity" : "Apple TV Sejour",
	"switchAccessories" : true,
	"activitiesToPublishAsInputForTVMode" : ["Cable Sejour","Apple TV Sejour","PS3 Sejour","Airplay Sejour"],
	"activitiesToPublishAsAccessoriesSwitch" : ["Cable Sejour","Apple TV Sejour","PS3 Sejour","Airplay Sejour"],
	"otherPlatforms" : [{
		"name": "Harmony_Chambre",
		"hubIP": "192.168.xx.yy",
		"TVPlatformMode" : true,
		"mainActivity" : "Apple TV Chambre",
		"switchAccessories" : true,
		"activitiesToPublishAsInputForTVMode" : ["Cable Chambre","Apple TV Chambre","PS3 Chambre"],
		"activitiesToPublishAsAccessoriesSwitch" : ["Cable Chambre","Apple TV Chambre","PS3 Chambre"]
		}]
	},

`

Many thanks in advance :):)
Genfersee

@nicoduj
Copy link
Owner

nicoduj commented Aug 26, 2019

Hi, will check might be an issue by my side in this particular case

Sent with GitHawk

@nicoduj nicoduj self-assigned this Aug 27, 2019
@nicoduj nicoduj added this to To do in Harmony Hub Plugin for Homebridge via automation Aug 27, 2019
@nicoduj nicoduj added this to the 1.1.0 milestone Aug 27, 2019
@nicoduj nicoduj moved this from To do to In progress in Harmony Hub Plugin for Homebridge Aug 31, 2019
@nicoduj nicoduj moved this from In progress to Done in Harmony Hub Plugin for Homebridge Aug 31, 2019
@nicoduj nicoduj closed this as completed Aug 31, 2019
@genfersee
Copy link
Author

Hi Nicolas,
I just updated from 1.0.4 to 1.1.0, I see this is really working great and as expected now with my 2 TV sets under the same hub! Thank you so much for your great work!!
Kind regards,
Genfersee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants