jeffschubert / homebridge-daikin-oneplus

Homebridge plugin to control a Daikin One+ thermostat
Apache License 2.0
18 stars 7 forks source link

how to access away mode/schedule? #24

Closed garyhooper closed 1 year ago

garyhooper commented 1 year ago

Describe Your Problem: Using the Home app, is there a way for me to select Away mode, or resume Schedule?

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

{
    "name": "Daikin",
    "user": "user",
    "password": "password",
    "includeDeviceName": true,
    "ignoreThermostat": false,
    "ignoreIndoorAqi": false,
    "ignoreOutdoorAqi": false,
    "ignoreIndoorHumSensor": false,
    "ignoreOutdoorHumSensor": false,
    "enableAwaySwitch": true,
    "enableEmergencyHeatSwitch": false,
    "enableOneCleanFan": false,
    "enableCirculateAirFan": false,
    "platform": "DaikinOnePlus"
}

Screenshots:

Environment:

daikin

jeffschubert commented 1 year ago

@garyhooper Yes, but it is a separate switch/accessory. You should see an 'Away Switch' accessory in the same room as your thermostat in the Home app. Toggle that to put the thermostat in and out of Away mode.

garyhooper commented 1 year ago

@jeffschubert , I see it now...I had to manually add it.

When Away is off, does it revert to Schedule? Also, if I adjust the temperature, how do I revert to Schedule?

jeffschubert commented 1 year ago

It should automatically resume the schedule when turning away off. If you manually change the temp it'll resume the schedule based on how you have it set in the thermostat. There's a setting in the Daikin App for telling it to resume after 1/4/8 hours or at the next event in the schedule. My plug-in doesn't control that part at all.

garyhooper commented 1 year ago

Yes, I'm aware of the setting. So, if I set the temp to whatever temporarily, and later change my mind and want to resume the schedule, my only options are to (a) wait according to the setting, or (b) turn Away On and then Off again?

It would be great to have a Resume Schedule option. Is that in the API?

jeffschubert commented 1 year ago

That's my understanding of how it would work. I don't use a schedule myself so I haven't tested it much. I don't think there's an explicit way via the Api to resume the schedule now. I may look at it more in depth to see if there's a way.

garyhooper commented 1 year ago

Would you mind sharing the API doc/info? I'm happy to look into it as well.

jeffschubert commented 1 year ago

This page was a huge help when I started writing my code to interact with the API. Looking at it and mine again just now it probably would be possible to add a switch to immediately resume the schedule. I think setting the schedOverride to 0 while the schedule is enabled would do the trick. The next time I have an evening to spend on this, I'll look at whether that does the trick.

garyhooper commented 1 year ago

Yes, I found this after asking. I believe that that would work. Any way to put the controls for Away on/off, resume Schedule on the main control, rather as separate accessories? Or do they need to be separate for creating automations?

Daikin's iOS app has been a major fail for me for setting away mode via geofence. I am hoping to use your plugin to solve this!

Thank you!

jeffschubert commented 1 year ago

They all have to be separate, unfortunately. HomeKit's definition of a thermostat doesn't allow for all these as a part of the main control. I don't like all the separate switches either.

shanemcw commented 1 year ago

LOL yes a limitation of HomeKit device support; e.g. there isn't a vacuum, so I've coded control of our Roomba vacuum to expose a thermostat. If we want it to clean the living room, we say a command for a scene that sets the thermostat to 76º, (and 77º, 78º etc. for other rooms/zones). Thanks @jeffschubert—your plugin is a lifesaver for our new Daikin (that can't take a Home-friendly Ecobee thermostat)

jeffschubert commented 1 year ago

@shanemcw You're welcome!

jeffschubert commented 1 year ago

@garyhooper I finally had time to merge in your other PR and have published a new version with your schedule enhancements. Thanks for your contributions! I'm closing this now.

jeffschubert commented 1 year ago

@garyhooper as a head's up, I've just released 3.1.1 which reverts some of the schedule/away interaction. Further testing showed that there's always a schedule defined. There always has to be at least one step defined no matter what. Thus, the schedule would always be enabled after toggling Away off. The Daikin app doesn't automatically enable the schedule after returning from Away, so I reworked this to revert to the old behavior. But, this new version adds a setting Enable Schedule after Away for those, such as yourself, that want the schedule to resume or be enabled when returning from away. Toggle this on and then the schedule will be enabled whenever the Away switch is toggled off. But by default, this setting is turned off to go back to pre-3.1.0 behavior.

garyhooper commented 1 year ago

@jeffschubert, thanks for the update. I will try out this new version.