stfnhmplr / homebridge-synology

Control your Synology Diskstation with Homekit
MIT License
159 stars 16 forks source link

Can't get temperature, can't set switch, can't see Disk Usage (Logfile: "Error: HTTP status code: 400") #53

Closed ToniKater closed 2 years ago

ToniKater commented 2 years ago

Describe The Bug: After installing version 0.4.0 i can't get temperature and can't switch the diskstation off. Seeing an error in the logs: "Error: HTTP status code: 400". And additional: The Disk Usage isn't shown.

I've tried "protocol: http" and "protocol: https". I've tried "version: 6.2.2" and "version: 6.2.4" too. I've used the workaround "accessory": "synology".

Switch "on" and display of state works very well with "protocol: https" and "version: 6.2.4"!

The Synology Diskstation type: DS214+ (DSM 6.2.4-25556 Update 2)

To Reproduce:

Expected behavior: can see the temperature and switch the diskstation on/off

Logs:

[13/10/2021, 14:56:18] [DISKSTATION] Initializing synology accessory...
[13/10/2021, 14:56:26] [Homebridge UI] Homebridge Config UI X v4.41.2 is listening on :: port 8080
[13/10/2021, 14:56:27] [DISKSTATION] Synology DISKSTATION finished initializing!
...
[13/10/2021, 15:04:27] [DISKSTATION] Can't get temperature, Error: HTTP status code: 400
[13/10/2021, 15:05:06] [DISKSTATION] Can't shutdown DISKSTATION: Error: HTTP status code: 400

Plugin Config:

        {
            "name": "DISKSTATION",
            "host": "192.168.XX.YY",
            "mac": "00:11:22:33:44:55",
            "port": 5001,
            "username": "masterofdesaster",
            "password": "topsecret",
            "protocol": "https",
            "version": "6.2.4",
            "startupTime": 60,
            "shutdownTime": 60,
            "disabled": [],
            "accessory": "synology"
        }

Screenshots:

Environment:

Tontonpat commented 2 years ago

Hi, That's the same for me.

stfnhmplr commented 2 years ago

There was a bug regarding the protocol config which is fixed in 0.4.1. Please make sure, that the protocol matches the port and use HTTPS only if activated.

The Disk Usage isn't shown. This is not available anymore. It won't come back until I find a reliable option.

ToniKater commented 2 years ago

Thank you for your fast reaction!!

The switching works very well now.

After installing the newest version of plugin it shows the temperature now. But after shutdown and wake up the Diskstation, there is shown an new error in logfile:

[14/10/2021, 10:55:54] [DISKSTATION] Can't get temperature, Error: connect ECONNREFUSED 192.168.XX.YY:5001 [14/10/2021, 10:56:24] [DISKSTATION] Can't get temperature, Error: Unknown error

After an restart of the homebridge service the showing of temperature works again. :-)

stfnhmplr commented 2 years ago

@ToniKater Thanks for the coffee. Always welcome 😊 I could reproduce this behavior and just released a fix. 0.4.2 should solve this issue.

Tontonpat commented 2 years ago

Thanks for the update, it works. Witch temperature is shown? I don’t have exactly the same on my NAS?

ToniKater commented 2 years ago

It works fine! Thanks.

I think, the CPU temperature is displayed. Maybe there is a rounding error or a time delay. For me, the display sometimes differs by one degree (plugin, dashboard web browser, iOS app).

Tontonpat commented 2 years ago

I’ve got 2 or 3 degrees…

stfnhmplr commented 2 years ago

The temperature displayed is the system temperature. In DSM, it's visible in the Control Panel - Info Center - Thermal State.

Tontonpat commented 2 years ago

Thanks, is it possible to display the temperature of the disks in addition to that of the system ?