thoukydides / homebridge-homeconnect

Home Connect home appliances plugin for Homebridge
https://www.thouky.co.uk
ISC License
141 stars 15 forks source link

Absolute time does not behave as expected #293

Closed TristanBrotherton closed 2 months ago

TristanBrotherton commented 2 months ago

Description of Issue

Thank you for an excellent plugin. I have successfully connected my Bosch dishwasher, and wanted to expose a button to start a wash after midnight. Which I setup as follows:

image

Please note the start time of 1 minute after midnight - however this time does not seem to be honored, and the wash is set on a timer an hour and half from now. (Currently 3:30pm PST) - Is it possible this is a time zone issue? I am in California, USA.

Expected Behaviour

I expected the wash to start after midnight

Steps to Reproduce

See image

Plugin Version

0.42.4

Environment

Home Connect Appliance(s)

Bosch SHX78CM5N/22

HomeKit App(s)

No response

Diagnostic Checks

Log File

[8/22/2024, 10:42:50 PM] [HomeConnect] [Dishwasher] Disconnected (setting On error status)
[8/22/2024, 10:42:51 PM] [HomeConnect] [Dishwasher] Disconnected (setting On error status)
[8/22/2024, 10:42:51 PM] [HomeConnect] [Dishwasher] Connected
[8/22/2024, 10:42:51 PM] [HomeConnect] [Dishwasher] On
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher] Finished reading available program options
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher] Adding services for 1 programs
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]     Midnight Wash  (Dishcare.Dishwasher.Program.Auto2)  
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]         BSH.Common.Option.StartInRelative=01:00
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]         Dishcare.Dishwasher.Option.HalfLoad=false
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher] All features successfully initialised in 4 seconds 701 milliseconds
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher] 3 optional features disabled by configuration:
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]     Active Program         (Switch service)
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]     Event Buttons          (Stateless Programmable Switch service)
[8/22/2024, 10:42:53 PM] [HomeConnect] [Dishwasher]     Door            Doors  (Door service)
[8/22/2024, 10:42:58 PM] [HomeConnect] [Dishwasher] START Program 'Midnight Wash' (Dishcare.Dishwasher.Program.Auto2)

Configuration

{
    "platform": "HomeConnect",
    "name": "HomeConnect",
    "clientid": "***",
    "simulator": false,
    "language": {
        "api": "en-GB"
    },
    "***": {
        "enabled": true,
        "names": {
            "prefix": {
                "programs": false,
                "other": false
            }
        },
        "features": {
            "Active Program": false,
            "Door": false,
            "Event Buttons": false
        },
        "addprograms": "custom",
        "programs": [
            {
                "name": "Midnight Wash",
                "key": "Dishcare.Dishwasher.Program.Auto2",
                "selectonly": false,
                "options": {
                    "BSH.Common.Option.StartInRelative": "00:01",
                    "Dishcare.Dishwasher.Option.HalfLoad": false
                }
            }
        ]
    }
}

Additional Information

No response

TristanBrotherton commented 2 months ago

I believe perhaps the absolute time is GMT.

thoukydides commented 2 months ago

This plugin uses whatever your server’s Node.js considers to be the local timezone. There is no explicit processing of timezones.

Check that your server is correctly configured using timedatectl. You can also set the timezone explicitly by setting the TZ environment variable.

TristanBrotherton commented 2 months ago

That would be it, the server is on GMT. - Thanks for the response.