maxileith / homebridge-appletv-enhanced

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

Synology Python 3.8 #757

Open justlen1 opened 5 days ago

justlen1 commented 5 days ago

Preconditions

Current Situation

My plug-in recently stopped updating the HomeKit accessories. Running on Synology.

I first downgraded the plugin (to 1.92.10) to see if that was the issue. When there was no changed I deleted the plugin, deleted the accessories from HomeKit then reinstalled. After reinstalling i see no links or codes in the terminal logs to re-setup my AppleTVs.

I suspected that part of the issue may be Python and OpenSSL. I do have Python 3.11.10-9 installed via the Synology Package Center, yet HomeBridge is reporting 3.8.15 (in the Additional Context below). HomeBridge is reporting OpenSSL 1.1.1 even though the current version of Synology DSM states it includes OpenSSL 3.

Also, when it was previously running I was getting frequent Avahi errors; I do not know it that is pertinent.

Logs

[11/20/2024, 11:43:41 AM] [Apple TV Enhanced] Restarting Process...
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] Launched child bridge with PID 31787
[11/20/2024, 11:43:42 AM] The plugin "homebridge-appletv-enhanced" requires Node.js version of ^22.11.0 || ^20.18.0 || ^18.20.5 which does not satisfy the current Node.js version of v20.9.0. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF
[11/20/2024, 11:43:42 AM] Registering platform 'homebridge-appletv-enhanced.AppleTVEnhanced'
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] Loaded homebridge-appletv-enhanced v1.10.1 child bridge successfully
[11/20/2024, 11:43:42 AM] Loaded 0 cached accessories from cachedAccessories.0E7E58B184B3.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [I] Platform: Finished initializing platform: Apple TV Enhanced
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [D] Platform: Executed didFinishLaunching callback
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [I] Update check: The update checker is configured to check for updates between 3:00 and 3:59, excluding betas. Auto updating is turned on.
[11/20/2024, 11:43:42 AM] Homebridge v1.8.5 (HAP v0.12.3) (Apple TV Enhanced) is running on port 36464.
[11/20/2024, 11:43:42 AM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

Failed to create listener for avahi-daemon server state. The system will not be notified about restarts of avahi-daemon and will therefore stay undiscoverable in those instances. Error message: Error: No such interface found
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [D] Update check: The latest AppleTV Enhanced version (excluding betas) is 1.10.1
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [S] Update check: You are using the latest version of AppleTV Enhanced (excluding betas): 1.10.1
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [D] Update check: Starting update check interval.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [D] Update check: Skipping initial update check.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [I] Python check: Starting python check.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [D] Python check: Using the systems default python installation since there is no custom python installation specified.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [I] Python check: Using "python3" as the python executable.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [I] Python check: plugin dir exists.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [W] Python check: You are using OpenSSL 1.1.1. However, OpenSSL 3.0.0 or later is required for the most recent AppleTV enhanced version. Falling back to openssl legacy mode. Be aware that Python 3.12 or later is not compatible with openssl legacy mode.
[11/20/2024, 11:43:42 AM] [Apple TV Enhanced] [E] Python check: Python 3.8.15 is installed. However, only Python 3.9 to 3.11 is supported.

Configuration

{
    "name": "Apple TV Enhanced",
    "deviceStates": [
        "idle",
        "paused",
        "playing",
        "stopped"
    ],
    "deviceStateDelay": 0,
    "avadaKedavraAppAmount": 15,
    "disableVolumeControlRemote": false,
    "absoluteVolumeControl": false,
    "setTopBox": false,
    "discover": {
        "multicast": true
    },
    "forceVenvRecreate": false,
    "logLevel": 5,
    "updateCheckLevel": "stable",
    "updateCheckTime": 3,
    "deviceSpecificOverrides": [
        {
            "overrideMediaTypes": false,
            "overrideDeviceStates": false,
            "overrideDeviceStateDelay": false,
            "deviceStateDelay": 0,
            "overrideRemoteKeysAsSwitch": false,
            "overrideAvadaKedavraAppAmount": false,
            "avadaKedavraAppAmount": 15,
            "overrideCustomInputURIs": false,
            "overrideDisableVolumeControlRemote": false,
            "disableVolumeControlRemote": false,
            "overrideAbsoluteVolumeControl": false,
            "absoluteVolumeControl": false,
            "overrideSetTopBox": false,
            "setTopBox": false
        }
    ],
    "_bridge": {
        "username": "0E:7E:58:B1:84:B3",
        "port": 36464
    },
    "platform": "AppleTVEnhanced"
}

Operating System

Linux

Operating System: Bits

64-bit

Operating System: Distribution

Synology

Operating System: Distribution Version

DSM 7.2.1-69057 Update 6

Docker

no

Docker Image

None

Docker Image Tag

No response

Homebridge Version

1.8.5

Homebridge Config UI Version

4.63.0

Homebridge Storage Path

/volume1/homebridge

Homebridge Apple TV Enhanced Version

1.10.1

Node Version

v20.9.0

NPM Version

10.8.2

Python Version

3.8.15

PIP Version

No module named pip

HDMI Hops

None

Audio Output

no

Same Subnet

yes

Additional Context

From Homebridge Terminal:

Homebridge Terminal for Synology DSM

Node.js Version: v20.9.0 Node.js Path: /var/packages/Node.js_v20/target/usr/local/bin/node Plugin Path: /volume1/homebridge/node_modules

Update Node.js: hb-service update-node

Install Plugin: hb-service add homebridge-plugin-name Remove Plugin: hb-service remove homebridge-plugin-name

homebridge@Vault:/volume1/homebridge $ python3 --version Python 3.8.15 homebridge@Vault:/volume1/homebridge $ python3 -m pip --version /bin/python3: No module named pip homebridge@Vault:/volume1/homebridge $ openssl version OpenSSL 1.1.1u 30 May 2023 homebridge@Vault:/volume1/homebridge $ apt bash: apt: command not found

justlen1 commented 5 days ago

I went ahead and installed Entware on the Synology as recommended on the Homebridge Github page and ran a Python install to 3.11. HomeBridge is still reporting 3.8.

I may be getting in over my head here.

maxileith commented 4 days ago

I am not familiar with Synology. Make sure that a compatible python executable is in the PATH in the environment that homebridge is running in.

If you are using docker you can just update to the latest version of the image.

justlen1 commented 4 days ago

I went ahead and ripped out the Synology Homebridge and set it up again as a Portainer container. It loads up perfectly. I'm having some issues setting my apple TVs back up (one is giving me the standard pairing URL and the other is telling me to enter the homekit code manually but the Apple Home app isn't seeing the accessory) but I will dig through the issues and see if there's a fix.

It does appear that utilizing the plugin via a direct Synology instance doesn't work well as it is difficult to manage the Node.js and Python versions in Synology. Might be easier to just put womething in the readme that it's not a recommended configuration.

shivanathd commented 20 hours ago

I'm also getting this error, I've installed python 3.11 as per documentation .. I've deleted python 3.8 as well.. but on synology I'm still getting this error. Please help. Also I've installed the package from the DSM store and not as docker container.

justlen1 commented 6 hours ago

I'm also getting this error, I've installed python 3.11 as per documentation .. I've deleted python 3.8 as well.. but on synology I'm still getting this error. Please help. Also I've installed the package from the DSM store and not as docker container.

After days of beating my head against the wall I installed it as a Docker container. It took about 15 min and has been rock solid ever since. A backup/restore of my Homebridge config between versions allowed me to retain all my other plugins and configuration.