3 | | Trac is a '''minimalistic''' approach to '''web-based''' management of |
4 | | '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. |
5 | | |
6 | | All aspects of Trac have been designed with the single goal to |
7 | | '''help developers write great software''' while '''staying out of the way''' |
8 | | and imposing as little as possible on a team's established process and |
9 | | culture. |
10 | | |
11 | | As all Wiki pages, this page is editable, this means that you can |
12 | | modify the contents of this page simply by using your |
13 | | web-browser. Simply click on the "Edit this page" link at the bottom |
14 | | of the page. WikiFormatting will give you a detailed description of |
15 | | available Wiki formatting commands. |
16 | | |
17 | | "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created |
18 | | a new Trac environment, containing a default set of wiki pages and some sample |
19 | | data. This newly created environment also contains |
20 | | [wiki:TracGuide documentation] to help you get started with your project. |
21 | | |
22 | | You can use [wiki:TracAdmin trac-admin] to configure |
23 | | [http://trac.edgewall.org/ Trac] to better fit your project, especially in |
24 | | regard to ''components'', ''versions'' and ''milestones''. |
| 3 | Original code posted: http://forum.micasaverde.com/index.php/topic,15499.msg117950.html#msg117950 |
39 | | For a complete list of local wiki pages, see TitleIndex. |
| 22 | There are three functions that you can use: |
| 23 | |
| 24 | '''!InitiateVoiceCall'''[[BR]] |
| 25 | '''SendSMSMessage'''[[BR]] |
| 26 | '''!CustomVoiceCall'''[[BR]] |
| 27 | |
| 28 | The Twilio.com API's use what they have dubbed TwiML, which is an XML DTD that the API understands for passing it commands. |
| 29 | |
| 30 | |
| 31 | ---- |
| 32 | |
| 33 | |
| 34 | '''!InitiateVoiceCall''' will use the free twimlets.com/message TwiML generator to have Twilio's API speak the message you pass to the function. |
| 35 | |
| 36 | ''(Note: we will assume our plugin has an ID of 66 in the following examples. Make sure you replace the 66 in the code below with the actual ID number of the plugin on your system)'' |
| 37 | |
| 38 | Example:[[BR]] |
| 39 | |
| 40 | {{{ |
| 41 | luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "!InitiateVoiceCall",{ !PhoneNumber= "555-555-1212", Message="Greetings from your Vera Home Automation System"}, 66) |
| 42 | }}} |
| 43 | |
| 44 | |
| 45 | '''!PhoneNumber''' = number of recipient |
| 46 | |
| 47 | '''SendSMSMessage''' will send an SMS using Twilio's API: |
| 48 | |
| 49 | |
| 50 | Example:[[BR]] |
| 51 | |
| 52 | {{{ |
| 53 | luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "SendSMSMessage",{ PhoneNumber= "555-555-1212", Message="Greetings from your Vera Home Automation System"}, 66) |
| 54 | }}} |
| 55 | |
| 56 | |
| 57 | '''!PhoneNumber''' = number of recipient |
| 58 | |
| 59 | '''!CustomVoiceCall''' will initiate a voice call, using the URL you specified in the Custom MSG URL by itself or with the Custom MSG Var Name config items. |
| 60 | |
| 61 | Example:[[BR]] |
| 62 | |
| 63 | {{{ |
| 64 | luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "!CustomVoiceCall",{ !PhoneNumber= "555-555-1212", Message="Hi there", !MsgFlag=2}, 66) |
| 65 | }}} |
| 66 | |
| 67 | |
| 68 | '''!PhoneNumber''' = number of recipient |
| 69 | '''!MsgFlag''' = 1 to only use custom URL, 2 to use custom URL and message variable name |
| 70 | |