Alexa Smarthome Skill "Waiting for <Manufacturer Name>" on HVAC with retrievable set to false - alexa

I'm currently working on an Alexa Smarthome skill which can handle a multitude of device types, one of which type is an HVAC device. The server handling Skill requests is unable to handle multiple requests at a time, so instead of letting Alexa call "ReportState", I instead give it a "ChangeReport" when values change.
I'm using an Alexa.ThermostatController interface v3 capability as well as a PowerController, a TemperatureSensor, and an EndpointHealth capability to build the device. An example Discovery response looks like the following:
{
"endpointId": "12-34",
"manufacturerName": "Sample Manufacturer",
"description": "HVAC Control",
"friendlyName": "Office Test HVAC",
"additionalAttributes": {
"manufacturer": "Sample Manufacturer",
"model": "unknown",
"serialNumber": "unknown",
"firmwareVersion": "unknown",
"softwareVersion": "unknown",
"customIdentifier": "12-34"
},
"displayCategories": [
"THERMOSTAT",
"TEMPERATURE_SENSOR"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [
{
"name": "connectivity"
}
],
"proactivelyReported": true,
"retrievable": false
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ThermostatController",
"version": "3.1",
"properties": {
"supported": [
{
"name": "upperSetpoint"
},
{
"name": "lowerSetpoint"
},
{
"name": "thermostatMode"
}
],
"proactivelyReported": true,
"retrievable": false
},
"configuration": {
"supportedModes": [
"OFF",
"HEAT",
"COOL",
"AUTO"
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.TemperatureSensor",
"version": "3",
"properties": {
"supported": [
{
"name": "temperature"
}
],
"proactivelyReported": true,
"retrievable": false
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [
{
"name": "powerState"
}
],
"proactivelyReported": true,
"retrievable": false
}
}
]
}
Discovery will find the device and add it to the Alexa Home. However, when I go to the device in the app, it will not display the interface and instead say something along the lines of "Waiting for " and show a loading icon. When I go to set the thermostat by voice, such as "Set Office Test HVAC to 74 Degrees Fahrenheit", it says that the device "doesn't support that".
Does anyone know what's going on or how to fix this?
I checked the Cloudwatch logs to see if there was anything being sent from Alexa such as a ReportState directive, but could not find anything. I also tried setting a value on the thermostat to force a ChangeReport, and the ChangeReport seems to have been sent, but there's no update in the app. I have also been unable to find any errors in the Cloudwatch logs. I've checked over the responses and the Discovery message several times just to be sure, and I'm still not sure what the problem is.
I'm trying to get the HVAC device to show up in the app with the proper interface and allow users to control the device.

I had this issue with the version 3.1. I would suggest to change the version of Alexa.ThermostatController capability from 3.1 to 3.0. Also remember that the smart home capabilities used for your skill should mimic and map to physical buttons on your device.

Related

Google Smart Home can't recognize "action.devices.commands.TimerStart" command

I'm integrating my sprinkler product with Google Smart Home. Everything works except that the "action.devices.commands.TimerStart" command cannot be recognized by Google smart home.
Below is my SYNC response:
"body": {
"requestId": "12486236378229063564",
"payload": {
"agentUserId": "Oliver",
"devices": [
{
"id": "AAAA-BBBB-CCCC-DDDD",
"type": "action.devices.types.SPRINKLER",
"traits": [
"action.devices.traits.Timer",
"action.devices.traits.StartStop"
],
"name": {
"name": "Front yard"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "ABC company",
"model": "ABC",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"maxTimerLimitSec": 86399
}
}
]
}
}
Below is the QUERY response:
"body": {
"requestId": "7683156339707030974",
"payload": {
"devices": {
"AAAA-BBBB-CCCC-DDDD": {
"status": "SUCCESS",
"online": true,
"isRunning": false,
"timerRemainingSec": -1
}
}
}
}
When I type or speak "Start Front yard" on Google home app, my backend server receives the following command, which is correct.
"payload": {
"commands": [
{
"devices": [
{
"id": "AAAA-BBBB-CCCC-DDDD"
}
],
"execution": [
{
"command": "action.devices.commands.StartStop",
"params": {
"start": true
}
}
]
}
]
}
But when I type or speak "Run Front yard for five minutes" on Google home app, my backend server still receives the same command (action.devices.commands.StartStop) as the above. What I expect to receive is "action.devices.commands.TimerStart" command. Can anyone pls help point out what I'm doing wrong?
I expect to receive the "action.devices.commands.TimerStart" instead of the "action.devices.commands.StartStop" command after typing or speaking "Run Front yard for five minutes" on Google smart home.

Alexa home skill v3 ToggleController skill fails to find devices

I'm trying to use the Alexa Smart Home Skill ToggleController v3 interface to build a skill that will open and close my gate. I read the docs, and successfully implemented the sample light bulb tutorial from end to end. https://developer.amazon.com/en-US/docs/alexa/smarthome/smart-home-skill-tutorial.html
Everything worked fine. Then I created a new skill and tried to implement the ToggleController interface, mapping ON and OFF to Open and Close using semantics.
Account linking works fine
Lambda gets called with discover directive when I enable the skill on
my Alexa app
There are no errors in CloudWatch
Alexa Simulator calls the right directives and receives responses with no errors
Schema validates successfully
When I click discover devices, I get "No new devices found".
I checked all devices in the Alexa app and my device is not there.
Below is the discovery response message that my lambda returns - (from CloudWatch).
Does anyone know what I'm doing wrong?
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"messageId": "fedfbae4-0ec8-4b4e-81d1-c998bc0ee860",
"payloadVersion": "3"
},
"payload": {
"endpoints": [
{
"endpointId": "pleasant-view-gate",
"manufacturerName": "Ancient Geeks",
"description": "Smart Gate at Pleasant View Cottage",
"friendlyName": "Pleasant Gate",
"displayCategories": [
"OTHER"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.ToggleController",
"instance": "PleasantView.Gate",
"version": "3",
"properties": {
"supported": [
{
"name": "toggleState"
}
],
"proactivelyReported": false,
"retrievable": true
},
"capabilityResources": {
"friendlyNames": [
{
"#type": "text",
"value": {
"text": "Gate",
"locale": "en-US"
}
}
]
},
"semantics": {
"actionMappings": [
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Close"
],
"directive": {
"name": "TurnOff",
"payload": {}
}
},
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Open"
],
"directive": {
"name": "TurnOn",
"payload": {}
}
}
],
"stateMappings": [
{
"#type": "StatesToValue",
"states": [
"Alexa.States.Closed"
],
"value": "OFF"
},
{
"#type": "StatesToValue",
"states": [
"Alexa.States.Open"
],
"value": "ON"
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [
{
"name": "connectivity"
}
],
"proactivelyReported": false,
"retrievable": true
}
}
]
}
]
}
}
}

