VoxCommando Forum

Help and Support (Using VoxCommando) => Command Builder Reference => Topic started by: ddl on November 21, 2013, 04:10:13 PM

Title: VC Programming help: using conditional logic to get custom weather feedback
Post by: ddl on November 21, 2013, 04:10:13 PM
I would like vc to respond and say something to me based on certain conditions.  For example:  I am looking for vc to tell me "that its really cold outside and i should grab a heavy coat to stay warm".  I understand how to format the text to speech part but not sure how to write the "if then" logic.  Here is what I think I need to program.

If... the current temperature is below 32 degrees fahrenheit
Then... tts "Man its freezin out there! You should grab a heavy coat to stay warm"

I would like the command to be triggered when the pc wakes in the morning.

Any help with the actions and logic would be appreciated.

d
Title: Re: VC Programming help: using conditional logic to get custom weather feedback
Post by: nime5ter on November 21, 2013, 04:44:44 PM
See the thread "weather depending goodbye": http://voxcommando.com/forum/index.php?topic=776.0

It's a good idea to read the whole thread. Several examples are provided. See especially the WUnderground commands at the end of the thread.

Other forum posts discuss how to trigger a command using an event. A search on the forum or Google search should retrieve them. There are also tutorial videos on how to use events in VoxCommando, as well as information on the wiki.
Title: Re: VC Programming help: using conditional logic to get custom weather feedback
Post by: Kalle on November 21, 2013, 04:54:08 PM
Hi ddl, this is what you can easy figured out by your self ;)
Please take a look here http://voxcommando.com/mediawiki/index.php?title=Logic_Block (http://voxcommando.com/mediawiki/index.php?title=Logic_Block), this show you how the "logic block" works and explain you the parameter (A<B, A==B, AcontainsB). If you know how you can scrape your outside temperatur from a sensor or VC weather plugin (you will find some examples here in the forum) it is really easy to do.  :bignod

If you don't figured out how you can do this, let us know to show you the way  ;)

@nime5ter: Ups, you are faster  ::wave