We have moved at community.getvera.com

Author Topic: Reading out weather with Say Weather  (Read 1574 times)

Offline mpovolo

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
Reading out weather with Say Weather
« on: January 30, 2015, 09:56:31 am »
Anyone have an idea how to write the Luup code to use the speech command in Imperihome but replace the test with what comes from Say Weather.  i write this but it doesnt work:
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = "Good Day urn:joeyd-com:serviceId:SayTheWeather1        /         CompleteWeatherStatement}, 10);

thanks

Offline JoeyD

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +36/-5
Re: Reading out weather with Say Weather
« Reply #1 on: January 30, 2015, 12:04:47 pm »
Ahh...I didn't know Imperihome actually had a Vera plug-in.  (I was assuming that the android app was stand-alone).  Let me look at the plug-in details and get back to you.

Offline JoeyD

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +36/-5
Re: Reading out weather with Say Weather
« Reply #2 on: January 30, 2015, 12:09:59 pm »
Ok.  First try this code just to make sure that everything is working.  Just replace XXX with the vera device ID of your imperihome plug-inn device.

Code: [Select]
local ImpDeviceID = XXX
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = "TESTING"}, ImpDeviceID )

If that works, then your set-up is OK and we'll move on to the next step.

Offline JoeyD

  • Sr. Member
  • ****
  • Posts: 410
  • Karma: +36/-5
Re: Reading out weather with Say Weather
« Reply #3 on: January 30, 2015, 12:15:38 pm »
Assuming that works try the following lua.  XXX is the device ID of your imperihome plug-in device, and YYY is the device ID of your SayTheWeather plug-in device.

Code: [Select]
local ImpDeviceID = XXX
local STWID = YYY

local CWS = luup.variable_get("urn:joeyd-com:serviceId:SayTheWeather1","CompleteWeatherStatement",STWID)
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = tostring(CWS)}, ImpDeviceID )


Offline mpovolo

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
Re: Reading out weather with Say Weather
« Reply #4 on: January 30, 2015, 12:46:45 pm »
Ok.  First try this code just to make sure that everything is working.  Just replace XXX with the vera device ID of your imperihome plug-inn device.

Code: [Select]
local ImpDeviceID = XXX
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = "TESTING"}, ImpDeviceID )

If that works, then your set-up is OK and we'll move on to the next step.

This one works, I can send any text that I type into the quotations

Offline mpovolo

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
Re: Reading out weather with Say Weather
« Reply #5 on: January 30, 2015, 12:57:49 pm »
Assuming that works try the following lua.  XXX is the device ID of your imperihome plug-in device, and YYY is the device ID of your SayTheWeather plug-in device.

Code: [Select]
local ImpDeviceID = XXX
local STWID = YYY

local CWS = luup.variable_get("urn:joeyd-com:serviceId:SayTheWeather1","CompleteWeatherStatement",STWID)
luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = tostring(CWS)}, ImpDeviceID )


Will try this tonight, I hope it works, thanks for the help.

Offline mpovolo

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
Re: Reading out weather with Say Weather
« Reply #6 on: January 30, 2015, 09:26:01 pm »
It worked, awesome

thank you