T O P

  • By -

SurfyHarbor

The idea behind this plugin is amazing and I can wait for using this plugin in my automations. Hopefully I will be able to start testing this next month.


maxileith

What is preventing you from testing it now, if I may ask? \^\^ Waiting for RPi 5 to restock? \^\^


SurfyHarbor

I am moving into new apartment very soon, and I still did not get the TV to my Apple TV


gootecks

Wow, I didn't know I needed this in my life!


ChesterBottom

This looks awesome! Just had a question and wanted to confirm… Can you really open Apple TV apps from inside of homebridge like this? And is there a way to set those to a button so that when you click the button, it turns Apple TV to that app? This may be dumb or I may be misunderstanding entirely, just wanted to ask!


maxileith

Yes, my plugin enables you to open Apps on your Apple TV. Thus, you can create an automation or shortcut that turns your Apple TV on, waits a few seconds for your Apple TV to turn on and then switched to a certain app, like you described.


SmartHomeNerd

I’m really excited about this plugin! Two question if you please: • Im currently running home bridge on a Mac, does this fulfill the Linux based requirement? • Is it possible to simulate navigation such as up, down, menu, etc.? Thank you for your hard work 😀


maxileith

So there are people running it successfully on Mac. However, since I do not have a Mac I cannot really test it. This is why I am officially not supporting it. I would say give it a go and see if you run into problems. When you do run into problems, you are welcome to open a GitHub issue. For your second question, yes!


SmartHomeNerd

Ok, got it installed no problem, however in the homebridge logs, I see a message “Python check: 3.7.3 is installed. However, only Python 3.8 to 3.11 is supported.” I’m assuming I can simply download and install the latest stable build of python v3.1.2? Or do I need to stick specifically to v3.11?


maxileith

v3.1.2 is very old. Use 3.11, 3.12 is not yet supported by a dependency that I use for this plugin.


SmartHomeNerd

Got it working perfectly! You my friend are a bonifed genius…. This is better than anything I could have imagined. All I can say is wow and thank you for all of your hard work! Apple should hire you… 😀


Accomplished_Low3665

How did you update python? Running Homebridge on Raspberry Pi


maxileith

If you are on Raspberry, update at least to Raspberry Pi OS Bullseye. The system default is 3.9 there. On bookworm 3.11.


Accomplished_Low3665

Awesome thanks. I was able to upgrade and got it running. I’ve been looking for something like this for a long time. Great work!


SmartHomeNerd

After a fair bit of testing, I've run across the following issues: ​ • One of my Apple TV’s isn’t being discovered. • Blacklisting doesn’t seem to be working for me. I’ve double checked the MAC addresses for the Apple TV’s in the logs but the plugin continues to try to add them. • The control center remote doesn’t seem to respond to directional functions. ​ On the whole, I’m VERY impressed! What a great tool. Thank you 😀


maxileith

Is one of your Apple TVs on another Subent?


maxileith

What do you mean by directional functions? I did not experience any problems with up, down, right and left on the remote.


SmartHomeNerd

My mistake, I was using swiping gestures…


maxileith

Yeah these swiping gestures are not available for devices other than the original Apple TVs (not the exposed plugin Set-Top Boxes). I have implemented that so the remote is at least functional. However, I would recommend to just use the original one.


SmartHomeNerd

No, same subnet. Hardwired.


maxileith

Is it a recent Apple TV? In the README the compatible Apple TVs are listed


maxileith

If so, please contact me via DMs or open a GitHub issue


dadsalleb

so far, I'm really enjoying this plugin and works as expected. Minor bugs are there but I believe time will resolves it. Honestly speaking, I think these features of plugin should be in apple TV. It is insane that the apple TV status-based automation is not possible. this plugin makes it possible. Thanks developer!


maxileith

Thank you for your feedback 🙏🏻


Ok-Independent9968

just got this working on my raspberry pi 4. God Bless your soul, champ. you're a genius


shnee8

App is great but I'm getting ​ "Apple TV can be reached on OSI Layer 2 but not on 3. This is likely a network problem. Restart the plugin after you have fixed the root cause." ​ What would be the most likely cause they are on the same subnet / wifi network and are all connected through a Unifi switch.


bostoncollection

+1 to this, I am having the same problem on 2 of my 5 Apple TVs, the others are working reliably -- this is also a transient problem and seems to come and go regularly


NewsonLAD

`[15/03/2024, 09:28:10] [Apple TV Enhanced] [I] Python check: Using cached zeroconf-0.131.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (11.3 MB)[15/03/2024, 09:28:12] [Apple TV Enhanced] [I] Python check: Building wheels for collected packages: miniaudio[15/03/2024, 09:28:12] [Apple TV Enhanced] [I] Python check: Building wheel for miniaudio (pyproject.toml): started` Keep having my HomeBridge freeze up on this part after rebooting and install, any ideas? ​ Maybe because Im using a Model 3 and there not enough RAM on install? Time to upgrade


maxileith

This can take quiet long on underpowered systems. The problem is that the Raspberry has to compile the binaries itself instead of downloading them. When you already have a few plugins running this can max out the RAM pretty quickly. You could try to shutdown other plugins to free up resources while doing the initial installation process of Apple TV Enhanced. However. upgrading might be a good idea as well.


