homebridge-harmony icon indicating copy to clipboard operation
homebridge-harmony copied to clipboard

[BUG] The `sortInput` setting does not seem to work

Open generator85 opened this issue 1 year ago • 5 comments

Describe the bug The sortInput setting does not seem to actually sort the input list in homekit.

To Reproduce In TV mode when setting sortInput it just displays all activities in seemingly random order. None of the options (0-3) seem to have any effect on the list of inputs. Even when I manually enter my activities, and set sortInput to 3, the ordering does not change.

Expected behavior I would expect the list of activities in TV mode to be displayed using the order set.

Screenshots Screenshot 2023-10-11 at 13 03 31

IOS (please complete the following information):

  • Version: 17.0.3
  • Device: iPhone 12 mini

Logs homebridge-log.txt

Config

...
    "platforms": [
        {
            "name": "Logitech Harmony",
            "hubIP": "192.168.1.121",
            "hubName": "Harmony Hub",
            "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000,
            "HUB_CONNECT_TIMEOUT": 10000,
            "HUB_SEND_TIMEOUT": 30000,
            "cleanCache": true,
            "TVAccessory": true,
            "sortInput": 1,
            "mainActivity": "Watch Smart TV",
            "playPauseBehavior": true,
            "remoteOverrideCommandsList": [
                {
                    "ActivityName": "Watch Smart TV",
                    "CommandsList": [
                        {
                            "CommandName": "VOLUME_UP",
                            "NewCommand": "Sonos Ray:VolumeUp"
                        },
                        {
                            "CommandName": "VOLUME_DOWN",
                            "NewCommand": "Sonos Ray:VolumeDown"
                        }
                    ]
                }
            ],
            "switchAccessories": true,
            "showCommandsAtStartup": false,
            "otherPlatforms": [
                {
                    "TVAccessory": false,
                    "sortInput": 0
                }
            ],
            "_bridge": {
                "username": "0E:C8:44:47:99:95",
                "port": 32739
            },
            "platform": "HarmonyHubWebSocket"
        }
    ]
...

generator85 avatar Oct 11 '23 11:10 generator85

Hi, I will check this as soon as I can, but did you try on both main hub / secondary hub (do you even have a secondary hub - otherplatforms is set) ?

nicoduj avatar Jan 02 '24 13:01 nicoduj

I don't have a secondary hub

generator85 avatar Jan 02 '24 14:01 generator85

Ok, so you can remove otherplatforms section. Could you also check your logs in debug, and especillay this line : this.log.debug('(' + this.name + ')' + 'INFO - accessories : Sort Order : ' + this.sortInput);

nicoduj avatar Jan 02 '24 14:01 nicoduj

oh, and please remove cleancache option / set it to false, otherwise everything will be created on each startup which could lead to some issues.

nicoduj avatar Jan 02 '24 14:01 nicoduj

I did what you said, these are the lines mentioning the Sort Order (I've tried 3 different sort orders, but nothing seem to change in my Apple Home app):

[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : Sort Order : 0
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Play Console
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Play Console in position 1
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Smart TV
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Configuring Main Activity Watch Smart TV
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating TV Speaker Service
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Watch Smart TV in position 2
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Apple TV
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Watch Apple TV in position 3
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Listen To Sonos
[1/2/2024, 6:07:11 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Listen To Sonos in position 4
...
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : Sort Order : 1
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Listen To Sonos
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Listen To Sonos in position 1
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Play Console
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Play Console in position 2
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Apple TV
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Watch Apple TV in position 3
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Smart TV
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - Configuring Main Activity Watch Smart TV
[1/2/2024, 6:09:01 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating TV Speaker Service
...
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : Sort Order : 2
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Play Console
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Play Console in position 1
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Listen To Sonos
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Listen To Sonos in position 2
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Smart TV
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - Configuring Main Activity Watch Smart TV
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating TV Speaker Service
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - Creating Input Service - Watch Smart TV in position 3
[1/2/2024, 6:11:14 PM] [Logitech Harmony] (Logitech Harmony)INFO - accessories : activity to configure : Watch Apple TV

Also it might be useful to know, my Harmony sort order is:

  1. Listen To Sonos
  2. Watch Smart TV
  3. Watch Apple TV
  4. Play Console

generator85 avatar Jan 02 '24 17:01 generator85