Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RedDragonManor

Pages: [1]
1
One on one support / Re: RedDragonManor's special echo thread
« on: March 27, 2017, 05:05:49 PM »
Actually I was able to figure it out. The problem lied within the xml . I didn't have it copied in the command tree. So only one command was be executed. Now all I have to have is VC.Tellvox in the command and not only does the action I want to have happen, but Denise her self also speaks when the task  is being executed. By using a scrape for her. I will be making and posting a video for anyone that might be interested in  seeing what I've done thanks for everyone's help

2
One on one support / Re: RedDragonManor's special echo thread
« on: March 27, 2017, 06:51:43 AM »
I guess the question I'm asking is how do  I create a voice command within vox. So that When I have alexa to tell Denise which is what I chose voc will open  other stuff and such. right now after doing the initial set up with getting Alexa to talk to vox. The only command I can  do for example is. Alexa tell  Denise to  open  google chrome and all that works fine, but how do I do I set up  other commands to  do  this. I have other commands on  vox like open  Skype read emails weather and  other, but I cant apply the one I did for google  chrome. Becasue it does al l the commands at once. instead of just that one Im wanting to do  at that moment. I just need and example of something to go by

3
One on one support / RedDragonManor's special echo thread
« on: March 26, 2017, 09:17:38 AM »
I do have another question. How do  I get a different code I guess u would call it like yo u do  in the history 9 EchoToVC that shows up in  the history. I have it to where. when I have Alexa to  tell  Denise open  google  chrome she does that, but I want her to be able to  do  other stuff too like opening my Skype account and doing other stuff, but I dont know how to  get another trigger if u will within the history  so  that I may drag  it open  the command. If I try to apply the EchoToVox to  each  of the other commands she does each one right after another opening google chrome then opening my skype account any help  would be most helpful

4
One on one support / Re: Mysteriously resolved user error
« on: March 25, 2017, 10:09:07 PM »
Well I fixed it. It was so  simple. I don't know why  I didn't see from the the start. The problem was I didn't have it set for any where to go. Now I can have Alexa Tell Denise  to  open  google chrome through  Vox and it works. The problem was I didn't have a command set up  for it do  anything as far as Denise you  can  find out more about her here.
Guile will be releasing her 2.0 version which  will  include all her home automation features and more

5
One on one support / Re: Mysteriously resolved user error
« on: March 25, 2017, 07:41:26 PM »
So  I guess that's what I will  do then  is just take everything out and start all  over. I know its something very simple I will  let you  know what happens

6
One on one support / Re: Mysteriously resolved user error
« on: March 25, 2017, 06:12:29 PM »
It was after I try  to save and test. Removing the extra space has now allowed me to save it,but when I try to test it. This is the message that shows up  at the bottom. I have attached a pic of what it shows

7
One on one support / Re: Mysteriously resolved user error
« on: March 24, 2017, 09:44:04 PM »
Here's the entire code I'm also using version The current stable version is 2.2.3.5 and the only other version is the latest beta version

Code: [Select]
/*
****** Pulls speech input and passes on to Voxcommando for custom events *****
*/
var http = require('http');

var VC_ip = 'xx.xxx.xx.x'; // Add your WAN IP or DynDNS Host here
var VC_Port = '8096'; // Add the Port VC is listening to here
var VC_Event = 'EchoToVC'; // The name of the event which is created in VC
var EchoName = 'Room1'; // You can give your Echo a name here, which is transmitted as payload2 to VC. If you have more than one Echo this could
// be used to distinguish which Echo is sending the command to VC. To make us of this you would need to have one skill for each
// Echo, which unfortunately also means that each Echo needs to be assigned to a different Amazon account.
// Hopefully this can be replaced by the actual device name or ID at some time, but currently there is no way to do it.

var Echo_App_ID = " amzn1.ask.skill.e040c396-1abc-416e-b255-43178a6e0822";  // Add your Echo App ID here

exports.handler = function (event, context) {
    try {
        if (event.session.new) {
            onSessionStarted({requestId: event.request.requestId}, event.session);
        }
        if (event.request.type === "LaunchRequest") {
            onLaunch(event.request,
                     event.session,
                     function callback(sessionAttributes, speechletResponse) {
                        context.succeed(buildResponse(sessionAttributes, speechletResponse));
                     });
        }  else if (event.request.type === "IntentRequest") {
            onIntent(event.request,
                     event.session,
                     function callback(sessionAttributes, speechletResponse) {
                         context.succeed(buildResponse(sessionAttributes, speechletResponse));
                     });
        } else if (event.request.type === "SessionEndedRequest") {
            onSessionEnded(event.request, event.session);
            context.succeed();
        }
    } catch (e) {
        context.fail("Exception: " + e);
    }
};

/**
 * Called when the session starts.
 */
function onSessionStarted(sessionStartedRequest, session) {}

/**
 * Called when the user launches the skill without specifying what they want.
 */
function onLaunch(launchRequest, session, callback) {
    // Dispatch to your skill's launch.
    getWelcomeResponse(callback);
}

/**
 * Called when the user specifies an intent for this skill.
 */
function onIntent(intentRequest, session, callback) {
    var intent = intentRequest.intent,
        intentName = intentRequest.intent.name;
    callEchoToVC(intent, session, callback); // Whatever the Intent is, pass it straight through to VC
}

/**
 * Called when the user ends the session.
 * Is not called when the skill returns shouldEndSession=true.
 */
function onSessionEnded(sessionEndedRequest, session) {
}

// --------------- Main Intent Processing Function ----------------

function callEchoToVC(intent, session, callback)
{
    var sessionAttributes = "{}";
    var cardTitle = EchoName;
    var shouldEndSession = true;

    var payload = "";
    var speechOutput = "";
    var repromptText = "I could not understand, please try again";
    var i = 0;
    var slots = intent.slots;
   
    //Pull the spoken text and format
    var actionSlot = intent.slots.Action;
    var setAction = actionSlot.value.toLowerCase();
    var setActionURI = require('querystring').escape(setAction);

    var VC_uri = '/api/VC.TriggerEvent&&EchoToVC&&' + setActionURI + '&&' + EchoName;
    var get_options = {
        host: VC_ip,
        port: VC_Port,
        path: VC_uri
    };
 
    // Set up the request
    var get_req = http.request(get_options, function(res) {
        var VC_results = "";
        res.setEncoding('utf8');
        res.on('data', function (chunk) {
            VC_results += chunk;
        });
        res.on('end', function () {
            if (res.statusCode === 200) {
                //Parse the Body results from VC, if the command was unknow we will repromt
                if((VC_results.indexOf('intent: UNKNOWN') > -1)||(VC_results.indexOf('cmd is unknown:') > -1)) {
                     shouldEndSession=false;
                } else {
                    if(VC_results.indexOf('Return Msg: ') > -1) {
                        var lines = VC_results.split('\n');
                        for(var i = 0;i < lines.length;i++){
                            if(lines[i].indexOf('Return Msg: ') > -1) {
                                var rtn_msg = lines[i].split('Msg:')[1].trim();
                                if (rtn_msg !== '') {
                                    setAction = rtn_msg;
                                }
                            }
                        }
                    }
                }
            }
            callback(sessionAttributes,
                buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)); //Pass stingResult instead of speechOutput for debugging if needed
        });
    });
    get_req.on('error', function (e) {
        callback(sessionAttributes,
            buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession));
    });
    get_req.end();   
}

// --------------- WelcomResponse Function ----------------

function getWelcomeResponse(callback) {
    // If we wanted to initialize the session to have some attributes we could add those here.
    var sessionAttributes = {};
    var cardTitle = "Welcome to Echo To Voxcommando";
    var speechOutput = "Hello, I'm this home's automation AI, what can I do for you";

    // If the user either does not reply to the welcome message or says something that is not
    // understood, they will be prompted again with this text.
    var repromptText = "I could not understand, please try again";
    var shouldEndSession = false;
    callback(sessionAttributes,
             buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession));
}

// --------------- Helper Functions ----------------

function buildSpeechletResponse(title, output, repromptText, shouldEndSession) {
    return {
        outputSpeech: {
            type: "PlainText",
            text: output
        },
        card: {
            type: "Simple",
            title: "EchoToVoxcommando - " + title,
            content: output
        },
        reprompt: {
            outputSpeech: {
                type: "PlainText",
                text: repromptText
            }
        },
        shouldEndSession: shouldEndSession
    };
}

function buildResponse(sessionAttributes, speechletResponse) {
    return {
        version: "1.0",
        sessionAttributes: sessionAttributes,
        response: speechletResponse
    };
}

8
One on one support / Mysteriously resolved user error
« on: March 23, 2017, 06:28:49 PM »
I'm needing a little help  with coding for setting up Vox commando. I don't know what  else to try.  I have went over and over the instructions  and followed everything step  by  step. I have even  had a friend of mine look  at it and were both  a little stumped. I keep  get and error message
{
  "errorMessage": "Exception: TypeError: Cannot read property 'new' of undefined"
}

The tutorial and even  the written  instructions say  something about this but it has something to do  with  line 18  in  the code but the instructions  say nothing about it its like it cant read this part like its wanting a value of some kind any help  would be most appreciative yours truly Paul  thanks in advanced


exports.handler = function (event, context) {
    try {
          if (event.session.new)
            onSessionStarted({requestId: event.request.requestId}, event.session);
        }
        if (event.request.type === "LaunchRequest") {
            onLaunch(event.request,
                     event.session,
                     function callback(sessionAttributes, speechletResponse) {
                        context.succeed(buildResponse(sessionAttributes, speechletResponse));
                     });
        }  else if (event.request.type === "IntentRequest") {
            onIntent(event.request,
                     event.session,
                     function callback(sessionAttributes, speechletResponse) {
                         context.succeed(buildResponse(sessionAttributes, speechletResponse));
                     });
        } else if (event.request.type === "SessionEndedRequest") {
            onSessionEnded(event.request, event.session);
            context.succeed();
        }
    } catch (e) {
        context.fail("Exception: " + e);
    }

Pages: [1]