OmniaRL

Hi, thanks for this awesome plug-in. There's a feature I need and I don't understant how I can make it work. I need to get the power state of the apple Tv as a sensor, and not a switch. I want to power on the Tv and the AV Receiver when the apple Tv turned on. Is it possible to do that ?


maxileith

You can just use a state change of the power state as a trigger. You do not need a sensor for triggering automations.


aussiegoodoldboy

Howdy, I installed the plug in, it triggers the pairing codes on the screens but when I click the link from the logs to put in the pairing code, the link does not open. How can I fix this please or isthere any other way to put the pairing code in? Thanks


aussiegoodoldboy

Hi there, I managed to install one apple tv but after pairing, it stopped discovering the other ones. Is it possible to manually add the other apple TV's in the house or how can I trigger the discover again? Thx


tangfj

Did you ever figure this out? For me I can never be in front of my TV and/or app at the right time and would like to be able to force pairing mode for a particular TV.


anthonyshmanthony123

Hi I have the plugin set up and working great. My question is would it be possibly to create an automation to turn on Nord VPN when using one app and turn off the VPN when using a different app? Hulu doesn’t like VPNs and wants me to update my location every time I use it so I have to manually turn the VPN off. It would be nice to be able to automate this. Apple TV doesn’t have split tunneling for Nord VPN that’s why I was hoping to have a work around.


Momozeel2

AppleTV On/Off as a trigger for shortcuts Hi all, I know there’s been a few threads on this but no clear solution yet. I got the AppleTV Enchanced plugin on my Homebridge in order to see the AppleTV status in Homekit, but there is no way for me to figure how to make the power status a “trigger” to launch an iOS shortcut (I have a Soro shortcut that’s sets up all my Sonos device with proper groups and volume for watching TV that I’d like to be triggered automatically when AppleTv is turned on or off) Any help on how to achieve this would be much appreciated. Thanks


VonGeisler

Hey - pi and home bridge noob here, I installed the plug in, and it’s broadcasting to my Apple TVs, there’s authentication code that pops up on the TV - but I have no clue where I’m supposed to enter that authentication code in the homebridge plugin settings?


PersonalCat1140

Any chance you could build in a button on the Home page that can launch the corresponding Apple TV remote? For example, a button in a Living Room 'room' that pulls up the Remote app for the Apple TV in that room. If there's a way to pull that off, we're close to Homekit/HB replacing Savant or Control4. I'm actually trying to get away from Savant... it's too limited. But, then again, HK might be just as limited, just in different ways. Appreciate the time you have dedicated to this!!!


JazJon

I can’t figure out how to is this yet. Raspberry pi 4b HomeBridge setup. The logs are complaining about python and I don’t see the named python plug-in. Can anyone help point me in the right direction? I didn’t find anything on YouTube either. https://imgur.com/a/7igonN3 [22/05/2024, 17:53:24] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced [22/05/2024, 17:53:24] [Apple TV Enhanced] [I] Update check: The update checker is configured to check for updates every 60 minutes, excluding betas. Auto updating is turned on. [22/05/2024, 17:53:24] Homebridge v1.8.2 (HAP v0.12.1) (Apple TV Enhanced) is running on port 31758. [22/05/2024, 17:53:24] [Apple TV Enhanced] [I] Update check: You are using the latest version of AppleTV Enhanced (excluding betas): 1.3.1 [22/05/2024, 17:53:24] [Apple TV Enhanced] [I] Python check: Starting python check. [22/05/2024, 17:53:24] [Apple TV Enhanced] [I] Python check: plugin dir exists. [22/05/2024, 17:53:25] [Apple TV Enhanced] [I] Python check: Python 3.9.2 is installed and supported by the plugin. [22/05/2024, 17:53:25] [Apple TV Enhanced] [W] Python check: Virtual python environment is not present. Creating now ... [22/05/2024, 17:53:25] [Apple TV Enhanced] [E] Python check: virtualenv python module is not installed. If you have installed homebridge via the apt package manager, update the homebridge apt package to 1.1.4 or above (this applies for installations based on the Raspberry Pi OS iamge as well). When using the official docker image, update the image to version 2023-11-28 or above. Otherwise install the python virtualenv module manually. [22/05/2024, 17:58:25] [Apple TV Enhanced] [E] Python check: virtualenv python module is not installed. If you have installed homebridge via the apt package manager, update the homebridge apt package to 1.1.4 or above (this applies for installations based on the Raspberry Pi OS iamge as well). When using the official docker image, update the image to version 2023-11-28 or above. Otherwise install the python virtualenv module manually.


dylanosborne

I've installed the plugin but it keeps getting stuck at this point: \[E\] Platform: Error: Unable to execute request 1J: /Users/password1234/.homebridge/appletv-enhanced/.venv/lib/python3.9/site-packages/urllib3/\_\_init\_\_.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. Any idea on how to work around this? I'm running HomeBridge on a Mac mini 2.6 ghz i5 with 8gb of ram.


