Secure SRT323 Thermostat

I’ve just posted an updated version, which should work for the SRT323 while Smartthings overcomes it’s current issues with heating only thermostats.
It has also been amended to get rid of some of the clutter from the “History”. There should now no longer be duplicate entries, except for the “Heating Temperature” or setpoint, which may appear twice, once when it is set in the app and once when it is actually implemented by the device, which may be a few minutes later.
I am aware of a current issue with History for all devices, which appears several hours late.

I cannot guarantee that ths will work for SRT321, but it will help to eliminate the issues which are currently affecting several thermostats.

Perfect I am going to carry out the tests. Thank you very much for your answer.

@aonghusmor He did the tests this weekend, from Friday to Saturday it worked, then it stopped working, when modifying the Cº in the app it does not update on the device, but if I modify the device in the update if it alters them and the heating acts. Do you have any options for this? The @MeavyDev code does not work. I have already removed the device, perform the reset but without success. I would appreciate your help or someone else. Thank you.

I don’t actually have SmartThings any more, having switched to Hubitat… however the SRT321 only processes set point (temperature) and other config changes in the wake-up. So you need to wait until the next wake-up time. I have set mine to 10 mins and the set point changes take place at the next wake-up sometime up to 10 mins later.

Remember that these devices wake up every 10 minutes or so (that is set by the 1st setting, 600 seconds) and download any pending commands. However, it does send information about the measured Temperature and the heating State independently of that.

If you look at the History you should see Heating Temperature always appears twice, separated by a few minutes. The first instance is when the software changes the setpoint, whereas the second is when the device actually receives the command. If, for example, the setpoint temperature is raised, I’d expect to see Heating Temperature twice, followed by Heating, when the device tells the boiler to start heating.

my configuration @aonghusmor and @meavydev is sent here, but if I select 20º the heating should automatically actuate. Tell me then how do you recommend placing the devices. I changed a vera for smartthings but I don’t know if I was really right to change it. I thank you both for the help.

You are showing a setpoint of 14C not 20C, and your wake-up interval is 1 hour, so it will only change after an hour has elapsed.

Also, I notice that you have ‘ThermostatMode: off’. This worries me as it may prevent the device from operating. It should be permanently set to ‘heat’. I remember there was an issue about ‘mode’ versus ‘Operating State’ when I was adapting @MeavyDev’s DH to work with the 323. Certainly in my DH this should be permanently set to ‘heat’. This may be a result of switching between my DH and @MeavyDev’s.

The situation is this, the app does not allow me to choose heat, it only appears like this. Then in order to activate the heating I have to select a temperature. And I’m using the DH from @aonghusmor because of @meavydev me da error.

I’ve posted an amended version, which should handle the thermostat mode issue more cleanly. It should set it to ‘heat’ by default when the device is configured/installed.

@aonghusmor Thanks for your update. At the moment it is working, one thing I see is that in my google home it gives me the option of Heat - Cold - Off. But not in the ST App. Do you have any way to put the off button? I would consider it very useful, so you don’t have to go down with the degrees to turn off the heating.

Please try the version I have just uploaded. This has the mode tile, as you requested. However it doesn’t work for the SRT323. Can you try the following:
Open the IDE twice. Set one of these to Live Logging and use the other one to update the device handler. Wait until a line beginning Wakeup appears in the logs. This should be followed by something like
Modes Supported: ThermostatModeSupportedReport(cool: false, fanOnly: false, auxiliaryemergencyHeat: false, dryAir: false, heat: true, autoChangeover: false, resume: false, off: false, furnace: false, auto: false, moistAir: false)

In the case of the SRT323 all entries say ‘false’, except for ‘heat’. This includes ‘off’. This is telling me that the SRT323 knows about modes , but the only mode which it recognises is ‘heat’. It can’t be switched off. I want to know whether this also applies to your device.

@aonghusmor Hello, yesterday you can do the tests and it works, I see the buttons to deactivate. Only then at the end of the night I wanted to lower the Cº and the sign of - is blocked at 15º in ST, however in google home I managed to lower them more. So I wanted to confirm with you if it is a code problem. Everything else is going well for now. Thanks again. You just have to confirm that you cannot lower the Cº any more.

I ran some tests on my own 323 device and confirmed that attempting to change the mode does nothing. That was why I asked about the behaviour described in my previous message. However, there is a simpler test: on my 323 device, if I press the button on the mode tile the setting changes to Off, but changes back to Heat (Calor) a few minutes later. What is happening is that the command to switch off is sent to the device when it wakes up, followed by a command to check the mode. The mode on the tile in the app is then changed according to what is returned. On my device that confirms that the command to change the mode does nothing. It always return Heat.

On the temperature setting question I can confirm the 15 degree lower limit. This is not something in my code, but is imposed by Smartthings. I don’t know why. I hadn’t noticed it before, which suggests it is something new. I have been in correspondence with Smartthings support about some related issues, so I will raise this issue with them. One point I will make to them is that it is a common requirement to have a frost protection temperature, something like 5 C.

I have an idea how to deal with the frost protectiion issue. The 323 device, and probably yours too, has a special command for setting to 5 degrees, which is described in the “Supported Device and Command Classes” section of the manual. I will try to get that implemented in my code.

@aonghusmor Perfect, I’ll water the code update. And if I have 5ºC against frost. Again, thank you very much for your prompt response and your work.

I have posted an updated version, which includes a Mode tile in the App.
The apparent Mode can be changed between Heat and Off by pressing the button on the tile.
In Off mode the temperature setpoint in the app is ignored, but the device hardware has frost protection built in, so it is effectively set to 5C.
In Heat mode the temperature setpoint is used as expected.

This change makes use of the information on the Basic Command Class in the Supported Device and Command Classes section of the manual.

There is one issue, which was raised earlier by @cpetzny, that there is a constraint on the range of temperatures , which can be set. This is set by smartthings, not by me. I note that the actual range does seem to depend on the particular one of smartthings’s supplied thermostat interfaces (vid) is in use. To me this suggests there must be some way of changing it, but so far I have not been able to find out how to do so.