New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home Assistant integration does not work with tvOS 15 #1333
Comments
Same here. After entering the first pin (out of two - as it was before?) it stops working. |
It is because of tvOS 15, there are a couple of issues about it. You either have to sit tight and wait until I have updated the integration or run the beta version until I'm done. https://github.com/postlund/hass-atv-beta (It's available in HACS) |
Where do I have to look for? I can't seem to find the beta in HACS. |
Hi, I’ve installed the beta component and it sees all my Apple TV’s, and can integrate them with the pairing codes, although I do get the same error above, but HA still can’t see their state. I have all my light automations set up to dim based on their playing, paused etc. state. Feels like I’m back in the 80s having to manually dim the lights. Apple TV state in HA just says Off. I did remove he, from HA before installing the beta component, and they have been detected but the integration isn’t working yet. Thanks so much for your hard work on this. Really appreciate it and I really miss this function not working. |
@Smiggel it should be called "Apple TV beta component" or something like that. If it doesn't show up, try adding the address manually. That should work. @DuncanRae Can you check the log? Might be that the connection fails for some reason. |
Installed the new beta and it works good for what I can see. HA sees my Apple TV. I was able to pair it and as soon as I play something on Netflix, I see it in HA! Nice. Can't say if it stable yet. Have to test it more. But looks really promising! Thanks! |
@Smiggel Sounds great! 👍 I'm very interested in stability related testing, so please report back on that! |
@postlund Will do. Will test it this week. |
Hi, The only thing I can find of interest in the log is this which is happening over and over again. I do see it mentioned in another thread too: 2021-09-25 20:53:14 DEBUG (MainThread) [custom_components.apple_tv] Discovering device DEFB5818-ABD3-4C56-A2FB-21A5248ACC44 I did completely remove the devices from HA before re-adding with the new beta component. I also cleaned out all the old pyatv references on the Apple TV itself. |
@DuncanRae It's the same situation as in #1335. It has taken some time for me to grasp the situation, but I know exactly why this happens. Will try to work out a fix as soon as I can. |
Awesome. Really appreciate the work! |
i cant find the beta in hacs |
Cheers. Really appreciate. Couldn't find the "Apple TV beta component" or "pyatv" on HACS. |
So far so good. Ran multiple test today with Netflix and Disney+ and it’s running fine. No problems so far. |
same here😅 |
Manually adding a repo can be done like this: https://hacs.xyz/docs/faq/custom_repositories Just use https://github.com/postlund/hass-atv-beta as address. |
Got it. Cheers |
@postlund even with the config version bump that you pushed around 1 hour ago I'm still facing issues. I made sure to delete all references from My logs show:
This happens after the second input of an AirPlay pin. When I go to "Remote App and Devices" I have under devices "Unknown Device" entries as many times I tried to pair HASS to the AppleTV |
@mpeterson That looks like a bug or something I have not implemented in OPACK to me, cool! It would be great if you either enable debug logs for pyatv (https://github.com/postlund/hass-atv-beta#debug-logs) or try to reproduce with atvremote like this:
|
It seems I have the same problem (with authentication) as above and got a log. @postlund I sent you a PM on discord! |
with the second beta version the player is always off, I tried to remove and reinstall the integration but it doesn't solve it |
What does the log say? |
|
@robyevolution Did AirPlay succeed to pair when you added the device? |
it is added correctly but the entity is always off, tried to restart home assistant and apple tv but the problem persists |
This line:
Means that the MRP-over-AirPlay channel failed to set up, so there's basically nothing that provides metadata and that's why the device appears to be off. We need to figure out why that is happening. What device is this? Can you install pyatv so we can run atvremote? Or run it via docker? |
1.6 . .recently updated |
No issues on ATV 3 or Homepod mini |
Well .. I must say .. was struggling a bit with ATV3 mutliple restarts etc. .but finally pairing was successful |
Then it's probably a new type I haven't implemented yet. I need some logs to troubleshoot. If you add this to you config: logger:
logs:
pyatv: debug Then restart. Once you see the error above, look above for a line looking:
I need that line. |
Do you have any logs from problems with the ATV3? I was hoping that was pretty stable. |
I'm afraid no .. but I can delete ATV 3 and retry . ... maybe it was temp issue - once was OK and later with bit of issues .. |
2021-10-21 22:30:19 DEBUG (MainThread) [pyatv.protocols.companion.connection] Connected to companion device 192.168.2.83:49152 |
U'll never guess ...wasn't working for few days ... worked now .. log below 2021-10-21 22:32:36 DEBUG (MainThread) [pyatv.protocols.companion.connection] Connected to companion device 192.168.2.83:49152 |
Now .. let me know if u need anything .. I have as well streaming from link / web running via mediaplayer so if u want to test any functionality - let me know |
I'm struggling with the same Does the Apple TV "talk" back on different TCP/UDP connections to the HA? Or is HA always "polling" for data? |
I am 99% certain that the Apple TV checks if the IP address belongs to one of the networks that it is on and reject connections from other networks. Just like MDNS requests shall be dropped (according to spec) if they originate from another network. All of these protocols are designed for use on the local network. If someone figures anything out that works, please let me know. I will not put any more effort into supporting devices on different subnets, it's too much work for me to handle with very few users. |
Well my fix is a bit more advanced: Create an outbound NAT rule that translates to the router IP address on that van ;) Example: NAT rule: on outbound on AppleTV Vlan interface -- from 10.0.80.10 to 10.0.81.10 NAT with ip 10.0.81.1 That seems to work and I would not see any problems doing this |
@ruant It's not marked as MUST in the specification, but SHOULD. It's all in here: https://datatracker.ietf.org/doc/html/rfc6762#section-5.5 It is all very reasonable and in my opinion it would have been better to just force that as part of the specification to begin with. Anyhow, re-mapping IP address with NAT certainly works as the makes the source IP correct. It's not for the faint of heart though. On another note... I decided that it's time to start integrating with Home Assistant since that will probably take a while, so a PR is now open here: https://datatracker.ietf.org/doc/html/rfc6762#section-5.5 |
If you are using TTS with the beta integration, please see: |
@postlund since you started requiring HAss 2021.11. 0 it's no longer possible to install ANY version using HACS which is a bit of an issue as I updated to 1.7.0 which didn't work out, so when I went to roll back to 1.6.0 it won't let me. |
I've been testing out the new version of the HA component and most of it works fine, but I'm having issues with the new power management features. In theory it's nice to have it mapped to HDMI CEC, but unfortunately for my cases it's kind of counterproductive: [Edit] |
@mpeterson did you find a solution for this? I have the same problem on v1.9.1 @postlund I was able to collect some logs using your suggested
|
@Qonstrukt Sorry about the late response here, no excuses for that. So, here is my theory. The media player will report Edit: Created #1500 for this. |
@bverkron That looks good to me. I can't say why remotes are listed as "Unknown Device", but I have not looked into it either. Is this still the case with the latest version of the component? |
home-assistant/core#58665 has been merged to core, so the release in January will have the updated component bundled! 🎉 Hopefully I will be able to implement some more stuff before then. |
I see the latest version requires home assistant 2021.12 which apparently won't be out until Dec 11th. I will try the latest version of this component once I've upgraded to 2021.12 sometime in December, hopefully. |
That sounds very strange and I have no theories of how/why that happened I'm afraid. But good that it worked out in the end at least. |
Hello, I am trying to connect my apple tv(tvOS 15.4.1) to HA(v2022.4.5). Can someone please point me towards a config file or some other location where i can enter an ip address ? I found a file which contains some properties but I don't know if this is the right file : /root/config/.storage/hacs/224041719.hacs Thank you ! Best regards, |
This is an outdated ticket. The integration in HA itself should be up to date with what is in HACS. Besides that, when you add an Apple TV manually in HA you can just specify an IP, so as long as inter network routing is set up properly it should technically work. I think you will also need mDNS forwarding/proxy'ing between those networks. |
Describe the bug
An aborted noted popped up every time when I try to add my Apple TV into hass.
Error log
How to reproduce the bug?
After typed in the PIN code displayed on Apple TV.
What is expected behavior?
Successfully add Apple TV Integration.
Operating System
core-2021.9.7
Python
Other
pyatv
not sure
Device
Apple TV 4K tvOS 15.0(19J346)
Additional context
Using tvOS 15.0(19J346) on my Apple TV 4K.
The text was updated successfully, but these errors were encountered: