bklavet / Echo-skill-to-control-Directv

amazon echo skill that will control a networked Directv Receiver so that users can control Directv with their voice
18 stars 67 forks source link

round about way of adding network presets #6

Closed bklavet closed 8 years ago

bklavet commented 8 years ago

Template for adding Network Presets:

spike is the value that comes from the Network_List or Control_List depending on what version of the skill you are using case "spike": path = '/tv/tune?major=241&minor=65535';//spike is channel 241

            break;

So to add a new channel to the index file like MTV channel 331, We will need to open the amazon developer site where we pasted our Utterances and IntentSchema, got to the "test" tab and go to the Service Simulator and type in m. t. v. and hit enter you will see something like this: "intent": { "name": "NetworkIntent", "slots": { "Network": { "name": "Network", "value": "MTV"

this lets us see how the network name will be delivered to lambda. In this case it is all caps "MTV" How you see this should be added to your custom slots values and saved. So "MTV" would be added and saved to the Control_List, or Network_List.. depending on what you are using. our case argument needs to be exactly what alexa is handing off so we would alter the the spike case argument above to this:

mtv, m. t. v., Mtv will not work, it has to be exactly what Alexa is handing off to Lambda to be recognized case "MTV": path = '/tv/tune?major=331&minor=65535';//MTV is channel 331

            break;

once this has been added in with the other network presets in the index file, we want to save it and create a new zip file and load to lambda once this has been done the Service Simulator should get a positive confirmation from Lambda and the echo should be able to run this.