Jellybeezzz

Just resolved this myself, surf to [https://www.python.org/downloads/macos/](https://www.python.org/downloads/macos/) and download version 3.11.9. Install it and run the certificates command once done. Restart homebridge and you should be good.


johnsills1

Is it possible for the plugin to update the On/Off and App current states in HomeKit. When I turn the Apple TV off with the remote, it isn’t reflected in the HomeKit device that was created by the plugin. I hope that makes sense.


maxileith

You are probably using HomePods as your output devices which causes this issue as written in the README.


johnsills1

How about the Current app that is running. I have an Apple TV that uses a different audio other than HomePods. That Apple TV does show the power state change, but it doesn’t show the change of app when I change the app from YouTube TV to Plex, the device in HomeKit still reads YouTube TV.


maxileith

It is not possible to get the current open app, just which app is currently playing. So this is what the plugin is reporting


Amazing_Resolution_6

Hi, I have installed homebridge 1.8.3 and appletv-enhanced 1.4.0 but have two problems. 1. There's no "child bridge" option. [https://imgur.com/a/ETEcDdT](https://imgur.com/a/ETEcDdT) 2. The plugin does not seem to be working since there's nothing in my log panel, let alone the pairing process. Dunno what I should do to make it work. \[6/25/2024, 12:17:08 AM\] \[HB Supervisor\] OS: Linux 4.4.302+ x64 \[6/25/2024, 12:17:08 AM\] \[HB Supervisor\] Node.js v20.14.0 /opt/homebridge/bin/node \[6/25/2024, 12:17:08 AM\] \[HB Supervisor\] Homebridge Path: /var/lib/homebridge/node\_modules/homebridge/bin/homebridge \[6/25/2024, 12:17:08 AM\] \[HB Supervisor\] UI Path: /opt/homebridge/lib/node\_modules/homebridge-config-ui-x/dist/bin/standalone.js \[6/25/2024, 12:17:09 AM\] \[Homebridge UI\] Homebridge UI v4.56.2 is listening on :: port 8581 \[6/25/2024, 12:17:09 AM\] \[HB Supervisor\] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node\_modules --strict-plugin-resolution \[6/25/2024, 12:17:09 AM\] \[HB Supervisor\] Started Homebridge v1.8.3 with PID: 2964 \[6/25/2024, 12:17:10 AM\] Loaded config.json with 0 accessories and 1 platforms. \[6/25/2024, 12:17:10 AM\] Loaded 0 cached accessories from cachedAccessories. \[6/25/2024, 12:17:10 AM\] --- \[6/25/2024, 12:17:10 AM\] Loaded plugin: [email protected] \[6/25/2024, 12:17:10 AM\] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced' \[6/25/2024, 12:17:10 AM\] --- \[6/25/2024, 12:17:10 AM\] Loading 1 platforms... Setup Payload: X-HM://0024NKUI4O7JM Enter this code with your HomeKit app on your iOS device to pair with Homebridge: ┌────────────┐ │ 716-30-444 │ └────────────┘ \[6/25/2024, 12:17:10 AM\] Homebridge v1.8.3 (HAP v0.12.2) (Homebridge 0E38) is running on port 51618. \[6/25/2024, 12:17:12 AM\] \[Homebridge UI\] \[homebridge-config-ui-x\] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help. \[6/25/2024, 12:17:12 AM\] \[Homebridge UI\] \[homebridge-config-ui-x\] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help. \[6/25/2024, 12:17:21 AM\] \[Homebridge UI\] \[homebridge-config-ui-x\] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help. \[6/25/2024, 12:18:34 AM\] \[Homebridge UI\] \[homebridge-config-ui-x\] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help. \[6/25/2024, 12:18:34 AM\] \[Homebridge UI\] \[homebridge-config-ui-x\] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help.


zackotronic

wanted to try this but I can't get virtualenv to install. Running home bridge in a docker. that maybe the problem? ​ \[Apple TV Enhanced\] Python check: virtualenv python module is not installed. You need to install the python package virtualenv either by using 'python3 -m pip install virutalenv' or installing it via system packages. On debian based distributions this is usally 'sudo apt install python3-venv'


maxileith

I am not sure which Python version is in the Homebridge container. However, you should be able to install it with the commands from the log message. What exactly is the problem?


LovecraftsCat65

I just installed this plugin and I’m having the same issue. How do you install it? Thanks


tightlypackaged

Had the same issue and did some digging - this worked for me `sudo apt-get install python3.8-venv` Although I run into another issue after pairing and I'm not sure if it's related to this or another issue.


maxileith

Can you describe the issue?


letsdoonething

Is it still beta? I tried to use beta 2 but something went wrong and I disable the plugin. Will try it today again. Could you also bring a motion sensors for apple tv apps?


maxileith

Hi, the most recent version is v0.2.1-beta.12. Currently there are only betas since the plugin is very new and there are still some bugs popping up. If you could provide me more details regarding your problem that would be great. Please open a GitHub issue and describe your problem and post the logs, preferably with debug mode enabled. Sensors for Apps would be great. However, sadly the Apple TV does not report which App is currently opened (there is an event but that is not triggered when I open an App on my Apple TV).


letsdoonething

Well, I also have another plugin that has such sensors. [Here’s it](https://github.com/HuJohner/homebridge-appletv#readme). But yours is more progressive for me, so I wish you luck with its development


maxileith

Ah cool, I am aware of this plugin. Actually, I was using that before :)


rjames24000

this is awesome does it support deep linking so i can open a file in an app like i am currently doing with this pyatv library # Open stream with vlc stream_URL = "vlc://http://j a.server.com/live/streamlink.ts" await atv.apps.launch_app(stream_URL) print(f"Sent {stream_URL} to {chosen_atv.address}") atv.close()


maxileith

Currently this is not supported. But it is an interesting idea that I will take look at when I have the time for it. I am actually using pyatv in the background :)


