Alexa skill can't read my sensor data

#1

i’ve made an alexa skill to read my sensor data .my sensors are working fine .its uploading is working fine . the only problem is with alexa dont say my humidity value . when the skill got invoked alexa says " current humidity is " only it don’t say my sensor data … any help ?. i can provide any information

“text”: “current humidity is {{ data.Humidity.value }} .”

[Solved] Alexa skill can't read my sensor values simultaneously
#2

Are you able to attach a Debug Node to the end of the workflow and put the payload’s output here? In most cases the string template pointing to the data you’re trying to reference is simply incorrect.

1 Like
#3
	"body": {
		"version": "1.0",
		"response": {
			"outputSpeech": {
				"type": "PlainText",
				"text": "current humidity is  ."
			},
			"shouldEndSession": true
		}
	}
}

this is the json output from alexa console

these is from debug node :

{  
   "time":"2018-04-18T20:54:50.863Z",
   "data":{  
      "path":"/",
      "method":"post",
      "headers":{  
         "x-real-ip":"54.240.197.98",
         "x-forwarded-proto":"https",
         "x-forwarded-for":"54.240.197.98",
         "x-queue-start":"1524084890.859",
         "content-length":"2684",
         "content-type":"application/json; charset=utf-8",
         "accept":"application/json",
         "accept-charset":"utf-8",
         "signature":"***REDACTED***",
         "signaturecertchainurl":"https://s3.amazonaws.com/echo.api/echo-api-cert-5.pem",
         "user-agent":"Apache-HttpClient/4.5.x (Java/1.8.0_131)"
      },
      "query":{  

      },
      "body":{  
         "version":"1.0",
         "session":{  
            "new":true,
            "sessionId":"amzn1.echo-api.session.d5c8ec66-5b43-4dc8-900bvc6-9a3b282453f1",
            "application":{  
               "applicationId":"amzn1.ask.skill.ecd8f7c3-2d12-411b-95fd-77e9cvb08c9b8a5"
            },
            "user":{  
               "userId":"amzn1.ask.account.***REDACTED***"
            }
         },
         "context":{  
            "AudioPlayer":{  
               "playerActivity":"IDLE"
            },
            "Display":{  

            },
            "System":{  
               "application":{  
                  "applicationId":"amzn1.ask.skill.ecd8f7c3-2d12-411b-95f45d-77e908c9b8a5"
               },
               "user":{  
                  "userId":"amzn1.ask.account.***REDACTED***"
               },
               "device":{  
                  "deviceId":"amzn1.ask.device.***REDACTED***",
                  "supportedInterfaces":{  
                     "AudioPlayer":{  

                     },
                     "Display":{  
                        "templateVersion":"1.0",
                        "markupVersion":"1.0"
                     }
                  }
               },
               "apiEndpoint":"https://api.eu.amazonalexa.com",
               "apiAccessToken":"***REDACTED***"
            }
         },
         "request":{  
            "type":"IntentRequest",
            "requestId":"amzn1.echo-api.request.d97c18fa-0921-48dc-8a81-a8800SDf2a2909",
            "timestamp":"2018-04-18T20:54:50Z",
            "locale":"en-IN",
            "intent":{  
               "name":"groupthreewether",
               "confirmationStatus":"NONE"
            }
         }
      },
      "replyId":"5acd122746561c00066dea1d._ovnV6N~8GI3NIg63ysXu.nZ4s1LcJpoQtXA_VWsRZiW",
      "Humidity":{  
         "time":"2018-04-10T21:16:20.433Z",
         "value":65.0999984741211
      }
   },
   "applicationId":"5acce9e246561c00066dea12",
   "triggerId":"5acd122746561c00066dea1d",
   "triggerType":"webhook",
   "relayId":"000000000000000000000000",
   "relayType":"public",
   "flowVersion":"develop",
   "flowId":"5acd19ad6e4c990006437be1",
   "flowName":"Maneesha Skill",
   "applicationName":"Group3",
   "globals":{  

   }
}
#4

LORANS

my flow diagrams

#5

Assuming data.Humidity.value is being set on your payload by that Gauge Query Node, you need to switch the order of your nodes so that the Webhook Reply Node comes after the Gauge Query. As it stands now, you’re replying to the webhook request before the data is being attached to the payload, so there is no value at the path you specify.

The value is set once it reaches the Debug Node, however, which is why you’re seeing the value appear in the payload.

Also, I edited your reply to remove them but please be careful in the future about pasting things such as access tokens into this public forum.

#6

those access tokens are fake :smile: let me try your fix . thanks for replying

#7

Thanks now its working fine

#8

Happy I could help! Please let us know if you have any more questions.

#9

now my another problem is ,i won’t be able to add multiple values to my alexa skill like temperature and humidity

my webhook string :point_down::point_down:
{
“version”: “1.0”,
“response”: {
“outputSpeech”: {
“type”: “PlainText”,
“text”: “current humidity is {{ data.Humidity.value }} and current temperature is {{ data.Temperature.value }}.”
},
“shouldEndSession”: true
}
}

sometimes it says humidity value sometimes temperature . i can’t make it say both

#10

temp%20and%20humidity

Like this one may be the sensor data is not available at that time

#11

If you want the values of both nodes to be on your payload, you need to put the nodes in series and not branching them off separately from your trigger. What’s happening now is the two nodes are executing in parallel, and whichever one is finished first reaches the Webhook Reply Node, and that is the data that is available in the reply. The other goes nowhere since the reply to the webhook request has already been sent.

So build your workflow as one straight path: Webhook -> extract hum… -> Data: Gauge… -> Webhook Reply -> Debug.

And make sure you put the results of both gauge queries at different payload paths or the second one will simply overwrite the first.

Finally, make sure to adjust your Webhook Reply Node to reflect the new payload paths you set in the nodes that came before it.

[Solved] Alexa skill can't read my sensor values simultaneously