Add virtual temperature device to Secure SIR321


I bought a Secure SIR321 last week to control a Solar Panel with a Thermistor whitch I can get temperature.

Then I connected the SIR321 to my Vera Edge and I can on/off electricity to heat the water.

Too, I want to know temperature of thermistor that It is in CurrentTemperature varible. For that, I create a virtual temperature device:

Apps->Develop apps->Create device

Description: Vitual temperature
Upnp Device Filename: D_TemperatureSensor1.xml
Upnp Implementation Filename: S_TemperatureSensor1.xml

And push Create Device. Then Reload Engine. After that you will see a new Device.

Now you need to create a variable, go to Devices->Virtual temperature->Advanced Tab->New Service and set:

New service: urn:upnp-org:serviceId:TemperatureSensor1
New variable: CurrentTemperature
New value: 10

And push Add and Reload Engine. After that you will see a temperature with 10?.

Now you need to refresh Variable every 30 minutes (or what you want)

Go to Scenes and Create one every 30 minutes and in Luup code wirte:

[code]local temperatura = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”, “CurrentTemperature”, 20)

luup.variable_set(“urn:upnp-org:serviceId:TemperatureSensor1”, “CurrentTemperature”, temperatura,22)

return true

Where 20 is ID from SIR321 and 22 is ID from Virtual temperature.



Just tried this with my Secure SRT322 Thermostat and it seems to work OK!

I wanted to create a virtual temperature sensor device in Vera, so I could add a simple read only temperature device into the Imperihome app.

Many thanks for posting this!

I keep visiting this when adding an old SIR321 to different controllers. An easier and non Vera scene way is to now use the Virtual Sensor plugin by P Rigney.
Add plugin
Create sensor (temperature in this case)
Select the device you want to pull data from
Select the variable (CurrentTemperature).

This also then updates when the variable does and not on a set schedule

1 Like

Good to know.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules