thermostat update not working on build 17053

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

thermostat update not working on build 17053

Post by Gravityz »

I have been using an intergas script for many years to control my thermostat.

i recently upgraded from 16782 to 17053 and noticed a script is not updating the thermostat anymore.
i notice Thermostaat Setpoint is changing values in domoticz and should trigger this script.
also Thermostaat has a different value than Thermostaat Setpoint so the script should update this value in Thermostaat but it is not.
Is there some breaking code regarding thermostats, setpoint or something else?
i also tried removing the silent part but that did not help either



Code: Select all

local THERMOSTAAT = 'Thermostaat'                       -- Thermostaat domoticz device name in this case a dummy thermostat device, not Intergas version which is generated in domoticz
local THERMOSTAATSETPOINT = 'Thermostaat Setpoint'      -- Thermostat setpoint device which represents the current thermostat setting(this is an Intergas temp device, not the Intergas generated thermostat device)

        -- if there is a thermostat change coming from the physical thermostat/app then sync it with the dummy thermostat in domoticz
        if (device.name == THERMOSTAATSETPOINT and domoticz.devices(THERMOSTAATSETPOINT).temperature  ~= domoticz.devices(THERMOSTAAT).setPoint) then
            local SetTemperature = domoticz.devices(THERMOSTAATSETPOINT).temperature
                --we update silent otherwise the script gets triggered again  
                domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature).silent()
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: thermostat update not working on build 17053

Post by waltervl »

A setpoint device does not have a temperature value but a setPoint
So change it in the following line

Code: Select all

local SetTemperature = domoticz.devices(THERMOSTAATSETPOINT).setPoint
I dont know why this has been working before but it needs to be setPoint (perhaps since changing the thermostat device in a general setpoint device long time ago?)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

hm, not sure.
the thermostaat setpoint device(which is in the intergas gateway) creates a device in domoticz which is a temperature device, it is situated under the temperature tab

i am using this temp device to figur out what the real thermostat setting(on the wall) is and i then update my dummy thermostat in domoticz with this device.

i can post the complete script.

the dummy thermostat is op type setpoint,setpoint
what i see is this.
When changing the dummy thermostat device in domoticz it updates the real thermostat(thus the script is triggered)
when changing the real thermostat it changes the thermostat setpoint device(which is a temp device)
the script should be triggered also and should use this temperature to set the dummy thermostat

Code: Select all

                    -- DzVents script for setting new thermostat temperature and updating setpoint of LAN2RF Incomfort Gateway Intergas
                    -- V1.3 (oktober 2022. gateway thermostat override device does not update so using dummy thermostat)
                    -- original V1.0 script made by TheKraker. Changed by GravityZ
                    -- improvements:You now have a thermostat which keeps it's setting, script also works when the real thermostat on the wall is used
                    -- temperature can be changed from 3 locations (physical thermostat on wall, dummy thermostat from domoticz, Intergas app from phone
                    -- physical thermostat updates>>THERMOSTAATSETPOINT which updates>>dummy thermostat. (gateway setpoint override 1 gets zeroed)
                    -- app updates>>gateway setpoint override 1 which updates>>THERMOSTAATSETPOINT which updates>>dummy thermostat. (gateway setpoint override 1 gets zeroed)
                    -- dummy thermostat updates>>gateway setpoint override 1 through http which updates>>THERMOSTAATSETPOINT 

local IPADDRESS = '192.168.1.80'                        -- IP address of LAN2RF Gateway
local USER = 'admin'                                    -- login credentials LAN2RF Gateway
local PASSWORD = 'xxxxx'                             -- login credentials LAN2RF Gateway the password is on a sticker on the back of the gateway
local THERMOSTAAT = 'Thermostaat'                       -- Thermostaat domoticz device name in this case a dummy thermostat device, not Intergas version which is generated in domoticz
local THERMOSTAATSETPOINT = 'Thermostaat Setpoint'      -- Thermostat setpoint device which represents the current thermostat setting(this is an Intergas temp device, not the Intergas generated thermostat device)

return {
	on = {
		devices = {THERMOSTAAT,THERMOSTAATSETPOINT},
		timer = {'at 23:00'},
	},
	execute = function(domoticz, device)
        -- if there is a thermostat change coming from domoticz then update the gateway
	    if (device.name == THERMOSTAAT and domoticz.devices(THERMOSTAAT).setPoint ~= domoticz.devices(THERMOSTAATSETPOINT).temperature) then
	        -- Calculating setpoint (see Intergas API documentation)
            local SetTemperature = (domoticz.devices(THERMOSTAAT).setPoint - 5) * 10
		    domoticz.openURL('http://' .. USER .. ':' .. PASSWORD .. '@' .. IPADDRESS .. '/protect/data.json?heater=0&setpoint=' .. SetTemperature .. '&thermostat=0')
		end
        -- if there is a thermostat change coming from the physical thermostat/app then sync it with the dummy thermostat in domoticz
        if (device.name == THERMOSTAATSETPOINT and domoticz.devices(THERMOSTAATSETPOINT).temperature  ~= domoticz.devices(THERMOSTAAT).setPoint) then
            local SetTemperature = domoticz.devices(THERMOSTAATSETPOINT).temperature
                --we update silent otherwise the script gets triggered again  
                domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature)
        end
        -- update the local thermostat every day at 23:00 to avoid turning red in the summer
        if device.isTimer then
            local SetTemperature = domoticz.devices(THERMOSTAAT).setPoint
                --we update silent otherwise the script gets triggered again  
                domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature)
        end
	end
}
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: thermostat update not working on build 17053

Post by waltervl »

Did you try to use setpoint instead of temperature?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

yes i tried.
nothing happens. i would expect an error in the log(because i now use .setPoint on a temperature device)

i removed the compare check
even without the temperature check it will not update the dummy Thermostat
So to be clear
THERMOSTAATSETPOINT (which is set to Thermostaat Setpoint) changes values but does either not trigger the script or does not update the dummy thermostat

can we use a temperature device to trigger scripts?

this does not work

Code: Select all

if device.name == THERMOSTAATSETPOINT then 
            local SetTemperature = domoticz.devices(THERMOSTAATSETPOINT).temperature
                --we update silent otherwise the script gets triggered again  
                domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature)
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: thermostat update not working on build 17053

Post by waltervl »

Add some login to see what is really measured by the script.

There has recently a new virtual setpoint device being created in beta that is a combined setpoint and temperature sensor device, also showing in the temperature tab.
https://github.com/domoticz/domoticz/pull/6477

Perhaps your issue is related to the new dzvents adapter for this device but it depends from what version you updated from as this change has already been implemented 2 months ago.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

just tested
if i create a new thermostat device and call it Thermostaat2 it is changed by the script.
something definately broke.

i will check if i can use the replace function, if not i will staert using the new device

thanks for your help because there was nothing wrong with the script as i thought.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

replacing does not work so it seems i need to create a new thermostat device and point towards that one

just tested it and it works
However after that it stops again.
what was also strange is as soon as i created a new dummy thermostat the old one got exactly the same timestamp of the new one like they are connected someway.


i now removed all the thermostats and created just one new one.

testing to see what is happening.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

tested with a newly created thermostat.
i think the change of this device has someting to do with the problem
it seems to work again but i had to remove the .silent() part which is not supported anymore.

will test the upcoming days
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

still testing this
the default thermostat refuses to update in the script.

when i create a new thermostat type 6 (temp/setpoint) it does try to update but gives an error

how do i update this thermostat so i can test where the problem is

2026-01-26 11:23:10.094 Error: dzVents: Method updateSetPoint is not available for device "thermotest" (deviceType=Thermostat 6, deviceSubType=Temp/Setpoint). If you believe this is not correct, please report.

i use this comand on the type6 thermostat

domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature)
rapscallion42
Posts: 7
Joined: Tuesday 03 March 2020 10:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by rapscallion42 »

I also experienced this recently with my Spirit valves, because on replacing a failed one they ended up now being "Thermostat 6" devices which combine the setpoint and temperature sensors (previously there were 2 separate devices defined when including them in the Zwave mesh).

Now, since the update using standard dzvents methods is no longer working, you may need to update the values through the http interface as follows (which works fine for me)... a real pain to have had to debug and make a workaround.

domoticz.openURL({url = 'http://127.0.0.1:8080/json.htm?type=com ... am=udevice' .. '&idx=' .. device.idx .. '&nvalue=0' .. '&svalue=19.5;20.5', method = 'GET'})

the svalue is important, and note that it is of the string form '<a>;<b>' where <a> is the temperature and <b> is the desired setpoint. Also note that you need to use the idx value of the device in this call also.

So, I would suggest that this is likely a bug in Domoticz (or dzvents) as the behaviour of Thermostat 6 is somewhat different to previous versions of Thermostat.

One other thing too... I do not get a script event triggering when a setpoint is updated. I don't know whether this is by design or not, but it could be because setting a setpoint via api is not strictly an update from the device. I think it really should trigger a device update, but that's just my opinion.
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: thermostat update not working on build 17053

Post by waltervl »

For thermostat 6 with temp or temp/hum or temp/hum/baro device use dzvents command:

Code: Select all

device.updateThermostat(temperature, setPoint, humidity, humidityStatus, barometer, forecast)
See also https://github.com/domoticz/domoticz/pull/6477
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

Are you saying that your thermostat device stopped working and that a new one now is detected as thermostat 6?

regarding the 2 seperate devices now being 1 combined device.
They changed something in the MQTT-AD so that devices are now different detected.
i experienced the same
i had a seperate humidity and temp device.
in that unit there was also a barometer device
after upgrading domoticz to the latest version i suddenly had 1 temp/hum/baro device(which i did not want)

