Thermostat: request for improvements

Everything is fine there.


In my opinion, it would be better to separate the minimum and maximum temperatures for heating and air conditioning.
For example, for heating, I don’t want it to heat above 22°C and to drop to a minimum of 7°C for frost protection, but for air conditioning, I want a minimum of 24°C because I don’t want to become an ice cube :wink:



Ok for the flame of Comfort in Heating.
Ok for the snowflake of Comfort in Air Conditioning, but we need another name for Frost Protection and another icon.
By the way, shouldn’t we simply remove this mode?

It works well, but if I change the mode from the thermostat, it doesn’t change on the PAC mode, but if I change the PAC mode, it does change at the thermostat level

Thanks a lot @mutmut for this very thorough test! I’ll go through it point by point.

Starting in Heating / Comfort that takes the 25 °C from the air conditioning → that’s a real bug, well spotted! When the thermostat follows a mode change made on the heat pump (from the remote or the device), the usage is indeed recorded, but Gladys keeps the old one in memory. At the next startup, the preset setting is therefore calculated with the previous usage. That’s why everything returned to normal after a shutdown and a restart by changing the usage. I’ll fix it.

Separate min / max for heating and air conditioning → great idea, I’ll add it: one range for heating (e.g. 7 to 22 °C) and one for air conditioning (e.g. 24 to 30 °C), like for the presets.

Frost protection in air conditioning → agreed, the name and icon don’t make sense in summer. I prefer to rename it rather than delete it, because the schedule is common to both usages: a “Frost protection” slot should also have a value in summer. In air conditioning, it will be called for example “Protection” with another icon, and will keep its high setting (30 °C by default). If you have a better name, I’m all for it!

“A heating setting doesn’t make sense in air conditioning” → my sentence wasn’t clear. What is canceled when you change usage is only a setting adjusted manually (an exception, e.g. 22 °C on the dial). The presets, on the other hand, take their air conditioning value: Comfort goes from 21 to 25 °C, exactly as you noticed.

Changing the usage from the thermostat does not change the mode of the heat pump → on your screenshot, the thermostat is off, and that’s intentional: a stopped thermostat only retains the usage, and the mode is sent to the heat pump at the next startup. Sending the mode right away could turn on some units. Thermostat running, the change goes well to the heat pump.

Auto, Dehumidification and Ventilation → that’s also intentional: these modes say neither heating nor air conditioning, so the thermostat keeps its usage.

Remote control → as you saw, it’s the MELCloud cloud that reports changes with a delay. We’ll do these tests again later.

“Cooling” in scenes → agreed, I’ll rename it to “Air Conditioning” so that it’s the same word everywhere.

I’ll let you know as soon as a new image is ready with all this. Thanks again!

Great!
For the icon, we can go with Sun → we swap the HG/Comfort icons for heating and air conditioning.
However, won’t this be problematic in the schedule if we have Frost Protection and Protection?

ok, I only thought about myself and my heat pump… not good :face_with_peeking_eye:
I just tested quickly and when the heat pump is on and I change the mode via the thermostat, it does switch to the heat pump.

Thanks @mutmut! Everything is fixed in the branch, all that’s left is to rebuild the image:

Starting in Heating / Comfort at 25 °C → fixed. The thermostat no longer retains the old usage in memory when it follows a mode change made on the heat pump.

Min / max range per usage → added. With the reversible heat pump checked, the « Temperature Range » section has two lines, Heating and Air Conditioning. They limit the widget dial according to the current usage, never exceeding what the heat pump accepts. When you choose the heat pump setpoint, its range fills both lines.

Protection icon → adopted! In air conditioning, it’s a sun: snowflake for Frost Protection and flame for Comfort in heating, sun for Protection and snowflake for Comfort in air conditioning.

« Frost Protection » and « Protection » in the schedule → no problem, it’s the same preset: one box in the schedule, whose setpoint and name follow the usage. A Frost Protection slot is 7 °C and is called « Frost Protection » in winter, it’s 30 °C and is called « Protection » in summer. The schedule and scenes always display « Frost Protection », since it’s the same setting.

« Cooling » in scenes → it’s now « Air Conditioning ».

Usage change with the heat pump on → thanks for checking!

The new image is being built

Hi everyone :slight_smile:

This is my final stretch before giving birth, @Will_71 are there any critical or truly blocking bugs left on the thermostats?

Hi @pierre-gilles, no critical or blocking bugs, the open PRs regarding the thermostat are nice-to-haves but I think they can wait for your return unless @cicoub13 or @bertrandda can validate them.

  • #3294: Reversible heat pump
    A single thermostat controls a heat pump that heats and cools, with a set of presets and a min/max range per usage.
    The usage is changed from the widget, a scene, or the remote control of the unit.
    It only applies to a real thermostat whose mode can be modified and switched to air conditioning.
    It integrates the feedback from mutmut

  • #3295: Presence sensors (same principle as opening sensors)
    One or more motion or presence detectors per thermostat.
    If no one is seen for the delay (30 min by default), the thermostat switches to an away preset (Eco by default), only if it’s more economical.
    It affects the same files as #3294: the one of the two merged later will need to be rebased.

Last tests on the latest image :slight_smile:

