We have moved at community.getvera.com

Author Topic: Add virtual temperature device to Secure SIR321  (Read 1655 times)

Offline JavierDiez

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Add virtual temperature device to Secure SIR321
« on: February 14, 2016, 05:18:20 pm »

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.


Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Add virtual temperature device to Secure SIR321
« Reply #1 on: April 07, 2018, 11:11:15 am »

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!