somebody decided that things are more logical this way but if we do not get any control over this i rather go back to the old situation.

rapscallion42 wrote: Wednesday 04 February 2026 17:03 I also experienced this recently with my Spirit valves, because on replacing a failed one they ended up now being "Thermostat 6" devices which combine the setpoint and temperature sensors (previously there were 2 separate devices defined when including them in the Zwave mesh).

Now, since the update using standard dzvents methods is no longer working, you may need to update the values through the http interface as follows (which works fine for me)... a real pain to have had to debug and make a workaround.

domoticz.openURL({url = 'http://127.0.0.1:8080/json.htm?type=com ... am=udevice' .. '&idx=' .. device.idx .. '&nvalue=0' .. '&svalue=19.5;20.5', method = 'GET'})

the svalue is important, and note that it is of the string form '<a>;<b>' where <a> is the temperature and <b> is the desired setpoint. Also note that you need to use the idx value of the device in this call also.

So, I would suggest that this is likely a bug in Domoticz (or dzvents) as the behaviour of Thermostat 6 is somewhat different to previous versions of Thermostat.

One other thing too... I do not get a script event triggering when a setpoint is updated. I don't know whether this is by design or not, but it could be because setting a setpoint via api is not strictly an update from the device. I think it really should trigger a device update, but that's just my opinion.
rapscallion42
Posts: 7
Joined: Tuesday 03 March 2020 10:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by rapscallion42 »

yes, that is what I am saying. In my view, this is dangerous.

If you look at https://github.com/domoticz/domoticz/pull/6477 you will see that newly added devices (and I believe those that are replaced too...) will become Thermostat 6 devices. I was surprised by this, and even if new ones only would become Thermostat 6 it is dangerous because most users will already have existing devices that work the old way and have code that works the old way and introducing a newly added *same* device that works differently will break any code written to work with the older device types.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

are they detected through MQTT-AD, if they are then this seems to be a MQTT-AD issue
rapscallion42
Posts: 7
Joined: Tuesday 03 March 2020 10:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by rapscallion42 »

Gravityz wrote: Wednesday 04 February 2026 19:24 are they detected through MQTT-AD, if they are then this seems to be a MQTT-AD issue
Yes, I have ZWAVE JS UI & MQTT configured.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

ok. you should make a report on github.

a while back my watermeter flow was discovered as a totally different sensor and they fixed it
this has definately something to do with mqtt-ad and the change they made a while back
this is Commit 1723804
rapscallion42
Posts: 7
Joined: Tuesday 03 March 2020 10:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by rapscallion42 »

waltervl wrote: Wednesday 04 February 2026 17:33 For thermostat 6 with temp or temp/hum or temp/hum/baro device use dzvents command:

Code: Select all

device.updateThermostat(temperature, setPoint, humidity, humidityStatus, barometer, forecast)
See also https://github.com/domoticz/domoticz/pull/6477
Thanks, but I think this is a dangerous move and means we have incompatibility problems vs the older implementation. Someone should have thought this through more than they did IMHO.

1) Adding a new Thermostat hardware device (or replacing an older one, e.g. if it is broken) to existing configurations will mean that older hardware will be mapped to the old type split Thermostat devices but the new one(s) will map to Thermostat 6. Any existing dzvents scripts will have to cater for both device types and their quirks simultaneously, or replace all the older Thermostat devices so that they all migrate to Thermostat 6. In this latter case you still have to reimplement existing code to use the new API. This is a real pain. BTW, it also creates a problem for mobile apps (like Pilot) that cannot update these Thermostat 6 devices (as yet), they show as read only.

2) There is no way (as far as I can see...) to add a Timer configuration for updating the setpoint at various times as one could do with the previous split setpoint device of the older Thermostat :cry:

3) I also could not get the Thermostat 6 device to trigger a device update event when changing the setpoint.

Please opine.
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: thermostat update not working on build 17053

Post by Gravityz »

the more reason to file a bug on github.

i agree these breaking changes are not what we want.
mqtt-ad is around for ages and i just started using it last september.
the should have applied the correct detecting/naming way earlier.

if a new device is detected and you can use the replace function from domoticz it is not so much a problem.
however the replace function only works if devices are exactly the same and that is the problem with this change. the new devices are different.

i have a combined temp/hum device(detected as such in the old version) which i split into seperate temp and humidity so i can use them within homekit.

after the change i get combined devices which i do not want and the only device(temp/hum) which was combined was suddely split.
i could not use the replace function because the old device was a dummy temp and the new device was a mqtt-ad temp.

and then after a reboot suddenly the unit was combined again.
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: thermostat update not working on build 17053

Post by waltervl »

The issue for no timer on thermostat 6 devices is already reported (by me): https://github.com/domoticz/domoticz/issues/6530
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest