nicoduj / homebridge-harmony

Harmony websocket plugin for homebridge
The Unlicense
215 stars 23 forks source link

Question: what determines the order of activitie? #375

Closed maisun closed 2 years ago

maisun commented 3 years ago

Hi, I’m trying to understanding how does the plug-in determine the order of activities? The order neither follows the configuration, nor the order in Harmony. It’s also not sorted alphabetically, hence the question…

sorry didn’t mean to create a bug.

nicoduj commented 3 years ago

order retrieved by the discovery. You can try to reorder in the file that is created on homebridge root directory (harmonyPluginNames_*) But not sure it will work.

nicoduj commented 2 years ago

There is a new option in latest version to better handle that.

maisun commented 2 years ago

Hi @nicoduj Thanks for the new version, but looks like it doesn't work fully. Setting sortInput=1 works however setting sortInput=3 doesn't seem to work for me. Anything I should check in log to troubleshoot the issue? Thanks!

nicoduj commented 2 years ago

Hi, you can post your log at startup and config .

maisun commented 2 years ago

Hi @nicoduj Please kindly find the log and configuration below: Logs (looks like the sorting order follows Harmony):

[4/10/2022, 10:05:46 PM] [Living Room Media Center] Restarting Process... [4/10/2022, 10:05:47 PM] [Living Room Media Center] Launched child bridge with PID 20387 [4/10/2022, 10:05:47 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket' [4/10/2022, 10:05:47 PM] [Living Room Media Center] Loaded homebridge-harmony v1.6.0 child bridge successfully [4/10/2022, 10:05:47 PM] Loaded 2 cached accessories from cachedAccessories.0EF888EFD9A6. [4/10/2022, 10:05:47 PM] [Living Room Media Center] HarmonyPlatform Init [4/10/2022, 10:05:47 PM] [Living Room Media Center] DidFinishLaunching [4/10/2022, 10:05:47 PM] [Living Room Media Center] (Living Room Media Center)INFO - Loading activities... [4/10/2022, 10:05:47 PM] Homebridge v1.4.0 (HAP v0.10.0) (Living Room Media Center) is running on port 42296. [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Adding Accessory : Living Room Media Center-TV [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - configuring Main TV Service [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating TV Service [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating Input Service - Movie in position 1 [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating Input Service - Music in position 2 [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Configuring Main Activity IP Radio [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating TV Speaker Service [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating Input Service - IP Radio in position 3 [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating Input Service - Game in position 4 [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Creating Input Service - FM Radio in position 5 [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - setupFoundAccessories - TV accessory added as external accessory [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Loading devices... [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Discovered Device : Light Controller [4/10/2022, 10:05:49 PM] [Living Room Media Center] (Living Room Media Center)INFO - Discovered Device : LED Candles [4/10/2022, 10:05:49 PM] Living Room Media Center-TV 25AA is running on port 41643.

Configuration: { "name": "Living Room Media Center", "hubIP": "192.168.1.XXX", "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000, "HUB_CONNECT_TIMEOUT": 10000, "HUB_SEND_TIMEOUT": 30000, "cleanCache": false, "publishAllTVAsExternalAccessory": true, "TVAccessory": true, "sortInput": 3, "mainActivity": "IP Radio", "activitiesToPublishAsInputForTVMode": [ "FM Radio", "Music", "IP Radio", "Game", "Movie" ], "playPauseBehavior": true, "numberOfCommandsSentForVolumeControl": 2, "remoteOverrideCommandsList": [ { "ActivityName": "IP Radio", "CommandsList": [ { "CommandName": "ARROW_RIGHT", "NewCommand": "AV Receiver;NextPreset" }, { "CommandName": "ARROW_LEFT", "NewCommand": "AV Receiver;PrevPreset" }, { "CommandName": "ARROW_UP", "NewCommand": "AV Receiver;Net/UsbUp" }, { "CommandName": "ARROW_DOWN", "NewCommand": "AV Receiver;Net/UsbDown" }, { "CommandName": "SELECT", "NewCommand": "AV Receiver;Net/UsbSelect" }, { "CommandName": "BACK", "NewCommand": "AV Receiver;Net/UsbReturn" }, { "CommandName": "PLAY", "NewCommand": "AV Receiver;Mute" }, { "CommandName": "PAUSE", "NewCommand": "AV Receiver;Mute" } ] }, { "ActivityName": "FM Radio", "CommandsList": [ { "CommandName": "ARROW_RIGHT", "NewCommand": "AV Receiver;NextPreset" }, { "CommandName": "ARROW_LEFT", "NewCommand": "AV Receiver;PrevPreset" }, { "CommandName": "PLAY", "NewCommand": "AV Receiver;Mute" }, { "CommandName": "PAUSE", "NewCommand": "AV Receiver;Mute" } ] }, { "ActivityName": "Music", "CommandsList": [ { "CommandName": "PLAY", "NewCommand": "Stereo Amplifier;Mute" }, { "CommandName": "PAUSE", "NewCommand": "Stereo Amplifier;Mute" } ] }, { "ActivityName": "Movie", "CommandsList": [ { "CommandName": "INFORMATION", "NewCommand": "Kodi Player;M" }, { "CommandName": "PLAY", "NewCommand": "Kodi Player;Space" }, { "CommandName": "PAUSE", "NewCommand": "Kodi Player;Space" } ] }, { "ActivityName": "Kodi Music", "CommandsList": [ { "CommandName": "PLAY", "NewCommand": "Kodi Player;Space" }, { "CommandName": "PAUSE", "NewCommand": "Kodi Player;Space" }, { "CommandName": "ARROW_RIGHT", "NewCommand": "Kodi Player;SkipForward" }, { "CommandName": "ARROW_LEFT", "NewCommand": "Kodi Player;SkipBackward" }, { "CommandName": "ARROW_UP", "NewCommand": "Kodi Player;Rewind" }, { "CommandName": "ARROW_DOWN", "NewCommand": "Kodi Player;FastForward" } ] }, { "ActivityName": "Foobar2000 Music", "CommandsList": [ { "CommandName": "PLAY", "NewCommand": "Kodi Player;Space" }, { "CommandName": "PAUSE", "NewCommand": "Kodi Player;Space" }, { "CommandName": "ARROW_RIGHT", "NewCommand": "Kodi Player;SkipForward" }, { "CommandName": "ARROW_LEFT", "NewCommand": "Kodi Player;SkipBackward" }, { "CommandName": "ARROW_UP", "NewCommand": "Kodi Player;Rewind" }, { "CommandName": "ARROW_DOWN", "NewCommand": "Kodi Player;FastForward" } ] } ], "addAllActivitiesToSkippedIfSameStateActivitiesList": true, "devicesToPublishAsAccessoriesSwitch": [ "Light Controller;Red", "LED Candles;PowerOn/PowerOff" ], "showCommandsAtStartup": false, "_bridge": { "username": "0E:F8:88:XX:XX:XX", "port": 42XXX }, "platform": "HarmonyHubWebSocket" } Thank you for looking into it in advance!

maisun commented 2 years ago

Hi @nicoduj, just want to let you know I tried to remove the accessory and add it again but still the sorting doesn't work for me. I have more activities in Harmony but I only want to include 5 in HomeKit, could that be the cause?

nicoduj commented 2 years ago

Hi, this should be fixed in 1.6.1 . Sorry for that.

maisun commented 2 years ago

Hi, this should be fixed in 1.6.1 . Sorry for that.

Thanks a lot! I can confirm 1.6.1 works flawlessly, very much appreciated!