Which properties are required for Solana NFT metadata?

This seems to be the most authoritative documentation that I've found so far: https://docs.metaplex.com/nft-standard
{
"name": "Solflare X NFT",
"symbol": "",
"description": "Celebratory Solflare NFT for the Solflare X launch",
"seller_fee_basis_points": 0,
"image": "https://www.arweave.net/abcd5678?ext=png",
"animation_url": "https://www.arweave.net/efgh1234?ext=mp4",
"external_url": "https://solflare.com",
"attributes": [
{ "trait_type": "web", "value": "yes" },
{ "trait_type": "mobile", "value": "yes" },
{ "trait_type": "extension", "value": "yes" }
],
"collection": { "name": "Solflare X NFT", "family": "Solflare" },
"properties": {
"files": [
{
"uri": "https://www.arweave.net/abcd5678?ext=png",
"type": "image/png"
},
{
"uri": "https://watch.videodelivery.net/9876jkl",
"type": "unknown",
"cdn": true
},
{ "uri": "https://www.arweave.net/efgh1234?ext=mp4", "type": "video/mp4" }
],
"category": "video",
"creators": [
{ "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
]
}
}
These same docs state clearly that many fields are optional and should be omitted when not used. But which fields are required and which ones are optional?
Depends what you want to use it for. The simplest requirements I have used were:
{
"name": "Solflare X NFT",
"seller_fee_basis_points": 0,
"image": "https://www.arweave.net/abcd5678?ext=png",
"properties": {
"files": [
{
"uri": "https://www.arweave.net/abcd5678?ext=png",
"type": "image/png"
}
],
"category": "image",
"creators": [
{ "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
]
}
}
There is no reason to not include the rest as the cost of hosting this off-chain is minimal. I think most things would be optional but the important ones for an NFT would be the image attribute, as otherwise the NFT wont be able to be displated anywhere, and probably then the propertiess field because some wallets, DApps and marketplaces might use these fields to check file type. Creators should also be added if you want to receive royalties and without this field could result in your collection failing to be listed on marketplaces.
A short answer though, the minimum is not defined anywhere as removing certain things could break certain third party DApps. Depending how/where you want to use your NFT I would find out the requirements if you are desperately trying to minimise the metadata. Otherwise try to keep most of it.

Report State Always Return 404 after SYNC

I am able to pass the Test Suite but suddenly I'm getting the error 404 on the first time Report State after SYNC, which causes Account Linking failed. I have used the Validator provided at Smart Home Developer portal for my SYNC response which has no issue. And I found if I STOP then START my instance at GCP console, this issue is gone but comes back after a couple times of Account Linking and Unlink.
SYNC JSON object:
{
"requestId": "8044981777755038463",
"payload": {
"agentUserId": "123456789",
"devices": [
{
"id": "123-Fan",
"type": "action.devices.types.FAN",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.FanSpeed"
],
"name": {
"defaultNames": [
"Simple Connect Fan"
],
"name": "Livingroom Fan",
"nicknames": [
"Simple Connect Fan"
]
},
"willReportState": true,
"attributes": {
"availableFanSpeeds": {
"speeds": [
{
"speed_name": "S0",
"speed_values": [
{
"speed_synonym": [
"stopped",
"speed 0"
],
"lang": "en"
}
]
},
{
"speed_name": "S1",
"speed_values": [
{
"speed_synonym": [
"low",
"speed 1"
],
"lang": "en"
}
]
},
{
"speed_name": "S2",
"speed_values": [
{
"speed_synonym": [
"medium",
"speed 2"
],
"lang": "en"
}
]
},
{
"speed_name": "S3",
"speed_values": [
{
"speed_synonym": [
"high",
"speed 3"
],
"lang": "en"
}
]
}
],
"ordered": true
},
"reversible": false
},
"deviceInfo": {
"manufacturer": "company",
"model": "test"
},
"customData": {
"speedType": 3
}
},
{
"id": "123-Light",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.Brightness"
],
"name": {
"defaultNames": [
"Simple Connect Light"
],
"name": "Livingroom Light",
"nicknames": [
"Simple Connect LIGHT"
]
},
"willReportState": true,
"attributes": {
"commandOnlyOnOff": false
},
"deviceInfo": {
"manufacturer": "company",
"model": "test"
}
}
]
}
}
Report State JSON object:
{
"requestId": "11859327534344019896",
"agentUserId": "123456789",
"payload": {
"devices": {
"states": {
“123-Fan": {
"online": true,
"on": false,
"currentFanSpeedSetting": "S3"
},
“123-Light": {
"online": true,
"on": false,
"brightness": 70
}
}
}
}
}
I'm getting the error 404 on the first time Report State after SYNC, which causes Account Linking failed.
These two things should not be directly linked. The account linking flow should succeed if:
Google successfully receives an OAuth access token
Initial SYNC intent is successful
Initial QUERY intent is successful
Whether or not you are able to successfully call Report State should not cause account linking to fail. It would be because of an error in one of the above steps.
Regarding the 404 error itself, this is likely a timing issue. Until the above linking process is complete, the agentUserId and corresponding device IDs are not yet written to Home Graph. If the API call comes in too soon, this would cause a 404 error.
For the account linking process, however, this is not necessary. The initial QUERY intent sent during the above flow accomplishes the same end populating the initial state in Home Graph. Our Report State guide was recently updated to reflect this change:
Following the initial SYNC for a device, the platform sends a QUERY intent that gathers the state of the device to populate Home Graph. After that point, Home Graph only stores the state that is sent with Report State.
You should determine if you can get account linking to succeed without making an initial call to Report State.

