Thermostat settings do not stick

Posted on
Thu Jun 03, 2021 2:45 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Thermostat settings do not stick

Great plugin !
testing now, and I see that when I change the "cool setpoint" or "heat setpoint" I see the order being transmitted in the log, and changed in the thermostat controls window but at the next update they both go back to a different value. Actually, they will both get the same last value I adjusted: let's say I adjust heat at 20°C and then cool at 24°C, when the next update happens both heat and cool set points will become 24°C... do you see that too ?

Posted on
Thu Jun 03, 2021 6:06 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

I think it may be by design - but not necessarily good design on my part :D :D

When I first started building this it looked like maintaining separate heat and cool points wasn’t necessary as the controller seemed to only used the “stored value” when you went from Fan Mode or Dry mode to Auto/Heat/Cool but this may have been the downside of starting the plugin on the day the AC was fitted.

My logic was as you moved between Heat/Cool/Auto in the app then the setpoint seemed to stay the same and the api only exposes a single setpoint value.

At the moment they are simply synced to the same value but it would be very easy to set this to the previous stored value and maintain them separately in Indigo (which would be more logical).

Let me have a play tonight and see if setting them independently and restoring the stored value on mode change works. This may behave slightly differently to the app but I agree would make more sense.

New version to come.

Neil

Posted on
Thu Jun 03, 2021 9:06 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Thermostat settings do not stick

Ah, it's not a bug, it's a feature ! :D

You definitely need different setpoints, and both in the app and the remote command there are different setpoints stored for auto, heat and cool. And you see them in the "customs states" window.
It is also why I cannot use the "auto mode", as a setpoint of 25 for example is good for summer but too hot for winter, and inversely a 20 is good for winter but too low in summer. So switch every 6 month between hot and cool mode and their associated setpoints of 20 and 25.

May be it's different for other users, but I believe the setpoints should be independent and stored somewhere...

Posted on
Thu Jun 03, 2021 9:32 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

It should be easy to add, the custom states I added after I figured out the stored set points from the api which were not obvious. I just need to investigate a little how that interacts with the primary setpoint that the api uses that applies to all modes and it doesn’t quite behave the way I thought. Watch this space :-)

And of course you are right, it should work that way and will (hopefully :shock: )

Posted on
Thu Jun 03, 2021 4:17 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

This version https://github.com/neilkplugins/Daikin-Wifi-indigo-plugin/releases/tag/0.0.5-beta hasn't been tested as thoroughly as I would like but this should be more logical and separates the heat/cool/auto set points. I will check if the Indigo Thermostat device can also show a UI for the Auto Setpoint changes but I don't think it can.

This does introduce a potential quirk as the Cool and Heat set points will no longer synchronise with changes made in the App (as the API only reports the current set point regardless of mode). The custom state "setpoint_temp" will be correct but when you use indigo to change AC mode it will use the set points it maintains. as the new set point.

I cannot see an easy way to address this as the API does not have a mechanism to notify that a change has happened, but I will keep investigating. Either way this should allow consistent control from Indigo.

Posted on
Fri Jun 04, 2021 3:40 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Thermostat settings do not stick

Testing v0,05, two problems:

-vendredi 4 juin à 11:22:44
Error device "Clim Ch V" state key accumEnergyTotal not defined (ignoring update request)
Error device "Clim Ch V" state key accumEnergyTotal not defined (ignoring update request)
Error device "Clim Chambre Haut" state key accumEnergyTotal not defined (ignoring update request)
Error device "Clim Chambre Haut" state key accumEnergyTotal not defined (ignoring update request)
Error device "Clim Salon" state key accumEnergyTotal not defined (ignoring update request)
Error device "Clim Salon" state key accumEnergyTotal not defined (ignoring update request)


it is possible that my interfaces/AC units do not provide the energy data.

and worse:

Daikin Wifi Controller actionMode : 0
actionValue : 1.0
configured : True
delayAmount : 900
description : increase cool setpoint of thermostat by 1.0
deviceId : 1486972849
replaceExisting : True
textToSpeak :
thermostatAction : IncreaseCoolSetpoint
Daikin Wifi Controller setpointCool
Daikin Wifi Controller /aircon/set_control_info?pow=0&mode=4.0&stemp=21.0&shum=0&f_rate=A&f_dir=0
Daikin Wifi Controller Error Request to update was processed but not sucessful /aircon/set_control_info?pow=0&mode=4.0&stemp=21.0&shum=0&f_rate=A&f_dir=0 from Daikin Unit Clim Salon
Daikin Wifi Controller Error send "Clim Salon" increase cool setpoint to 21.0° failed
Daikin Wifi Controller actionMode : 0
actionValue : 1.0
configured : True
delayAmount : 900
description : decrease heat setpoint of thermostat by 1.0
deviceId : 1486972849
replaceExisting : True
textToSpeak :
thermostatAction : DecreaseHeatSetpoint
Daikin Wifi Controller setpointHeat
Daikin Wifi Controller /aircon/set_control_info?pow=0&mode=4.0&stemp=19.0&shum=0&f_rate=A&f_dir=0
Daikin Wifi Controller Error Request to update was processed but not sucessful /aircon/set_control_info?pow=0&mode=4.0&stemp=19.0&shum=0&f_rate=A&f_dir=0 from Daikin Unit Clim Salon
Daikin Wifi Controller Error send "Clim Salon" decrease heat setpoint to 19.0° failed


