Thanks for the feedback and suggestions @mario.fuchs.
I had been grappling with this kind of thing for a while now... I am generally familiar with what you are describing, there can be delays in requests from the mobile app for my own air conditioner, though turning it on this morning appeared to show it as "on" in the app straight away, but that may behave differently to a web interface... (I'll explain a bit later).
I like your idea of the text string indicating a command is still pending and when it will be applied. I'm 99% sure I have seen this in the response that comes back. I think the best I can do / think of, is to introduce an attribute with this information in it and you, as the user, will need to add this as a separate tile to any dashboard that includes the thermostat tile. I might also look at including a similar attribute with a yes/no value in case anyone wants to use it in rules, etc.
In terms of the timing of status updates, I'd just want to clarify what you were requesting, by:
Do you mean you want the change in state reflected on HE to be delayed until it has at least taken effect on the unit itself? Even if this isn't what you were after, I'll explain the logic of what I have done so far and see what you think.
This was the bit I grappled with some time ago... What I decided to do comes in two parts:
-
When a user changes the state (mode, temperature, etc) the change is reflected on the HE interface straight away, but only for the setting the user changed. I felt this was a better user experience, rather than being left unsure about whether what you just asked to be changed had actually happened. This would be the same situation for changes made anywhere in HE, not just a dashboard, so RM rules, etc.
-
When the driver receives a response from MELCloud, whether it be a response after sending a command or simply a periodic refresh of the device state, I don't apply any status updates to the HE device whenever a "HasPendingCommand" flag in the response is true. I am expecting this would be the case whenever changes are requested from outside of HE as well. One reason I went this way was that I was seeing some odd details come back such as the unit showing as being off when changing modes, though this may be a different problem...
So when you change the mode on the dashboard tile in HE the driver updates the mode for the HE device straight away and sends the request to MELCloud. Once the change has been applied by MELCloud and a HE device refresh is called, changes to any other details such as room temperature, etc will be applied to the HE device.
So I think the inclusion of a flag and the text you requested would compliment this nicely. Happy to consider any more thoughts / ideas on this.
Almost forgot... The Aus/NZ API includes an option to run commands on the local LAN, i.e. not needing to go through the cloud service. Hopefully this is an option for MELCloud, but I haven't investigated it yet. This was what I was thinking may have been the case for the behaviour I was seeing on my phone compared to your use of the web interface, perhaps the app on my phone was communicating across my wifi rather than out across the internet....? Hopefully I can include this in the European version.
Thanks,
Simon