The Vera Community forums have moved!

General => Temperature Monitoring & HVAC Control => Topic started by: JavierDiez on February 14, 2016, 05:18:20 pm

Title: Add virtual temperature device to Secure SIR321
Post by: JavierDiez on February 14, 2016, 05:18:20 pm
Hi.

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: [Select]
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.

Bye.


Title: Re: Add virtual temperature device to Secure SIR321
Post by: cw-kid on April 07, 2018, 11:11:15 am
Hi

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!