SPIRITZ Wall Radiator Thermostat read opening value %
Moderator: leecollings
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
SPIRITZ Wall Radiator Thermostat read opening value %
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
thank you
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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:
Setting the mode I do like this:
Code: Select all
idx = otherdevices_idx[heating_name]
commandArray['UpdateDevice'] = idx.."|" .. heating_mode .. "|" .. heating_mode
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
I meant that if the Spirit needs heat, it will also give the command to turn on the boiler
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
You can look at the opening of the velve.
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
I'm sorry, can you explain to me where to put the code?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
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
In a lua script.
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
2021-01-13 17:39:15.365 Error: EventSystem: in Hlavica je otvorena: [string "..."]:6: bad argument #1 to 'gsub' (string expected, got nil)
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
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
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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.
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
--------------------------------------------------------
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
--------------------------------------------------------
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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´)
You can use the statement in a normal script without a lib, level = otherdevices (´radiator´)
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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'
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'
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
In which event will this script be called? Perhaps you should have a look at lua descripion in the wiki, or you use blockly.
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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
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
- Attachments
-
- Blockly kotol.jpg (25.34 KiB) Viewed 797 times
-
- Posts: 177
- Joined: Sunday 13 November 2016 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
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.
Have a look at the lua wiki to see the working. Perhaps you can also use dzvents, but I dont know, how this works.
- jursat
- Posts: 26
- Joined: Monday 14 January 2019 20:58
- Target OS: NAS (Synology & others)
- Domoticz version: 2023.2
- Location: Slowakia
- Contact:
Re: SPIRITZ Wall Radiator Thermostat read opening value %
So finally solved through blockly
- Attachments
-
- Blockly kotol.jpg (29.61 KiB) Viewed 773 times
Who is online
Users browsing this forum: No registered users and 1 guest