Page 1 of 2
Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 11:44
by DutchHans
Hi All,
I am trying to create a script to check if a temperature in a room is higher than the setpoint set by Domoticz. In that case I have to check the radiatorvalve. (Batteries could be dead) I have searched the forum for several hours but I cant find how to extract the setpoint for a radiator valve in Lua. The Setpoint is set to 15 but Otherdevices_svalues give me 0.0, same with otherdevices_temperature.
Anyone knows how to extract the setpoint from a radiator?
Regards, Hans
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 11:58
by Westcott
Hi Hans,
Have you added a device that displays your setpoint correctly?
setpoint = tonumber(otherdevices_svalues['Your setpoint device name'])
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 12:21
by DutchHans
Yes, ive tried several, but no luck.
setpoint = tonumber(otherdevices_svalues['Radiator Bedroom']) and setpoint = tonumber(otherdevices_temperature['Radiator Bedroom'])
Any ideas?
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 12:39
by Westcott
What does the device 'Radiator Bedroom' show in the Domoticz GUI?
What value does setpoint = tonumber(otherdevices_svalues['Radiator Bedroom']) print?
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 13:12
by DutchHans

- radiator_bedroom.jpg (42.43 KiB) Viewed 2805 times
The GUI in Domoticz
2016-05-10 13:15:18.775 LUA: 0
2016-05-10 13:15:18.954 LUA: 0
2016-05-10 13:15:19.136 LUA: 0
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 13:23
by Westcott
Interesting!
Is it possible that you have more than 1 device called 'Radiator Bedroom'?
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 13:29
by DutchHans
Hi Westcott,
Yes, when I add a radiatorvalve there are 2 items added with the same name. one holds the set temperature and one is a on/off switch
There are also two IDX's
BTW, thank you for replying so quickly..
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 13:33
by jvdz
Just rename one of the two so they are both unique and you can use them in LUA.
Jos
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 13:39
by DutchHans
I did rename one.. answer is still 0
2016-05-10 13:37:44.992 LUA: Radiator Bedroom Temperature is 0
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 14:56
by Luigi87
With type of Danfoss product do you have?
I have the LG-13's and these do not send a acual temp.
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 15:10
by DutchHans
Hi Luigi87,
Thanks for replying.
Smartwares Wireless Radiator valves
http://www.homewizard.co.uk/smartwares- ... valve.html
The valve itself doesnt send... but the setpoint is sent by Domoticz which is visible in the GUI. and I would like to use that Temperature to compare it with the actual measured temperature. If the actual temperature rises above the setpoint temperature than there must be an error (for example: battery faillure). I have had it once that I came back home after a few days and the bedroom was like a sauna, which costs a huge amount of wasted energy.
Regards..Hans
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 15:23
by Egregius
The value is in the data part of the json reply, shouldn't be that hard.
At least, not in php

Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 15:39
by DutchHans
Hi Egregius,
Maybe thats a start, only thing is... I am not a real programmer, I try to read code from others and combine things to fill my needs. Do you have an example?
Regards, Hans
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 16:24
by Luigi87
DutchHans wrote:Hi Luigi87,
Thanks for replying.
Smartwares Wireless Radiator valves
http://www.homewizard.co.uk/smartwares- ... valve.html
The valve itself doesnt send... but the setpoint is sent by Domoticz which is visible in the GUI. and I would like to use that Temperature to compare it with the actual measured temperature. If the actual temperature rises above the setpoint temperature than there must be an error (for example: battery faillure). I have had it once that I came back home after a few days and the bedroom was like a sauna, which costs a huge amount of wasted energy.
Regards..Hans
Oke, now its clear to me. I thought I had read that you used a danfoss.
I Don't know how thats works yet. but i will also follow this topic.
I hope to have some time by the end of this year to implement this also.
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 20:30
by DutchHans
Someone else any ideas? I guess it must be possible to extract the setpoint but I have really no idea...
Regards, Hans
Re: Extracting Setpoint from a Radiatorvalve
Posted: Tuesday 10 May 2016 20:41
by jvdz
What does it return without converting it tonumber? so just:
Code: Select all
print(otherdevices_svalues['Radiator Bedroom'])
Jos
Re: Extracting Setpoint from a Radiatorvalve
Posted: Wednesday 11 May 2016 9:08
by DutchHans
Hi Jos,
The line:
print(otherdevices_svalues['Radiator Bedroom'])
shows this in the log:
2016-05-11 09:04:29.249 LUA: 0.0
But the setpoint in the Domoticz Gui still returns 15.0°C
Regards, Hans
Re: Extracting Setpoint from a Radiatorvalve
Posted: Wednesday 11 May 2016 9:24
by jvdz
Could you show a screen capture of the devices list and simply put in a filter like "Radiator"?
This will show the existing devices with that name in it and their current values.
r/Jos
Re: Extracting Setpoint from a Radiatorvalve
Posted: Wednesday 11 May 2016 13:51
by DutchHans
Hi Jos,
The complete list of radiators (4 pieces)
Re: Extracting Setpoint from a Radiatorvalve
Posted: Wednesday 11 May 2016 14:03
by DutchHans
Its getting weirder...I tested it in Blockly

- blockly.jpg (43.3 KiB) Viewed 2687 times
returns in the log:

- log.jpg (34.8 KiB) Viewed 2687 times
So, why not in Lua????
regards, Hans