As for the latency between the remote and the Melcloud cloud, it’s a bit better but I’ve had better in real-time. However, I can run the tests.
Scenario with strange thermostat behavior (?):

  • active schedule and Off until 8 PM (then Comfort)
  • I set the thermostat to Air Conditioning mode, 25°C
  • I turn it on with the remote in heating mode, 21°C → a bit of waiting but the app switches to heating 21, then the thermostat and heat pump switch to 21°C but stay in Air Conditioning, the schedule changes to manual until 8 PM
  • a few moments later, the thermostat and heat pump switch to Heating mode, then turn off and the schedule takes over again
  • I turn it back on via the remote, heating 21
  • after a few moments, the heat pump and thermostat turn on but the thermostat keeps the schedule instead of switching to manual:
  • I turn it off via the thermostat: it stays in manual and asks me to switch back to the schedule → On this point, I suggest switching back to the schedule if the selected preset matches the schedule’s preset
  • I click on Return to schedule and it triggers an ON of the heat pump then an OFF of the heat pump
  • I am in Auto mode with the schedule
  • I click on Off again and I switch back to manual with Return to schedule → On this point, I suggest switching back to the schedule if the selected preset matches the schedule’s preset (previous point)

We can keep the remaining time you have if needed for quick fixes following this update

I’ll watch as soon as possible @mutmut

It depends on the scope and the files affected. If it’s a fix, they can do it. For new features, it will have to wait for my return :blush:

I still have a bit of time, but I’d like to avoid merging features at the very end because after that I won’t really be available to provide support for what I’ve published :sweat_smile:

So at the end I’ll only do bug fixes!

No problem, that’s widely understood. Here, we’re talking about new features that can wait for your return.

We’ll still try to merge all of this :blush: but I wanted to give you a heads-up!

Thanks @mutmut for this very detailed scenario, it allowed me to find several bugs! I’m going through it step by step.

The heat pump turns off right after turning on with the remote control → two bugs that were combined. On startup, the thermostat restarted in its own usage (Air Conditioning) and sent this mode to the heat pump, even though you had just set it to heating. Then, when the Heating mode came back from MELCloud, the change of use canceled the override taken by the same button, and the schedule (Off until 8 PM) turned off the heat pump. Now, when turned on from the remote control, the heat pump imposes its mode on the thermostat and the override is kept. This is fixed in the reversible heat pump PR.

Second startup: the heat pump is running but the thermostat remains on the schedule → the override was indeed taken by Gladys, but the widget did not display it and remained on « Off until 20:00 ». That’s why you found it turned off. Fixed: the widget now displays the override immediately.

Turn off from the thermostat that remains in manual → good idea, I took it: if you press Off during an override while the schedule is already on Off, the override stops and the thermostat returns to the schedule, which leaves the heat pump off. Without an ongoing override, Off always turns off the thermostat, so you can turn it off for the season even during an Off slot.

« Return to schedule » that turns on then off the heat pump → fixed: returning to the schedule on an Off slot no longer turns the heat pump back on.

These last three points correct already published code, so I put them in a separate bugfix PR (#3320), easier to merge quickly.

Good evening,

All these functions are incredible and cover many devices.

I have been trying for some time to create a dashboard specific to the thermostat and/or a scene that allows me to control two radiators in the same room but I can’t manage it. As usual, I would need some advice.

Thanks in advance for your feedback

Hi @jluc, I think one scene might be pushing it, but it depends on what you want to do and include.
Can you open a new topic Configuration or Scene to discuss this in more detail? Let’s keep this topic for thermostat improvements.

Hi @mutmut,

I’ll take care of it, thanks for the instructions

Hello,

First message on the forum here, comming from HA and looking for a much more simple home automation solution. Everything going fine so far with Gladys and matterbridge.

The thermostat widget do not take into account the limits I set in the configuration. The rotary scale allows me to set the thermostat from -100 to +200°C.

The hardware is a Tado X thread thermostat via the matter integration (apple tv border router)

What am I missing?

Hi, I’m checking why this evening. I’ll keep you posted.

Hello @flg and welcome to the forum!

Thanks for the very clear feedback, including screenshots. You’re not missing anything: it’s a widget bug.

Matter thermostats announce a setpoint range of -100 to 200 °C, regardless of the device. The widget prioritized this range announced by the device, instead of the one you set in the configuration (8 to 25 °C). With Netatmo or Zigbee, the announced range is realistic (5 to 30), so the problem wasn’t visible.

I opened a PR that fixes this: fix(thermostat): keep the dial and manual setpoints within the thermostat's range by William-De71 · Pull Request #3327 · GladysAssistant/Gladys · GitHub

  • the dial and the + / − buttons follow the range set in the configuration. The range announced by the device can only restrict it, never expand it;
  • on the server side, a setpoint sent by a scene or by the API is also brought back into this range. Before, nothing prevented sending 166 °C to the Tado.

The fix will arrive in a future version of Gladys. In the meantime, avoid turning the dial all the way: the preset chosen in the bottom bar (Eco, Comfort…) and the schedule are not affected, they use your temperatures.

@pierre-gilles, so if you can look at this PR :folded_hands:

Thanks @Will_71

That was fast. I won’t be using the widget till the correction is merged