this happens for any unit and any change of any setpoint I try...

Posted on
Fri Jun 04, 2021 6:10 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

Hi Patrick,
Sorry for that, I was obviously too keen to push it out. for the first problem if you can simply edit and re-save the device configuration that one should resolve itself. I handle this automatically for changes to custom states, but this is a more fundamental change to the device and this should be a one off between early versions. You make a fair point, it is not clear what hardware/firmware versions support the energy reporting, but in this case that is not the cause of this error.

For the second one I will take a look, but one quick observation are the units powered off ? I admit last night I did not test changing the setpoint if they are off, of course it shouldn't be a problem but I can also see another potential problem that I will investigate. I will push a new version later today regardless as I need to implement custom actions to set/increase/decrease the auto setpoint for which not standard Thermostat actions exist or indeed a UI in the device.

I also have a question about the behaviour that I can build to sync the Cool/Heat sync points with changes made by the app (or even the physical remote). I could :-

- Just ignore this and accept that the heat/cool setpoints in Indigo will not match (the setpoint_temp will be correct, but the API does not report the current setpoint separately). The advantage being if your plan is to use Indigo to manage these changes it is consistent and will not be an issue if you make temporary changes by other methods/

- Have the Indigo Cool/Heat setpoint sync with changes made by the app or remote so that it is always consistent, but this will change the stored setpoints in Indigo. This will require more effort on the Indigo side if you want to revert to known setpoints for Auto/Cool/Heat. This is going to be more useful if you envisage a mixed use of the app/remote/Indigo and want to avoid inconsistencies

- Make this behaviour configurable at the device level so a user can choose if local changes can overide Indigo control (this is my current thought)

Once again apologies, a new version coming but if you do have a chance to check if refreshing the device config clears the first, and if the power state impacts the second issue.

Neil

Posted on
Fri Jun 04, 2021 11:20 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Thermostat settings do not stick

Hi Neil, no worries for these 'problems', it is expected as you are developing the plugin !

first problem you are right, I change the device and saved, error message gone.

problem two remains, even with AC turned on, see below:
vendredi 4 juin à 19:06:47
Daikin Wifi Controller actionMode : 1
actionValue : 0.0
configured : True
delayAmount : 900
description : set mode of thermostat to heat on
deviceId : 1486972849
replaceExisting : True
textToSpeak :
thermostatAction : SetHvacMode
Daikin Wifi Controller 1
Daikin Wifi Controller heat
Daikin Wifi Controller sent "Clim Salon 2" mode change to heat
Daikin Wifi Controller actionMode : 0
actionValue : 1.0
configured : True
delayAmount : 900
description : increase cool setpoint of thermostat by 1.0
deviceId : 1486972849
replaceExisting : True
textToSpeak :
thermostatAction : IncreaseCoolSetpoint
Daikin Wifi Controller setpointCool
Daikin Wifi Controller /aircon/set_control_info?pow=0&mode=4.0&stemp=21.0&shum=0&f_rate=A&f_dir=0
Daikin Wifi Controller Error Request to update was processed but not sucessful /aircon/set_control_info?pow=0&mode=4.0&stemp=21.0&shum=0&f_rate=A&f_dir=0 from Daikin Unit Clim Salon 2
Daikin Wifi Controller Error send "Clim Salon 2" increase cool setpoint to 21.0° failed
Daikin Wifi Controller actionMode : 0
actionValue : 1.0
configured : True
delayAmount : 900
description : decrease heat setpoint of thermostat by 1.0
deviceId : 1486972849
replaceExisting : True
textToSpeak :
thermostatAction : DecreaseHeatSetpoint
Daikin Wifi Controller setpointHeat
Daikin Wifi Controller /aircon/set_control_info?pow=0&mode=4.0&stemp=19.0&shum=0&f_rate=A&f_dir=0
Daikin Wifi Controller Error Request to update was processed but not sucessful /aircon/set_control_info?pow=0&mode=4.0&stemp=19.0&shum=0&f_rate=A&f_dir=0 from Daikin Unit Clim Salon 2
Daikin Wifi Controller Error send "Clim Salon 2" decrease heat setpoint to 19.0° failed


