MrAsterisco / homebridge-hisense-tv

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

Cannot run hisense-tv-authorize from Homebridge running in Docker on Synology NAS #67

Open Shaun-R opened 2 months ago

Shaun-R commented 2 months ago

Describe Your Problem: As detailed in #51, I have three Hisense VIDAA TVs. I never got around to re-testing with v2.0.1 which fixed the SSL verification issue, so only ever had two of the three TVs configured with the homebridge-hisense-tv plugin.

I recently updated to v3.0.0 of the homebridge-hisense-tv plugin. I updated the config.json appropriately, including adding the MAC address of my Synology NAS' ethernet interface.

I am now trying to add the third TV (the 55Q8, running VIDAA U 4). However, despite following the instructions, it seems to not be working. Prior to adding the 55Q8 to my config.json, I attempt to run hisense-tv-authorize, however I am met with an error: Connection failed - please check your configuration and try again.

I've tried uninstalling and reinstalling the plugin, without success.

I'm hoping there's something obvious I'm missing, or that you can at least point me in the right direction. Thanks in advance!

Logs:

root@homebridge:/var/lib/homebridge $ hisense-tv-authorize --hostname 192.168.1.50 --mac 00:11:xx:xx:xx:xx
Connection failed - please check your configuration and try again
root@homebridge:/var/lib/homebridge $ hisense-tv-authorize
Connection failed - please check your configuration and try again
root@homebridge:/var/lib/homebridge $ 

Plugin Config:

{
    "macaddress": "00:11:xx:xx:xx:xx",
    "devices": [
        {
            "id": "Hisense 55PX",
            "name": "Living Room Hisense",
            "showApps": false,
            "tvType": "default",
            "pollingInterval": 4,
            "wolInterval": 400,
            "wolRetries": 3,
            "ipaddress": "192.168.1.52",
            "macaddress": "10:c7:xx:xx:xx:xx",
            "sslmode": "disabled"
        }
    ],
    "platform": "HiSenseTV"
}

Screenshots: NA

Environment:

Shaun-R commented 2 months ago

Hi again, I have another home where I run Homebridge on Windows 10 using Hyper-V. The plugin was previously working fine. I installed the v3.0.0 update, and now I cannot control my TV anymore. The TV is continuously and constantly displaying the 4-digit code, but when I try to run hisense-tv-authorize, I am met with the same error as at my other home: Connection failed - please check your configuration and try again.

Further, the plugin is crashing Homebridge every minute - it's rendered everything else completely utterly unusable.

Could you please advise where I'm going wrong, here? Thanks in advance

MrAsterisco commented 2 months ago

Hey @Shaun-R !

It seems we'll need some more time to figure this out. In the meantime, I would recommend you downgrade to version 2, if that worked for you.

LeLunZ commented 2 months ago

Thx for the report! As I mentioned in another issue, it seems like I didn’t get notifications for new opened tickets.

I will take a look at the problem later today. You say the plugin keeps crashing. Do you have any error logs from homebridge?

LeLunZ commented 2 months ago

@Shaun-R in your config you set "ssl": disabled. If that's the tv with the problem, you have to run "hisense-tv-authorize" with "--no-ssl" as parameters.

LeLunZ commented 2 months ago

Hi again, I have another home where I run Homebridge on Windows 10 using Hyper-V. The plugin was previously working fine. I installed the v3.0.0 update, and now I cannot control my TV anymore. The TV is continuously and constantly displaying the 4-digit code, but when I try to run hisense-tv-authorize, I am met with the same error as at my other home: Connection failed - please check your configuration and try again.

Further, the plugin is crashing Homebridge every minute - it's rendered everything else completely utterly unusable.

Could you please advise where I'm going wrong, here? Thanks in advance

Can you send me a part of the debug log which shows the thrown error and the part where home bridge crashes? I guess instead of failing the plugin if a connection can't be established, we should log an error in the console and then retry the connection every few seconds. This wouldn't cause home bridge to crash

LeLunZ commented 2 months ago

Also I added a beta version 3.0.1, which you can install through the home bridge ui by going to the plugins. Clicking on the 3 dots in the Hisense-tv plugin box, and clicking manage versions.

There should be a dropdown, where version 3.0.1 beta.1 is now available.

In this new version the hisense-tv-authorize script actually prints out the error message of what went wrong.


also if it worked before: You can just grab the Mac address of the ethernet adapter you used as config option in version 2. If you use the correct Mac address you don't have to do authorisation again.

In that case the plugin should just work the same as before. If there are still crashes please check your config in v3 if the ssl options are correctly set :)

Shaun-R commented 2 months ago

Hi folks, thanks for your replies. hisense-tv-authorize throws the error message regardless of which flags I pass to it (or even no flags at all).

I’ve downgraded to v2 for now, but will organise to upgrade to v3 and grab the logs as soon as I can.

LeLunZ commented 2 months ago

Hi folks, thanks for your replies. hisense-tv-authorize throws the error message regardless of which flags I pass to it (or even no flags at all).

I’ve downgraded to v2 for now, but will organise to upgrade to v3 and grab the logs as soon as I can.

If you had the time to update, just let me know, I will then start working on a fix asap. On one side, it would be great to get the error from the authorize script and also from the homerbridge instance (you said on your second machine the plugin crashes)

Thx for trying out the new stuff :)

LeLunZ commented 1 month ago

@Shaun-R v3.0.1 Beta 4 is out now. Looking forward to hear from you and see the error messages that you are getting. The error should now hold way more information. Its now printing the actual error and the stack (where the error happened)

The scripts utilities changed and are now accessible by calling hisense-tv authorize (dash removed) and hisense-tv always-on-test. I also added a debug function where you can listen to all mqtt messages and see them in the console. hisense-tv listen-to-mqtt --hostname <hostname> --mac <macOfHomebridge> --<otheroptions>