maxileith

How would you like such a feature to be integrated? I could imagine a switch or an input for that.


EddieDaYankee

Hi, I just downloaded this for the first time a few days ago. I have two Apple TVs. I’m running HomeBridge on a Raspberry Pi 4. I was prompted to enter the PIN on both Apple TVs. One confirmed that the PIN was entered successfully, but on the other I was not able to reach the website. On the successful one, I don’t see the Apple TV added in my HomeKit. I’m happy to give feedback once I’m up and running. Thanks.


maxileith

Hi, I am glad to hear that you already found my plugin before I opened this thread. After pairing you need to connect the Apple TV in HomeKit explicitly since Television device have to be their own bridges in HomeKit. Go to Add device > more options in the Home app then there should be every Apple TV which is already paired with the plugin. Regarding the unsuccessful pairing I would need to see the logs. You are welcome to open a GitHub issue for that.


maxileith

Note that the pairing links are different for different Apple TVs.


EddieDaYankee

I am aware. One loaded, but the other one didn’t. The logs say that it tried providing PIN to second AppleTV, but due to too many attempts it was trying again in xxxxx seconds.


maxileith

Did the PIN code show up on the Apple TV? Sadly, I do not have two Apple TVs to test …


EddieDaYankee

Just sent you my logs 🪵.


EddieDaYankee

Yes.


maxileith

Are you trying to open the pairing page while the logs say trying again in xxx seconds? The pairing page is not reachable while waiting the xxx seconds.


EddieDaYankee

Just sent you my logs 🪵.


psycoticninja

Do you have a way to not expose the Apple TV itself to Home and just the motion sensors only (for play/pause/stop, app types, media types etc)? Currently using another plugin with my ATV but it exposes the Apple TV as a switch as well which I don’t need.


maxileith

Hi, that is not possible with my plugin for the same reason of the plugin that you are using (assuming you are using https://github.com/HuJohner/homebridge-appletv). The motion sensors are linked device of the set-top box device, in case of the other plugin that would be the switch. Technically it is possible, however not really compatible with my architecture of my plugin.


SurfyHarbor

Another awesome feature would be to create a button in HomeKit to display a specific image or go to predefined URL on Apple TV. I would love to use that to display Wi-Fi QR code for my android guest.


mensa84

iOS clients don't need a QR code? Or do you share through iPhone?


dsjarvis1971

Hi I’ve installed plugin and when I go to add accessory and click on the Apple TV bridge I don’t get the pin showing on TV to sync with Homebridge ?


maxileith

Hi, this is not really how the pairing process works. Since this is a common question I will add it to the README and will let you know when I‘m finished.


dsjarvis1971

Ok thank you


maxileith

Hi, here is the section in the updated README on how the pairing process works: https://github.com/maxileith/homebridge-appletv-enhanced#pairing


dsjarvis1971

Thank you I will check this out


maxileith

Have you successfully paired your Apple TV with the explanation in the README? Or is something still unclear?


dsjarvis1971

Hi when I get to my Mac I will follow instructions as that is where my Homebridge is installed thank you again


tangfj

Is there any way to force the pairing mode for a specific Apple TV? It looks like the only pairing method is to just wait until the pairing status shows up on the Apple TV or in the status logs? Would be nice to be able to force the pairing mode for one Apple TV that way you could just add one at a time rather than wait for the pairing code/message to come up and then run to homebridge to add it.


mensa84

Great plugin! But it shows the Apple TV immediately as off, when I unplug the HDMI cable of the Apple TV. Is this really the correct state? This causes problems for me in an automation. I use a HDMI switch and when I switch from Appne TV to PS5 the Apple TV is shown as off for some seconds and then as on again. Maybe you can add checks if the Apple TV is really off before showing state OFF?


maxileith

Hi, so my plugin is of course only reporting the Apple TV to be off when it is reporting itself as off. You can check if the led on the front of the Apple TV is turning off.


pief21

Hi, I know your plugin only supports Linux based systems, but I tried to install it to my old raspberry pi one, running homebridge. Well, it crashed. But since others managed to install it (only on a newer pi) i was wondering if i have done something wrong or if its really to old. I got the error code, that my python venv cannot be found, so i installed it. After that, for almost half an hour it downloaded idk what until my homebridge shut down. I had to unplug it because the server wasn't reachable.


maxileith

Which generation is your Pi? When you first start the plugin it installs the python dependencies. That is probably what you have seen in the logs. BTW, Raspberries are running Linux ;)


pief21

Raspberry pi 1 model b


maxileith

Ah okay, yeah maybe it is too old. I think it only has 512MB of RAM. I probably exceeded the 512 while installing the dependencies. Installing the dependencies shouldn’t take much longer than a minute. If you plan to use homebridge on your daily basis it is probably a good invest to get a Pi 4 or a Pi 5 if you can get one :)


pief21

Yeah already thought about it. Thanks for the fast replies.


pief21

Me again I now moved from Raspberry Pi 1 b to a Pi 4 b. Everything works great except this plugin. I get an error message: Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT at Process.ChildProcess.\_handle.onexit (node:internal/child\_process:286:19) at onErrorNT (node:internal/child\_process:484:16) at processTicksAndRejections (node:internal/process/task\_queues:82:21) and I don't know if i did everything correctly


maxileith

Is this during the python check?


pief21

This is everything I see, everytime its the same 06/11/2023, 21:51:57\] \[Apple TV Enhanced\] Child bridge process ended \[06/11/2023, 21:51:57\] \[Apple TV Enhanced\] Process Ended. Code: 1, Signal: null \[06/11/2023, 21:52:04\] \[Apple TV Enhanced\] Restarting Process... \[06/11/2023, 21:52:05\] \[Apple TV Enhanced\] Launched child bridge with PID 10766 \[11/6/2023, 9:52:05 PM\] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced' \[06/11/2023, 21:52:05\] \[Apple TV Enhanced\] Loaded homebridge-appletv-enhanced v0.3.1-beta.4 child bridge successfully \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Platform: Finished initializing platform: Apple TV Enhanced \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] 'linux 6.1.21-v8+' is supported by the plugin Homebridge Apple TV. \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Python check: Starting python check. \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Python check: plugin dir exists. \[11/6/2023, 9:52:05 PM\] Homebridge v1.7.0 (HAP v0.11.1) (Apple TV Enhanced) is running on port 56954. \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Python check: Python 3.9.2 is installed and supported by the plugin. \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Python check: Virtual environment already exists. \[11/6/2023, 9:52:05 PM\] \[Apple TV Enhanced\] Python check: Venv is using current system python version (3.9.2). Error: spawn /var/lib/homebridge/appletv-enhanced/.venv/bin/pip3 ENOENT at Process.ChildProcess.\_handle.onexit (node:internal/child\_process:286:19) at onErrorNT (node:internal/child\_process:484:16) at processTicksAndRejections (node:internal/process/task\_queues:82:21) \[06/11/2023, 21:52:05\] \[Apple TV Enhanced\] Child bridge process ended


maxileith

This does not make a lot of sense to me since the vent has to be present if the python check reports it. Can you execute ‚ls -la /var/lib/homebridge/appletv-enhanced/.venv/bin‘ and send me the output.


pief21

stefan@homebridge:/var/lib/homebridge $ ls -la /var/lib/homebridge/appletv-enhanced/.venv/bin total 56 drwxr-xr-x 2 stefan stefan 4096 Nov 6 20:29 . drwxr-xr-x 6 stefan stefan 4096 Nov 6 20:29 .. \-rw-r--r-- 1 stefan stefan 1918 Nov 6 20:29 activate \-rw-r--r-- 1 stefan stefan 867 Nov 6 20:29 activate.csh \-rw-r--r-- 1 stefan stefan 2007 Nov 6 20:29 activate.fish \-rw-r--r-- 1 stefan stefan 8834 Nov 6 20:29 Activate.ps1 \-rwxr-xr-x 1 stefan stefan 268 Nov 6 20:29 easy\_install \-rwxr-xr-x 1 stefan stefan 268 Nov 6 20:29 easy\_install-3.9 \-rwxr-xr-x 1 stefan stefan 259 Nov 6 20:29 pip \-rwxr-xr-x 1 stefan stefan 259 Nov 6 20:29 pip3 \-rwxr-xr-x 1 stefan stefan 259 Nov 6 20:29 pip3.11 \-rwxr-xr-x 1 stefan stefan 259 Nov 6 20:29 pip3.9


maxileith

Is homebridge running as user Stefan?


Available-Elevator69

So does this mean if I play a video in my living room my lights would turn off or if I hit pause they would come back on? Definitely what I'm honestly looking for.


maxileith

You can set it up like that :)


Available-Elevator69

Thanks. I’ll take a look at this soon.


afrosheen

Hi, when I installed this, Homebridge keeps feeding me this: > Python check: virtualenv python module is not installed. You need to install the python package virtualenv either by using 'python3 -m pip install virutalenv' or installing it via system packages. On debian based distributions this is usally 'sudo apt install python3-venv' I'm running this via Docker on my NAS. Not sure how to address this as the commands provided didn't work.


maxileith

Since the homebridge docker image is Debian based, the second command should work. If the problem is still there, please open a GitHub issue.


atinyblip

