Page 1 of 1

SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 04 January 2021 11:11
by jursat
I need to read the % opening value from the thermostatic head, I use the SPIRITZ Wall Radiator Thermostat, it still throws me an error, all I need is to be able to read and work with the value. I see the value in the Dashboard settings. I need it if the relay turns off below a certain value and vice versa.
thank you

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 11 January 2021 16:40
by harrykausl
I do it like this, heating_name is the name of the level device. You'll get back Off (0%) or the percentage with text.

Code: Select all

   level = otherdevices[heating_name]
   if ( level == "Off" ) then
      heating_level = "Ventil zu"
      else
      heating_level = string.gsub ( level,"Set Level:", "Ventil")
   end

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 11 January 2021 17:24
by jursat
Thank you for the answer, how you have solved the switching on of the boiler, I have 5 rooms and I also need to turn it on, if it is necessary for each room separately

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 11 January 2021 17:36
by harrykausl
I switch off the spirit thermostat by setting the mode to off (mode 0) (for example, when a window is opended) and set it back to heat (mode 3), when it is closed.

Setting the mode I do like this:

Code: Select all

      idx = otherdevices_idx[heating_name]
      commandArray['UpdateDevice'] = idx.."|" .. heating_mode .. "|" .. heating_mode

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 11 January 2021 17:51
by jursat
I meant that if the Spirit needs heat, it will also give the command to turn on the boiler

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Monday 11 January 2021 18:43
by harrykausl
You can look at the opening of the velve.

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Tuesday 12 January 2021 20:27
by jursat
harrykausl wrote: Monday 11 January 2021 16:40 I do it like this, heating_name is the name of the level device. You'll get back Off (0%) or the percentage with text.

Code: Select all

   level = otherdevices[heating_name]
   if ( level == "Off" ) then
      heating_level = "Ventil zu"
      else
      heating_level = string.gsub ( level,"Set Level:", "Ventil")
   end
I'm sorry, can you explain to me where to put the code?

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Wednesday 13 January 2021 17:11
by harrykausl
In a lua script.

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Wednesday 13 January 2021 17:41
by jursat
2021-01-13 17:39:15.365 Error: EventSystem: in Hlavica je otvorena: [string "..."]:6: bad argument #1 to 'gsub' (string expected, got nil)

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Wednesday 13 January 2021 19:01
by harrykausl
It seems, that level is empty. You should test it with a "print ( level)", you can see the result in the protocol. Perhaps you don't have the correct name of the device. heating_name is a variable, which contents the name of the level device. I use this normally in a function, where it is passed as a argument.

Code: Select all

function libs.heating_get_level ( heating_name )

-- ermittelt den Ventilstand des Heizkoerpers heizung_name

   level = otherdevices[heating_name]
   if ( level == "Off" ) then
      heating_level = "Ventil zu"
      else
      heating_level = string.gsub ( level,"Set Level:", "Ventil")
   end

      
   return heating_level
end

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Wednesday 13 January 2021 20:25
by jursat
Es funktioniert nicht, also noch einmal für den Amateur
1. Der Name des Kopfes, von dem ich Daten lesen möchte, ist "Radiator"
2. In welche Variable wird es geschrieben? Was soll ich erstellen?

Ich benutze Domoticz für Synology
Vielen Dank für Ihre Geduld

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 10:39
by harrykausl
Do you have the Eurotronic Spirit Zwave+ Thermostat?. My scripts belong to this. If yes, you can see in your devices a device which contains leve in the name. This name you have to use.

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 18:55
by jursat
Yes, I have EUR_SPIRITZ Wall Radiator Thermostat+ titled "Radiator" , and script name is Valve opened, but it is still an error:

2021-01-14 18:47:49.978 Error: EventSystem: in Valve opened: [string "function libs.heating_get_level ( Radiator )..."]:1: attempt to index a nil value (global 'libs')

my script
-----------------------------------------------------
function libs.heating_get_level ( Radiator )

-- ermittelt den Ventilstand des Heizkoerpers heizung_name

level = otherdevices[Radiator]
if ( level == "Off" ) then
heating_level = "Ventil zu"
else
heating_level = string.gsub ( level,"Set Level:", "Ventil")
end

return heating_level
end
--------------------------------------------------------

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 19:53
by harrykausl
The function in my example is in a library called libs, so if you want to do it like this, you have to use a lib.
You can use the statement in a normal script without a lib, level = otherdevices (´radiator´)

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 20:07
by jursat
script
level = otherdevices[Radiator]
if ( level == "Off" ) then
heating_level = "Ventil zu"
else
heating_level = string.gsub ( level,"Set Level:", "Ventil")
end

return heating_level
end

Error
2021-01-14 20:05:15.518 Error: EventSystem: in Valve opened: [string "level = otherdevices[Radiator] ..."]:9: <eof> expected near 'end'

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 20:22
by harrykausl
In which event will this script be called? Perhaps you should have a look at lua descripion in the wiki, or you use blockly.

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Thursday 14 January 2021 20:37
by jursat
I need to turn the boiler on and off.
If the value drops e.g. below 15%, let the boiler switch off and above 15% let the boiler switch on.
blockly does not work, blockly doesn't work, nothing happens

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Friday 15 January 2021 7:28
by harrykausl
When you use lua, you have normally event based scripts. If a device changes, and you have a corresponding script, this script is started. For your Spirit Zwave you have normally 12 devices. One of the devices is the valve. This name you have to use in the naming of the script and in the if ... them code.
Have a look at the lua wiki to see the working. Perhaps you can also use dzvents, but I dont know, how this works.

Re: SPIRITZ Wall Radiator Thermostat read opening value %

Posted: Friday 15 January 2021 7:57
by jursat
So finally solved through blockly