maxileith / homebridge-appletv-enhanced

Homebridge plugin that exposes Apple TVs with features that should be native to Apple HomeKit.
MIT License
188 stars 3 forks source link

Asking siri to "Turn off the TV in Room" doesn't work.... #328

Closed wangel closed 4 days ago

wangel commented 7 months ago

Preconditions

Issue

Before I introduced the plugin to my Homekit, I was able to say: "Siri, turn off the TV in the Living Room" and she would shut off the AppleTV, resulting in CEC turning off my TV and Receiver. This worked for all my tv's.

Now with the plugin running, if I ask her to turn off a TV in Anyroom, she will say "Sorry, I can't find that in your Home". I've tried renamed the device in the Home View to TV. I've renamed the old Apple TV device etc etc.

If I'm on my ipad and look at a room with a TV, it shows both the Apple Device as: Apple TV and the Plugin's device, as "TV". I'm able to click the logo of the plugin and it turns the tv off, or go into the device and turn off the tv.

I'm sure I'm missing something super simple, lol.

Thanks!

jsiegenthaler commented 7 months ago

@wangel I would normally say there's actually no way a plugin can have any influence on how Siri reacts, apart from

  1. The name of the plugin. Example: naming a light "TV" might make Siri confused about which device is really a TV and which is not. Solution: use a better name
  2. The category of the plugin: example: having a plugin to control a lightbulb, but using a category of Television also confuses Siri. See all the categories here: https://developers.homebridge.io/#/categories

But this name and Category is not a plugin issue. It's a general HomeKit issue.

However, I've observed similar issues to you and done some experimenting this morning. "Hey Siri turn on all TVs" with turn on all accessories in my Home that have category=Television (including my Sonos speakers, and Apple TV Enhanced) "Hey Siri turn off all TVs" with turn off all accessories in my Home that have category=Television (including my Sonos speakers, and Apple TV Enhanced) "Hey Siri turn on all TVs in the Lounge" with turn on all accessories in my room Lounge that have category=Television (including my Sonos speakers, and Apple TV Enhanced)

I renamed my Apple TV Enhanced accessory to something distinctive and different. I used the work Banana for testing purposes, and then also Apple Tree. "Hey Siri turn on Banana" and Siri says "Sorry, I couldn't find that in your home". Siri could not detect any accessory with the name Banana. Nor with the name Apple Tree. This is a general Siri issue with Televisions.

Interestingly, I tried the following: "Hey Siri turn on Lounge TV" and Siri correctly turned on the television accessory named TV in my Lounge, and ignored all other television accessories. "Hey Siri turn on Lounge How Theater" and Siri correctly turned on the television accessory named Home Theater in my Lounge, and ignored all other television accessories. But "Hey Siri turn on Banana" (as Apple TV Enhanced is currently named) and Siri said "Sorry, I couldn't find that in your home." And "Hey Siri turn on Lounge Banana" and Siri said "Sorry, I couldn't find that in the Lounge in ." Sometimes if Siri thinks you are referring to an app, Siri says "It doesn't look like you have an app named 'Lounge Banana'."

So what's the difference between Apple TV and my Home Theater? Well. it depends on the Category. Apple TV Enhanced can be set to category APPLE_TV (default) or optionally TV_SET_TOP_BOX See https://github.com/maxileith/homebridge-appletv-enhanced/blob/develop/src/appleTVEnhancedAccessory.ts

I suggest you experiment with setting the config option setTopBox=True and seeing if that changes anything. See the option setTopBox in the Readme: https://github.com/maxileith/homebridge-appletv-enhanced?tab=readme-ov-file

I am guessing that that will help a lot. If it does, then you know for sure this is a Siri behavioural issue surrounding the category APPLE_TV.

Good luck!

maxileith commented 7 months ago

@jsiegenthaler thanks for the comprehensive answer. I have nothing to add ...

wangel commented 7 months ago

This was exactly the case. After I posted the question to github, I decided to start digging.

In the end, @jsiegenthaler is correct, once you set the plugin to use the device as a Set-Top box, Siri will turn the tv's off and on like I expect.

That said, I already had them in my Home, so when I changed them to Set-Top boxes, I had to remove and re-pair them. No big deal. Works like a champ.

Thanks @jsiegenthaler and @maxileith !!

wangel commented 1 week ago

This is issue has popped up again after doing upgrades.

It appears the Set Top Box option is no longer a thing?

maxileith commented 1 week ago

Yes, the option was removed in version 1.7.0. The additional option was causing confusion in other issues. However, I wasn't aware of the issue anymore tbh. I think about adding it back.

maxileith commented 5 days ago

@wangel I have added the option for the set-top box again. Can you check if v1.9.2-10 fits your needs?

wangel commented 4 days ago

Yep, that fixed the issue. No idea why if I'm using AppleTV-Enhanced and I say "Turn off the TV in the Living Room" siri can't find it unless I have it configured for the set-top box. It's mad annoying, lol. Even if it's named TV.

On Mon, Nov 4, 2024 at 12:17 PM Maximilian Leith @.***> wrote:

@wangel https://github.com/wangel I have added the option for the set-top box again. Can you check if v1.9.2-10 fits your needs?

— Reply to this email directly, view it on GitHub https://github.com/maxileith/homebridge-appletv-enhanced/issues/328#issuecomment-2455275612, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHC4H6B3XXTJW2Y3IWFVODZ66T3HAVCNFSM6AAAAABQVMWSFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJVGI3TKNRRGI . You are receiving this because you were mentioned.Message ID: @.***>