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 - jitterjames

Pages: 1 [2] 3 4 ... 515
16
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 23, 2022, 05:54:55 PM »
Happy Festivus to all!

17
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 17, 2022, 10:46:50 AM »
What version of VC are you using Pegleg?

18
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 17, 2022, 10:45:21 AM »
normally noise should be set lower (maybe 5) and increasing the "Equal +/-" to about 10 is going to help your compressed codes.  You see your values of 38, 41, 40, 42.  Those are probably all the same duration and the Equal +/- will allow VC to see that they are all the same and change them all to the average of their values.  So they will all be set to something like 40, and then replaced with a letter.

19
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 14, 2022, 12:10:03 PM »
If you break it down your code looks like this:  You can see the pattern.
code=
                 102,134,32,128,36,124,40,122,41,121,42,40,121,42,121,42,120,122,41,41,121,122,42,41,121,121,42,121,43,40,122,41,121,41,121,42,120,42,120,122,41,41,121,42,120,42,1201
,55,108,52,111,128,36,125,38,124,39,123,40,122,41,41,122,41,121,42,120,122,41,41,121,121,42,41,121,122,42,121,43,40,122,41,121,41,121,42,120,42,120,122,41,41,121,42,120,42,1201
,55,108,52,111,128,36,125,38,124,40,122,40,122,42,41,121,42,121,42,120,122,41,41,121,122,42,41,121,121,41,121,43,40,122,41,121,41,121,42,120,42,120,122,41,41,121,42,120,42,1201
,55,108,52,111,128,36,125,38,124,40,122,40,122,41,41,121,41,121,42,120,122,41,41,121,122,42,41,121,121,42,120,43,40,122,41,121,41,121,42,121,42,120,122,41,41,121,42,120,42,1201
,55,108,52,111,128,36,125,38,124,39,123,40,122,41,41,121,42,120,42,120,122,41,41,121,122,41,41,121,122,41,121,42,40,122,41,121,41,121,42,120,42,120,122,41,41,121,42,120,42,1201
,56,108,52,111,128,36,125,38,124,39,123,40,122,41,41,121,42,120,42,120,122,41,41,121,121,42,41,121,121,42,121,42,40,122,41,121,42,121,42,120,42,120,122,41,41,121,42,120,42,1201
,55,108,52,

20
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 14, 2022, 12:02:20 PM »
You may only need up to the first larger number, possibly also setting n>1

eg:
Code: [Select]
{M:IP.Beam 2.0}/sendRFraw?code=102,134,32,128,36,124,40,122,41,121,42,40,121,42,121,42,120,122,41,41,121,122,42,41,121,121,42,121,43,40,122,41,121,41,121,42,120,42,120,122,41,41,121,42,120,42,1201

21
I don't know much about sending ADB commands or the protocols involved but I  doubt it is something that you cando  directly from VC unless there is a python script that works in IronPython.

But if you are able to send commands using a command prompt then I woud try to initiate them from VC the way we do other command prompt actions.

22
BEAM IR/RF Wifi transceiver / Re: BEAM documentation / news
« on: December 02, 2022, 06:10:37 PM »
I did not know those chips could go bad but they are pretty cheap so trying a new one is probably the easiest place to start.

You should also try to remove the chip, check that the contacts are clean and that the antenna is secure and put it back in.

Make sure when learning codes to avoid other RF signals if possible and put your remote close to the receiving chip. There can also be some technique involved in holding down the remote button for long enough. Varies by remote.

Good luck and let us know what happens.

23
Sorry.  I'm in the middle of moving to a new house in a new province and have been completely focused on that.  Did not notice your post.

Is everything sorted out now?

24
General Discussion / Re: Still VOXing after all this time!
« on: September 08, 2022, 10:08:18 AM »
Thank you very much Jonathan.  I'm really happy to hear that.

We use VC a bit less than we used to but it is still very much in action in our home too! :D

I do miss the once active community on this forum but such is life!

25
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 23, 2022, 10:05:17 AM »
Here is my command xml.  Note that I'm using the GTTS actions here for speech.  If VoxCommando replied with some sort of text it usually gets passed back to Alexa and you hear it both on VC and on the echo.  But for this to work you may need to use my lastest lambda code posted above.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.3.1.1-->
<command id="47" name="event to voice command" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{1}&amp;&amp;play movie</ifParams>
    <then>
      <action>
        <cmdType>VC.TriggerEvent</cmdType>
        <params>
          <param>Play.Movie</param>
          <param>{1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>VC.TellVox</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>GTTS.Speak</cmdType>
        <params>
          <param><![CDATA[ ]]></param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TCP.WebServer.SetResponse</cmdType>
        <params>
          <param>Jarvis does not understand {1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>GTTS.GetLastText</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>{LastResult}&amp;&amp; </ifParams>
    <then>
      <action>
        <cmdType>TCP.WebServer.SetResponse</cmdType>
        <params>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TCP.WebServer.SetResponse</cmdType>
        <params>
          <param>OK</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>EchoToVC</event>
</command>

26
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 23, 2022, 10:02:49 AM »
I think it is set in the command actions Kalle.

See attached:

27
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 18, 2022, 06:18:04 PM »
Maybe you can use the two words Jar and Viss ?

I upgraded to node.js 12 and it still seems to be working.

28
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 18, 2022, 01:01:54 PM »
Also, I'm still using node.js version 10.  I'm not sure if I upgrade if it will keep working...

29
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 18, 2022, 12:58:59 PM »
Also...

Hi Pegleg.  It's nice to hear from you!  :biglaugh

30
VoxCommando Basics and Core Features / Re: Echo Dot Integration 2018
« on: August 18, 2022, 12:57:58 PM »
Here is my lambda code.  Note that there are a bunch of environment variables that need to be set or you can just replace them with your own values directly in the code.

Look in the code for process.env.VARNAME

Code: [Select]
/*
****** Pulls speech input and passes on to Voxcommando for custom events *****
*/
var http = require('http');
var Echo_App_ID = "amzn1.ask.skill.3bee3d22-3eb3-4282-4df7-925fc8111b2e"; 

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 = "VoxCommando";
    var shouldEndSession = true;

    var payload = "";
    var speechOutput = "error maybe?";
    var repromptText = "...";
    var i = 0;
    var slots = intent.slots;
   
    //Pull the spoken text and format
    var actionSlot = intent.slots.Action;
    var setAction = actionSlot.value.toLowerCase();
   
    if (setAction.endsWith(" only"))
    {
        shouldEndSession=true;
        setAction = setAction.replace(" only","")
       
    }
   
    if(process.env.phrases_cancel.includes(setAction))
    {
        speechOutput ="Cancelling";
        shouldEndSession=true;
        callback(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession));
        return;
    }
    else if (setAction.length<5)
    {
        speechOutput =process.env.tts_tooshort;
        shouldEndSession=false;
        callback(sessionAttributes, buildSpeechletResponse("Action string too short", speechOutput, repromptText, shouldEndSession));
        return;
    }
    setAction = setAction.replace("1st","first")
    .replace("2nd","second")
    .replace("3rd","third")
    .replace("4th","fourth")
    .replace("5st","fifth")
    .replace("6th","sixth")
    .replace("7th","seventh")
    .replace("8th","eighth")
    .replace("9th","nineth")
    .replace("10th","tenth")
    ;
   
    var setActionURI = require('querystring').escape(setAction);
    var VC_uri = '/api/VC.TriggerEvent&&EchoToVC&&' + setActionURI;
    var get_options = {
            host: process.env.ip,
            port: process.env.port,
            path: VC_uri
        };
    if (process.env.username !== '')
    {
        get_options = {
            host: process.env.ip,
            port: process.env.port,
            path: VC_uri,
            headers: {
                'Authorization': 'Basic ' + new Buffer.from(process.env.username + ':' + process.env.pwd).toString('base64')
            }
        };
    }
 
    // 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 () {
            //console.log(VC_results);
            cardTitle = VC_results;
            console.log(VC_results);
            if (res.statusCode === 200) {
                //Parse the Body results from VC, if the command was unknown we will repromt
                if(VC_results.indexOf('<Success>False') > -1) {
                    cardTitle = "Vc error: ";
                    speechOutput = "VoxCommando API error: "+setAction;
                    repromptText = "Try again or say cancel.";
                    shouldEndSession=false;
                }
                else
                {
                    var regex = /<WebResponse>([\s\S]*?)</;
                    var reMatches = VC_results.match(regex);
        if (reMatches)
        {
        var speechOutput = reMatches[1];
        }
                    else speechOutput = "I suck";
                }
            }
            callback(sessionAttributes,
                buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)); //Pass stingResult instead of speechOutput for debugging if needed
        });
    });
    get_req.on('error', function (e) {
        shouldEndSession=true;
        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 = "You see a smaller Jarvis in there.";

    // 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 = "Do you speak English?";
    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
    };
}

Pages: 1 [2] 3 4 ... 515