nicoduj / homebridge-harmony

Harmony websocket plugin for homebridge
The Unlicense
211 stars 22 forks source link

[BUG] #403

Closed Monty closed 6 months ago

Monty commented 2 years ago

Describe the bug Using the web configuration tool creates an "undefined-TV" accessory

To Reproduce Install plugin configure a "Logitech" Hub using web tool

Expected behavior Only a "Logitech-TV" accessory is created Logitech-TV 566C is running on port 51501.

An "undefined-TV" accessory should not be created undefined-TV A53A is running on port 51511.

lsof -i -P | grep LISTEN | grep node should not show two listeners

Logs [5/15/2022, 12:16:48 PM] Loaded plugin: homebridge-harmony@1.6.1 [5/15/2022, 12:16:48 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket' [5/15/2022, 12:16:48 PM] --- [5/15/2022, 12:16:48 PM] Loading 2 platforms... [5/15/2022, 12:16:48 PM] [Config] Initializing config platform... [5/15/2022, 12:16:48 PM] [Config] Running in Service Mode [5/15/2022, 12:16:48 PM] [Logitech] Initializing HarmonyHubWebSocket platform... [5/15/2022, 12:16:48 PM] [Logitech] HarmonyPlatform Init [5/15/2022, 12:16:48 PM] [Logitech] DidFinishLaunching [5/15/2022, 12:16:48 PM] [Logitech] (Logitech)INFO - Loading activities... [5/15/2022, 12:16:48 PM] [Logitech] (undefined)INFO - Loading activities... [5/15/2022, 12:16:48 PM] [Logitech] INFO - starting hub discovery ... [5/15/2022, 12:16:48 PM] Homebridge v1.4.1 (HAP v0.10.2) (Homebridge 89E5) is running on port 51012. [5/15/2022, 12:16:50 PM] [Logitech] (Logitech)INFO - Adding Accessory : Logitech-TV ... [5/15/2022, 12:16:50 PM] Please add [Logitech-TV 566C] manually in Home app. Setup Code: 155-81-583 [5/15/2022, 12:16:54 PM] [Logitech] INFO - stopping hub discovery, hubs found : 192.168.1.205|Harmony Hub|13740534 [5/15/2022, 12:16:54 PM] [Logitech] (undefined)INFO - received discovered hubs 192.168.1.205|Harmony Hub|13740534 [5/15/2022, 12:16:56 PM] [Logitech] (undefined)INFO - Adding Accessory : undefined-TV [undefined-TV@@Model] characteristic value expected string and received undefined ...

Config { "name": "Logitech", "hubIP": "192.168.1.205", "hubName": "Harmony Hub", "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000, "HUB_CONNECT_TIMEOUT": 10000, "HUB_SEND_TIMEOUT": 30000, "TVAccessory": true, "sortInput": 0, "mainActivity": "Watch Apple TV", "activitiesToPublishAsInputForTVMode": [ "Watch Apple TV", "Watch TiVo Bolt" ], "switchAccessories": true, "activitiesToPublishAsAccessoriesSwitch": [ "Watch Apple TV", "Watch TiVo Bolt" ], "otherPlatforms": [ { "sortInput": 0 } ], "platform": "HarmonyHubWebSocket" }

Additional context The problem is caused by this automatically generated part "otherPlatforms": [ { "sortInput": 0 } ],

If you delete that from the config, the "undefined-TV" accessory is not created

nicoduj commented 2 years ago

Thanks for reporting and detail infos . Will try to fix asap

lisanet commented 1 year ago

This is fixed in PR #415 'TV showing as undiefined'