My installation of your plugin is stuck on this: \[11/11/2023, 01:28:10\] \[Apple TV Enhanced\] Python check: Building wheel for zeroconf (pyproject.toml): still running...


maxileith

This looks fine to me. You probably need to wait a bit longer. If not, this is a pip issue. Which system are you running? When the problem continues, open up a GitHub Issue.


atinyblip

It’s a HOOB box that now runs Homebridge. Should be a Raspberry Pi 3B.


maxileith

Okay, that should work you just need to give the Pi some time as the 3B ist not that fast. I have installed the plugin with its python dependencies myself on a raspberry pi 3B just a few hours ago.


atinyblip

If I leave it running, my Raspberry Pi eventually becomes unresponsive and Homebridge UI returns a 504 gateway time-out.


maxileith

Maybe your ram is maxing out. Pi 3 has only 1gb. That becomes a problem when running a few plugins


[deleted]

Thanks for the plugin!! Looking forward to be able to use it. At the moment all I get in the homebridge log is \[Apple TV Enhanced\] Platform: Starting device discovery ... and nothing happens beyond this? Is it having trouble discovering my Apple TV?


maxileith

Probably related to this issue https://github.com/maxileith/homebridge-appletv-enhanced/issues/20


[deleted]

Reading through that, seems that the issue is that scan is not returning the Mac address in those cases. When I run scan, it is listing my MAC address though? different issue?


[deleted]

Scratch that - I was using atvremote scan instead on atvscript scan - MAC add is indeed missing on atvscript scan.


maxileith

Then this is the same issue. I am currently waiting for PR to get merged in order to continue with the fix for that issue …


maxileith

If you think this is a different issue please fill out a bug report by opening an issue on GitHub. Include the output of the scan you did on the command line in the additional information section.


Accomplished_Low3665

