denis-stepanov / advent

Vent intrusive TV ads
GNU General Public License v3.0
14 stars 1 forks source link

Support HarmonyHub names other than "Harmony" #17

Closed denis-stepanov closed 1 year ago

denis-stepanov commented 2 years ago

Currently this name is hard-coded, but Harmony app allows changing it. So, to be correct, we need to provide an option to configure it.

denis-stepanov commented 2 years ago

There's also automatic discovery, so at very minimum we could check it and use the first hub available.

$ curl -s -S http://localhost:8282/hubs/
{"hubs":["harmony"]}
$ 
denis-stepanov commented 2 years ago

Another related feature is that there could be reasons to run HarmonyAPI server on a different machine. In this case localhost would change to something else. And, to avoid flipping all Harmony devices instead of just TV, one needs to be more specific with the path. So maybe a better idea would be to allow user specifying a base URL, of a type http://<host>:8282/hubs/<hubname>/commands/...

denis-stepanov commented 1 year ago

I lost access to Harmony Hub device, so all changes related to it will be cancelled.