Teams adaptive card wait for respons in Logic App

I'm trying out adaptive cards in an attempt to integrate warnings through logic apps with teams. the question i'm about to ask is related to having the connector in Logic app wait for an response from the adaptive card in Teams after being sent from the Logic app.
I've managed to create my adaptive card and in that card i have the necessary information and two actions at the bottom that i want my logic app to react on so to speak.
My Adaptive card looks something like this:
{
"type": "AdaptiveCard",
"version": "1.0",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "TextBlock",
"text": "Alert - Employee email differences found:",
"weight": "Bolder",
"size": "Medium",
"horizontalAlignment": "Left",
"spacing": "Medium",
"maxLines": 0
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "New Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person21#mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person22#mail.com"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Old Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person11#mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person12#mail.com"
}
]
}
],
"separator": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Update Now",
"style": "positive",
"data": true
},
{
"type": "Action.Submit",
"title": "Dismiss",
"style": "destructive",
"data": false
}
]
}
As you can se when i push on "update now" i get the error message saying "there is no backend/app to connect to" (in swedish - "Can't reach application, try again") basically.
So again what i'm trying to do is for the Logic app to wait for the respons.
After the logic app has sen the message it "completes".
So is this possible? If so, how do i get this to work?
while logic apps can send cards to MS Teams they can not listen on actions performed on those cards.
To be able to use card actions you need to have a custom service made that listens and acts on those activities.

Resources