We have moved at community.getvera.com

Author Topic: How to say temperature  (Read 704 times)

Offline willyha

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
How to say temperature
« on: January 30, 2015, 02:02:16 pm »
I did not find the way to do this, so sorry if already answered.

How to write a luup code to say the temperature from a sensor.

Like "The internal temperature is" the value of the sensor.

Thanks

Offline willyha

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: How to say temperature
« Reply #1 on: January 31, 2015, 01:31:28 pm »
After some research I found the way I used this codes

local inTemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", XX)
local SAY = "The internal temperature is" .. tostring (inTemp) .. "degrees"
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = tostring(SAY)}, YY )

XX - Sensor ID
YY - Imperihome plugin ID