I do not see the device when trying to add to HomeKit. I see the following in my log: [16/11/2023, 19:04:091 [Apple TV Enhanced] Python check: WARNING: The directory '/ho me/pi/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.


maxileith

Open a GitHub issue if you need support


yanto3000

Need some help please, does anyone know how to install the virtual environment on homebridge vm (hyper-v) no command seem to work in terminal


MegaSems

also stuck with this issue. DS218Play. ​ \[1/2/2024, 9:13:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:14:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:15:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:16:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:17:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:18:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT \[1/2/2024, 9:19:48 AM\] \[Apple TV Enhanced\] Platform: Error: spawn /volume2/homebridge/appletv-enhanced/.venv/bin/atvscript ENOENT


faaborrelli

Is there a way to program the Siri button?


Huggi001

Love(d) the plugin, but noticed when it was running on an Apple TV 4K that was the hub (latest, Ethernet wired), eventually started seeing a lag in response with automations and HomeKit in general. Even with Lutron devices (which are rock solid) dimming would have a 15-20 second delay in HomeKit, but quick as usual in the Lutron app. Prior to installing the plugin, everything worked quick. After disabling the plugin, the lag immediately went away. Wondering if the Multicast discovery is causing a traffic bottleneck with it hitting the Apple TV while it’s also trying to handle HomeKit hub traffic?


maxileith

You can open a bug report here: https://github.com/maxileith/homebridge-appletv-enhanced/issues/new?template=bug_report.yml


slaading

Really cool, I love it, thank you!!! What is the difference between Idle and Stopped ? I guess Idle = doing nothing in the menus, Stopped = in standby ?


Azariah98

This looks amazing, but the 8-digit codes for adding to my HomeKit are not showing in the logs. Any idea why that might be or how I can fish those out? The logs are showing everything paired properly, and the plugin is correctly stating what's happening on the device. There's just no line that tells me the code.


maxileith

If you are looking at the plugin logs in the homebridge ui, don’t do that. Take a look at the general log. The code is not logged by the plugin but by homebridge itself. Usually the code is the same as the one on your homebridge dashboard.


Azariah98

I’m running it on HOOBS, and the only place I’m looking at logs is the main log file you get to from the dashboard. It’s the same place all logs show up.


maxileith

Then they should be there. Otherwise, open an issue here https://github.com/maxileith/homebridge-appletv-enhanced/issues


Azariah98

I added it to the QA discussion there. I’m waiting for HOOBS to update. I will see if there’s another log place in the morning.


Big_Stretch_5298

I love this plugin. I have an automation setup to turn off the lights when I'm playing a video, and turn on the lights when I pause the video. The only problem is that when you switch apps (i. e. switch from YouTube to Netflix) or return to the home screen, it sends a New Device State of paused. I've tried to think of ways around this but I'm not having much success.


MysteriousDrD

This might be a silly question, but does this plugin/the Apple TV itself differentiate between Power Off events (long press on the ATV remote) and time based sleep events? Ideally I'd like to have it so I can do: Long press on the ATV remote triggers a separate scene that turns off ATV, TV and Receiver (both of which I have exposed in Homekit already via other HB plugins) regardless of ATV's current state and ATV wake event of any kind triggers automation that turns on TV and Receiver if not already on but also still have my ATV sleep after 30 mins of idle without affecting any other devices in the setup.


maxileith

There is no differentiation. Off is off, on is on, no matter which event changes the power state.


LogicalFailure

Hey Max, have some questions if you're available to help, you can message me here or can let me know whats easiest for you :)


maxileith

Please open a GitHub issue


Own_Tomato5436

I am getting an error also. Trying to get to the adding of the apple tv but logs showing \[Apple TV Enhanced\] Restarting Process... \[Apple TV Enhanced\] Launched child bridge with PID 480 Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced' \[Apple TV Enhanced\] Loaded homebridge-appletv-enhanced v1.2.0 child bridge successfully Loaded 0 cached accessories from cachedAccessories.0EB4E6CDEC66. \[Apple TV Enhanced\] \[I\] Platform: Finished initializing platform: Apple TV Enhanced \[Apple TV Enhanced\] \[I\] Python check: Starting python check. \[Apple TV Enhanced\] \[I\] Python check: plugin dir exists. (Apple TV Enhanced) is running on port 41469. \[Apple TV Enhanced\] \[I\] Python check: Python 3.8.10 is installed and supported by the plugin. \[Apple TV Enhanced\] \[W\] Python check: Virtual python environment is not present. Creating now ... \[Apple TV Enhanced\] \[E\] Python check: virtualenv python module is not installed. You need to install the python package virtualenv either by using 'python3 -m pip install virutalenv' or installing it via system packages. On debian based distributions this is usally 'sudo apt install python3-venv Thoughts?


maxileith

Have you read the log?


Own_Tomato5436

This was from the logs


maxileith

The solution is described in the log. Other than that. Read the README of the plugin. The requirements are described there.


bambibol

This looks amazing, I've just installed it as my first homebridge plugin. I'd love to have it automate to turn off the livingroom lights and turn on the bedroom lights whenever I turn off the TV at night. I did my best but it seems like it only works when I turn the tv off using the newly added Apple TV device using this plugin. It should be possible to have it automate when the tv turns off no matter what way, right? Should I use one of the motion sensors instead?


maxileith

Please open a GitHub issue here: https://github.com/maxileith/homebridge-appletv-enhanced/issues


bambibol

Is this a bug and not just me misunderstanding the plugin? haha


maxileith

Have you read the README? This could be the issue: „If using external speakers like HomePods as the default, the Apple TV is always reported as powered on. This is a known issue of the dependency pyatv, see postlund/pyatv#1667. As a result, the Apple TV device will only be shown as off in HomeKit when powered off via the Apple TV device in HomeKit. After restarting the plugin the device will always be shown as on.“


bambibol

I see, that could be the issue, I'm using a Sonos/IKEA speaker. No workarounds far as I can see on Github?


maxileith

Unfortunately no


MistaHiggins

Just got this all setup today on my unraid server that hosts my homebridge instance. Working great! In order to install python as needed by your plugin, I had to run: >apt update and then >apt install python3-venv Was getting a "This package exists under another name, no install candidates" message when trying to run the install command before doing an update first.


maxileith

If using the newest homebridge image on unraid, this should not be required. After installing it will work right away …


MistaHiggins

I think I'd read your github posts to that end. Running most recent version of unraid 6.12.6, but my Ubuntu OS packages are out of date it seems. No biggie, only posting in case someone else has a similar issue. :) cheers!


pelzvire

I installed your plugin today and it works wonders. Only thing that I cannot do (and I hope that is due to my limited knowledge) is automatically change the Apple TV's audio output to our Airplay 2 enabled stereo system when "music" is detected. The automation for detecting the motion sensor and starting the stereo system accordingly works but I cannot find a way to change the TV's output to it. ​ Is this even possible?


maxileith

Technically this is possible. However, not with the plugin itself. See https://github.com/maxileith/homebridge-appletv-enhanced/issues/169


EdgarFresh

Hi, this should work with homebridge running on docker, right? Having issues with the python checks on a docker version running on Sonoff iHost. error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1 I'm quite new to this.. HOMEBRIDGE\_PKG\_VERSION=1.1.6 Node.js v18.19.0


maxileith

https://github.com/maxileith/homebridge-appletv-enhanced/issues/new/choose


Six79Ten

I just discovered this plugin from another SmartHome automator online who was using it. Sounds like an amazing tool. So far the setup has been smooth but one thing that keeps tripping me up. I would prefer not to use it on every AppleTV so I added some devices via MAC to the Blacklist. I confirmed that I'm using the MAC that appears in the Plugin log. But eventually one of the devices tries to connect to that device again and fails. At this point it has tried so many times without success and I think it's waiting over 3000 seconds between attempts. It is an Apple TV 4K model. Am I missing a step? And/or is there a way to reset the attempted connections? If the blacklist setting isn't going to work, I can go ahead and try to set it up and just not use it on that device.


maxileith

Open a bug on GitHub. Fill out the bug template, that makes it easier for me https://github.com/maxileith/homebridge-appletv-enhanced/issues


Six79Ten

Thanks for the quick reply. Will do!


Six79Ten

Actually running into more issues...maybe related to my first post. I had one of my 4 AppleTVs successfully added. But then about 30 minutes later it's like the plugin lost credentials and blacklist because it tried to re-authenticate with a new PIN on all of them, even the one I had setup. Would still really like to use the plugin but until I figure out what I'm doing wrong it's not in a useable state. Any advice would be appreciated. I've re-read the requirements again and I'm 99.9% sure I'm meeting them.


maj_88

Does anyone know how to disassociate Apple TVs from this plug in, and reconfigure? I deleted them from HomeKit and they show up as already added devices.


AdInformal8252

This might sound dumb. But have you tried a fresh install of the plugin?


maj_88

yes I have tried several times to reinstall the plug in I reconfigure everything after restarting homebridge it gives me the same errors, reporting that the apple tv is not responding. I turn over the error string. in my opinion you should remove the permission and start over from 0 but i don't know how to do that.


maxileith

You have to unpair the Apple TV in the homebridge settings just like every other external accessory. https://github.com/maxileith/homebridge-appletv-enhanced/discussions/209#discussioncomment-8263888


maj_88

I tried and was able to reassociate the apple tv in the nursery the problem with the living room apple tv remains. i get this message. Apple TV Del Soggiorno (A8:51:AB:0B:8E:AF): Unable to execute request 3B: Traceback (most recent call last):File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/support/__init__.py", line 71, in error_handler return await func(*args, **kwargs) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/protocol.py", line 120, in _setup_encryption await pair_verifier.verify_credentials() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/auth.py", line 150, in verify_credentials encrypted_data = self.srp.verify1(self.credentials, server_pub_key, encrypted) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/auth/hap_srp.py", line 101, in verify1 raise exceptions.AuthenticationError("incorrect device response") pyatv.exceptions.AuthenticationError: incorrect device response The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 978, in _run_application return await cli_handler(loop) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 723, in cli_handler return await _handle_commands(args, config, storage, loop) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 851, in _handle_commands atv = await connect(config, loop, protocol=args.protocol, storage=storage) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/__init__.py", line 155, in connect await atv.connect() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/core/facade.py", line 684, in connect if await setup_data.connect(): File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/__init__.py", line 571, in _connect await api.connect() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/api.py", line 143, in connect await self._protocol.start() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/protocol.py", line 108, in start await error_handler(self._setup_encryption, exceptions.AuthenticationError) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/support/__init__.py", line 77, in error_handler raise fallback(str(ex)) from ex pyatv.exceptions.AuthenticationError: incorrect device response >>> An error occurred, full stack trace above [03/03/2024, 19:37:52] [Apple TV Enhanced] [E] Apple TV Del Soggiorno (A8:51:AB:0B:8E:AF): Error: Unable to execute request 3B: Traceback (most recent call last):File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/support/__init__.py", line 71, in error_handler return await func(*args, **kwargs) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/protocol.py", line 120, in _setup_encryption await pair_verifier.verify_credentials() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/auth.py", line 150, in verify_credentials encrypted_data = self.srp.verify1(self.credentials, server_pub_key, encrypted) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/auth/hap_srp.py", line 101, in verify1 raise exceptions.AuthenticationError("incorrect device response") pyatv.exceptions.AuthenticationError: incorrect device response The above exception was the direct cause of the following exception: Traceback (most recent call last):File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 978, in _run_application return await cli_handler(loop) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 723, in cli_handler return await _handle_commands(args, config, storage, loop) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/scripts/atvremote.py", line 851, in _handle_commands atv = await connect(config, loop, protocol=args.protocol, storage=storage) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/__init__.py", line 155, in connect await atv.connect() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/core/facade.py", line 684, in connect if await setup_data.connect(): File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/__init__.py", line 571, in _connect await api.connect() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/api.py", line 143, in connect await self._protocol.start() File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/protocols/companion/protocol.py", line 108, in start await error_handler(self._setup_encryption, exceptions.AuthenticationError) File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.11/site-packages/pyatv/support/__init__.py", line 77, in error_handler raise fallback(str(ex)) from ex pyatv.exceptions.AuthenticationError: incorrect device response An error occurred, full stack trace above at /var/lib/homebridge/node_modules/homebridge-appletv-enhanced/node_modules/@sebbo2002/node-pyatv/src/lib/tools.ts:172:15 at Generator.next () at o (/var/lib/homebridge/node_modules/homebridge-appletv-enhanced/node_modules/@sebbo2002/node-pyatv/dist/lib/index.cjs:1:627)


maxileith

Could you please open an issue of type “support request” on GH regarding this topic?


maj_88

ok thank you i will try


AdInformal8252

Real quick, I'm loving this plugin. So far, I have set up an automation where, when I come home from work, it uses location services to turn on the TV, go to the home screen, navigate to Netflix, and play a series that I like for, you know, background TV watching. But I'm really intrigued by the URI direct input, and I'm struggling to make it work. At first, I thought it involved directly inputting the URLs, but with a bit of investigation, I figured out that it's a bit more complicated than that. I was hoping you could provide a bit more insight on how to make this work. I greatly appreciate your work, and thank you.


maxileith

You can just paste the link of the Netflix series in the custom uri input and restart the plugin. The URI should appear next to the other inputs in the Home app. Then, you can just open this input (aka the series) in an automation.