MrAsterisco / homebridge-hisense-tv

A Homebridge plugin to control RemoteNow-compatible HiSense TVs.
MIT License
22 stars 8 forks source link

Cannot add TV to Apple Home app #73

Open AdamWrighter opened 15 hours ago

AdamWrighter commented 15 hours ago

Describe The Bug: After bashing my head against the setup process I finally managed to get my TV paired with Homebridge (involved finding a path to an SSL cert and privkey in some old, closed issue. put this in the setup guide!)

However, though the TV shows up in Homebridge and on/off controls within the Homebridge dashboard work, I cannot add the TV to my apple home app. In Homebridge, there is a message saying: "Please add [HiSense 24C8] manually in Home app. Setup Code: XXX-XX-XXX". The code XXX-XX-XXX that it shown is the same code as that used by my Homebridge, rather than its own code, and it does not show up when going through the process to add a device in Apple Home.

To Reproduce:

  1. Set up new TV.
  2. Try to add to Apple Home app.

Expected behavior: The TV should show up in the Home app.

Logs:

There are no errors. As far as your plugin and Homebridge is concerned, everything is working fine. I just can't add the TV to the Apple Home app.

Plugin Config:

{
    "macaddress": "90:09:d0:59:0c:00",
    "devices": [
        {
            "id": "HiSenseTV",
            "name": "HiSense",
            "showApps": false,
            "tvType": "fakeSleep",
            "pollingInterval": 4,
            "wolInterval": 400,
            "wolRetries": 3,
            "ipaddress": "192.168.86.250",
            "macaddress": "80:cb:bc:a0:1d:b0",
            "sslmode": "custom",
            "sslcertificate": "/var/lib/homebridge/sslcerts/rcm_certchain_pem.cer",
            "sslprivatekey": "/var/lib/homebridge/sslcerts/rcm_pem_privkey.pkcs8"
        }
    ],
    "platform": "HiSenseTV"
}

Screenshots:

Environment:

LeLunZ commented 14 hours ago

Hey :) The setup process is quite complicated, that true. But that's needed to get the TV working. I think that the Readme has so much information and thus you sometimes miss important things. But all the information is needed to get a working setup, so its also hard to remove stuff. Is there anything specific you want in the Readme or something that's unclear?

Regarding the certificates. In the Readme there is already a link and it's described how to use them. Its under "setting up the TV", and directly at the information on how to use SSLMode custom.

SSLMode: custom (use cert and key below) Replace \<CERTFILE> and \<KEYFILE> with the path to the certificate and key files you want to use. The certificate and key files most used can be found here

Regarding the issue you are having: It's normal that you see the same code as the homebridge code. You said you tried to add the device through the home app, did you try it like that?

In the Home app it should be similar to:

  1. click "plus icon"
  2. click "add device"
  3. click "More options" or "I don't have a code or cannot scan"
  4. Then it should show the TV (if yes continue with step 7) or if not click on "my device isn't shown here"
  5. Click on "enter code".
  6. Enter the code from your homebridge logs
  7. Select your TV
  8. Enter code from homebridge logs again
LeLunZ commented 14 hours ago

Do you already have other Homebridge devices?


My guess why it's not working: it has something to do with docker.

Homebridge/Home uses "mDNS-based service discovery", which needs a stable and "normal" network. If you run something in a docker container, you often don't have a "normal" network. Try to take a look here under "Avahi (Linux and Docker)": https://github.com/homebridge/homebridge/wiki/mDNS-Options

Other possible solutions are: