Google Nest Hub can't play HLS,But the HLS URL does work in HTML - actions-on-google

1.We are debugging our smart home camera stream using Google Nest Hub.
2.We have access to device sync and passed the validator.This is our Device Sync response:
{
"payload": {
"agentUserId": "b4ad4e18-ab90-4b0e-bc02-264da5bb6469",
"devices": [{
"traits": ["action.devices.traits.CameraStream"],
"name": {
"defaultNames": ["Imilab"],
"name": "camera1",
"nicknames": ["camera1"]
},
"attributes": {
"cameraStreamNeedAuthToken": false,
"cameraStreamSupportedProtocols": ["hls"],
"cameraStreamNeedDrmEncryption": false
},
"id": "gejiayu2",
"type": "action.devices.types.CAMERA",
"deviceInfo": {
"model": "a1znn6t1et8",
"manufacturer": "Imilab"
}
}]
},
"requestId": "8664974301718985362"
}
3.We provide the HLS address, which can be played normally using ffplay ffplay info or HTML, This is our demo HLS URL: https://cdn.cnbj2.fds.api.mi-img.com/cloud-storage-test/test1.m3u8.
4.But we can't use Google Nest Hub to play it. I recorded the debug video in the attachment. This is our camera stream response:
{
"payload": {
"commands": [{
"ids": ["gejiayu2"],
"status": "SUCCESS",
"states": {
"cameraStreamReceiverAppId": "",
"cameraStreamAuthToken": "",
"cameraStreamAccessUrl": "https://cdn.cnbj2.fds.api.mi-img.com/cloud-storage-test/test1.m3u8"
}
}]
},
"requestId": "1625829984244045201"
}

I have tested Google Home and Google Home Mini and neither is capable of playing HLS streams. Our radio station is in the TuneIn database which supplies Google devices with radio streams. Our Icecast streams work but not HLS streams. So I'm sure that your Google Nest Hub has the same lack of ability to play HLS.

Related

CameraStream Actions on Google

I am trying to integrate camera to my smarthome with google assistant. I followed CameraStream in actions on google. i have synced my camera and tried execute and responding with an URL(cameraStreamAccessUrl).
Command: "show camera"
google home reply: "Sure, streaming camera" <-- but it is not streaming the video.
Command: "show camera on my phone"
google home reply: "Sorry, i don't know where to play the video. Please tell me the exact name of the screen"
My question is how can i stream it on my phone or on the app?
execution request google json:
{
"inputs": [
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"customData": {
"barValue": true,
"bazValue": "lambtwirl",
"fooValue": 74
},
"id": "id"
}
],
"execution": [
{
"command": "action.devices.commands.GetCameraStream",
"params": {
"StreamToChromecast": false,
"SupportedStreamProtocols": [
"hls"
]
}
}
]
}
]
}
}], "requestId": "requestId"
}
my json response:
{
"requestId": "requestId",
"payload": {
"commands": [
{
"ids": [
"requestId"
],
"status": "SUCCESS",
"states": {
"cameraStreamAccessUrl": "https://url.url"
}
}
]
}
}
If you have a Chromecast in your home, the Google Home will forward the video stream to the Chromecast. I don't know where the stream would go if you don't have a display.
Saying "on my phone" is not a valid target from a Google Home. To get it on your phone, you'd need to use the Assistant on your phone or the Google Home App.

Response from dialogflow does not come to Google Assistant

Sometimes Google Assistant does not answer me even though I receive correct response from the fulfillment. That happens only when I use voice command, by using keyboard it always works fine.
What I receive instead of the response
It's just 'thinking'.
After using conv.close('You've punched-in into demo as Jack'); in DialogFlow history I can see following response:
{
"queryText": "Jack",
"fulfillmentMessages": [
{
"text": {
"text": [
"[{\"type\":0,\"speech\":\"\"}]"
]
}
}
],
"webhookPayload": {
"google": {
"userStorage": "{\"data\":{}}",
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "You've punched-in into demo as Jack"
}
}
]
},
"expectUserResponse": false
}
},
"outputContexts": [
...
],
"intent": {
"id": "96f93154-0ae4-4bb4-91c3-c1b796d7cda3",
"displayName": "punch-in"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}
Does any one experienced such issue?
Noticed on Galaxy S7, Android 6.0.1.
actions-on-google v.2.2.0
That mostly happens to me when the internet connection is not good. With voice, there is an extra layer of Voice to Text conversion. Same latency issue might be causing the issue in your case.
The google assistant team resolved the issues I created to them, and after that the issues is not reproduced.

Actions on Google Smart Home Skill: Room Hint / Home Graph

The documentation at https://developers.google.com/actions/smarthome/create-app#actiondevicessync mentions that the roomHint field of the JSON response to the sync request can be used to have Google automatically assign devices to correct rooms.
However, no matter what I return in that field, the user still has to manually assign every device to a room and I cannot get Google to automatically recognize the correct room using this roomHint field
Here's an example response:
{
"requestId": "500166151965294748",
"payload": {
"devices": [
{
"id": "9",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.OnOff"
],
"name": {
"name": "Light"
},
"willReportState": false,
"roomHint": "Attic"
}
]
}
}
Right now supplying a value for the roomHint is not used by the HomeGraph to determine which room this device is in.

Actions on Google - smart home - how to make Google Home response properly when smart home device is offline?

My smart home app can control my smart home devices already.
However, I can't make Google Home to say like "your device is offline" when the smart home device is offline.
Google Home always says "ok, turning device_name on.".
According to the document and Node.js example provided by Google, I tried 2 kinds of error response:
{
"requestId": "xxxxxxx",
"payload": {
"commands": [{
"ids": ["456"],
"status": "ERROR",
"errorCode": "deviceoffline"
}]
}
}
{
"requestId": "xxxxxxx",
"payload": {
"commands": [{
"ids": ["456"],
"status": "OFFLINE",
"errorCode": "deviceoffline"
}]
}
}
But both are not working.
Please enlighten me. Thanks.
2017/08/02 update:
offline status is working on QUERY, like "Is device_name on?".
Not working on EXEC, like "Turn on device_name".
You missed out online parameter in the JSON. Here is an example of offline
{
"ids": ["456"],
"status": "ERROR",
"errorCode": "deviceTurnedOff",
"online": false
}

Facebook graph API call for external URL not working with Youtube Urls

I was trying to get details of youtube urls using for example this video url :
/v2.5/?id=https://www.youtube.com/watch?v=AU_a76wE8fg
but whatever video url I use, its returning this template result -
{
"og_object": {
"id": "10150122667264389",
"description": "Judas Priest's official music video for 'Turbo Lover'. Click to listen to Judas Priest on Spotify: http://smarturl.it/JudasPriestSpotify?IQid=JudasPTL As fea...",
"title": "Judas Priest - Turbo Lover",
"type": "video.other",
"updated_time": "2016-01-17T18:59:08+0000",
"url": "https://www.youtube.com/watch?v=JhY9GOhFwN4"
},
"share": {
"comment_count": 28,
"share_count": 40022
},
"id": "https://www.youtube.com/watch?v"
}
What is wrong. Is facebook API broken for external urls from youtube ? Because its working fine with other website urls.
You need to UrlEncode the URL, because it contains a =. This is visible because the result contains only "id": "https://www.youtube.com/watch?v" and not "id": "https://www.youtube.com/watch?v=AU_a76wE8fg"
So /v2.5/?id=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAU_a76wE8fg should to the trick.