My apologies if the answer is already somewhere, but I’ve done quite a bit of reading and Googling but been unable to find it.
I’ve got my Harmony Hub connected to HASS and it is working. I can turn activities on/off with it.
My next step is to connect HASS to homekit, found a number of examples on this and don’t foresee anything I can’t get figured out.
In the examples, they use switches to map the activities from the Harmony to Homekit. The checking the documentation for HASS with HomeKit I noticed there is also something called mediaplayer.
Looking at that, it not only provides On/Off but using it I could also easily state to play, pause, turn up volume, turn down volume, mute, …
Now my question is, is it be possible to create like a “virtual” mediaplayer without having an actual media player device and then mapping the respective functions to scripts for my Harmony? And thus providing the Harmony activity to HomeKit as a media player instead and not a switch?
Thx, I have it working with switches as well but for my activities that I have related to media I would prefer it to be as a media player instead. But for that I would need to create a media player similar like you show with the template switches.
I had looked at the Universal, the problem is that it required an ordered list of child media players the entity will control. I do not have child media players in HASS as it is all through my Harmony remote. Hence I would need something similar like a template for media player then I think.
I think that is indeed what would solve it. Have a media player template allowing one to create a media player entity similar as with the switch. Idea then being that within this template one would define what needs to be done for each action similar like one does for a switch.
I have a harmony with home companion remote, controlling a TV + Receiver + Kodi media player combo. (+ other inputs to the receiver, like a PC )
What I’d want is a templated media player for each activity, then put all those media players behind 1 universal one that I can call ‘living room’ for example. This way I can make sure that I get 1 media player in the frontend per room (per harmony hub), and that the media players controls get passed to kodi, and the volume to my receiver.
I’d love to be able to expose a harmony hub to Alexa so I can issue commands such as “turn up the living room TV” and have them routed to the media player template so that the AVR turns the volume up.
Yes, you can do this with Alexa. However, I’m looking to do it for Homekit, which does support mediaplayer and televisionmediaplayer device types. I would hate to have 20 switches between my two units when it could be feasible to have one object each in as a televisionmediaplayer as described in the HomeKit page:
“All media players that have tv as their device_class. Represented as Television and Remote accessories in HomeKit to control on / off, play / pause, select source, or volume increase / decrease, depending on supported_features of entity. Requires iOS 12.2/macOS 10.14.4 or later.”
Doesn’t this sound exactly like what a harmony does? I believe so.
The only way to bridge any media player to Alexa is to use NabuCasa or HAASKA. Emulated hue does not support media players.
HAASKA - You have to build your own commands from the ground up. This whole process can be very time consuming.
NabuCasa (Paid monthly service) - Super easy to set up, but costs money. Money goes to developing home assistant though, so this is a good thing.
There are other ways that require you to get inventive with the limitations of emulated hue. Like making a template light that acts as volume slider for your media player.
This is why I pretty much said
Because he’s using harmony and you don’t need to go through HA for that. Would be way easier to go around HA.
I followed the universal media player link above and it has a harmony example setup which i followed and now in Hass, I have a nice setup for the harmony. I have two issues which I cannot get past:
Even thoughI have conifguration for the volume level, it is not showing up in Hass. On my Denon, I can see the volume level just fine. Mute and mute indicator works just fine.
Still this setup does not show up correctly in Homekit. I can only control power, and it shows 11 accessories (for the harmony activities) that I cannot do anything to and they all show as on.
Does anyone have this working as well it works through homebridge? (not throwing shade cuz I love Hass and left homebridge for it, but…)
For anyone else that stumbles here later…seems like a few reboots fixed my issue. I now have the harmony showing up as I expected it in Homekit. Hooray to HA.
@korey_sed It’s been a while since you posted your config. Has it been working well for you? I am going to try to use yours as a template for myself, as I would like to finally pull the plug on my Homebridge installation. Question - You have volume_up, volume_down, and volume_mute in your first iteration of your media_player config. But then you follow up later with a separate volume_set that you are adding to your media_player config. Did you keep the volume_up/down/mute after this edit, or did volume_set replace them? Would you mind sharing your full final config? Thanks so much!
So I am going through a reset and right now and for some reason HA is not discovering my Denon receiver again, but…
yes, I kept the volume up/down. The full config is below.
Note that the volume does not get exposed to HomeKit or I have not figured that part out yet. but if you do things this way, at least you will be able to control the volume from HA. Also, notice that the config is a mixture of knowing the current status through a different integration than harmony.
Welp, I appreciate your help very much. But unfortunately, this isn’t working for me. I first took the simplest approach and added my harmony remote remote.family_room_harmony_hub to my HomeKit configuration. It came through to the Home app with all the activities listed, and I could successfully select activities. It also showed in the Remote widget. But that’s where the fun stopped. None of the buttons in the Remote widget worked.
So I then tried your config and pushed the new media_player.family_room_tv into HomeKit. It works perfectly in HA. But in HomeKit it is exactly the same as the original remote.family_room_harmony_hub. Bleh.
Sorry if I didn’t make that clear. I am referring to two different things - The Home app (HomeKit) and the Remote widget. The Home app works correctly with both configurations. Meaning, I can start an activity and turn the TV on/off using remote.family_room_harmony_hub or media_player.family_room_tv. The issue I am having is with the Remote widget. With both configurations, the TV shows up but none of the buttons work -