and worse, the request to turn off also fails !

thermostatAction : SetHvacMode
Daikin Wifi Controller 0
Daikin Wifi Controller off
Daikin Wifi Controller Error Request to update was processed but not sucessful /aircon/set_control_info?pow=0&mode=4.0&stemp=20.0&shum=0&f_rate=A&f_dir=0 from Daikin Unit Clim Salon 2
Daikin Wifi Controller Error send "Clim Salon 2" mode change to off failed


About the behaviour, I would go with point 2, I would expect Indigo to reflect the state of the AC at every moment, like the app does, so there is no discrepancies. And it will also be useful if Indigo is informed that a changed occur because someone changed a parameter using the app or the remote. Point 3 also works for me, I don't see why someone would prefer point 1 though... :?

Posted on
Fri Jun 04, 2021 12:05 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

Patrick - Thanks for this and for helping with the testing.

The latest version is https://github.com/neilkplugins/Daikin-Wifi-indigo-plugin/releases/tag/0.0.6-beta

Unfortunately this will error in a similar way until you do the same trick to update the device configuration.

I have implemented the syncronisation, but added the option to disable it if someone wanted to "block" updates from the app, I have also added the actions to set/increase/decrease the "Auto" setpoint. Unfortunately they don't work with the Indigo Thermostat UI but should work the same way as the native actions for Heat and Cool.

As for your error, I cannot replicate it but I am pretty sure I know the cause, I just have no idea how it is happening.

Code: Select all
Daikin Wifi Controller /aircon/set_control_info?pow=0&mode=4.0&stemp=21.0&shum=0&f_rate=A&f_dir=0


As the mode setting in this line should be an integer "4" not a float "4.0", I will drill into this now, and hopefully a fix later so feel free to wait for a newer version.


Neil

Posted on
Fri Jun 04, 2021 3:35 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

Hi Patrick,
I have no idea why the error you have was happening, and I could not replicate it but I have simplified the handling of the mode state, I suspect at some point it was getting interpreted as a float rather than an integer. I now need to go back and test all of the functionality, particularly looking at all of the options for transition mode to mode.

I am pretty sure this version https://github.com/neilkplugins/Daikin-Wifi-indigo-plugin/releases/tag/0.0.7-beta should address the issue you were having. You may need to edit the device properties again if you get an error depending on the version you upgrade from, but this should be the last time. I think this is now complete from a functionality point of view and should behave the way you expect.

Neil

Posted on
Sun Jun 06, 2021 5:19 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Thermostat settings do not stick

Version 0.0.7 works fine for me ! I can adjust the set points in Indigo or the app and they are all updated as expected, this is great as Indigo is always aware of the settings. The weather being what it is these days we don't use AC, but I was able to do a few tests and everything looks correct, still there could be unexpected things happening when we switch to heating this coming winter: this is where it will be really useful to schedule changes depending on house occupation or change setpoints to lower the electricity bill on peak times. Great fun coming ! :D

Posted on
Sun Jun 06, 2021 9:43 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

Great to hear - may be some strange things for different scenarios but it does seem now to cover the things I can think of.

Thanks,
Neil

Posted on
Sun Jun 13, 2021 2:14 am
mkbean offline
Posts: 9
Joined: Jan 23, 2014

Re: Thermostat settings do not stick

This is awesome, thanks so much for working on this.

Everything seems to be working, but i see this in the log:

Daikin Wifi Controller Error Failed to update consumption Bedroom aborting state refresh
Daikin Wifi Controller Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 450, in runConcurrentThread
File "plugin.py", line 214, in _refreshStatesFromHardware
KeyError: 'curr_day_cool'

Posted on
Sun Jun 13, 2021 4:46 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Thermostat settings do not stick

I did wonder if all versions of the controller report energy consumption and I suspect this is the problem.
A quick check would be entering the following in a browser

Code: Select all
http://<controller IP address>/aircon/get_day_power_ex?days=2


And let me know what you get.

Either way I will add some logic to better trap this if only the consumption data fails, and a new version will follow.

Neil

Posted on
Thu Jun 17, 2021 2:39 pm
mkbean offline
Posts: 9
Joined: Jan 23, 2014

Re: Thermostat settings do not stick

Code: Select all
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0

Who is online

Users browsing this forum: No registered users and 1 guest