Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alexa_smart_home_message_schema.json fails to validate Amazon's own Discovery.Response example #141

Closed
cloudon7281 opened this issue Feb 8, 2020 · 3 comments
Assignees

Comments

@cloudon7281
Copy link

Hi

I'm trying to debug why discovery responses from my formerly-working smart skill are seemingly not being recognised (no new devices are being reported in the Alexa app). Manually comparing my JSON response to the docs it looks fine, but following the advice in https://github.com/alexa/alexa-smarthome/wiki/Validation-Schemas I tried to use https://www.jsonschemavalidator.net/ to validate my response, and it reported hundreds of errors, starting with the unpromising "Alexa.Discovery" is not defined in enum. So instead of my skill's discovery response I tried the response example at https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-discovery.html#response - which found 70 errors.

I suspect I'm doing something stupid - surely the documented example discovery response should pass schema validation?

@cloudon7281
Copy link
Author

I've debugged my primary problem (my discovery responses were taking longer than the 8s timeout Alexa seemingly imposes; fixed by upping the memory allocated to my lambda, which in turn allocates more CPU) but the validation described by https://github.com/alexa/alexa-smarthome/wiki/Validation-Schemas seems broken.
Specifically:

Suggest that either the schema validation is fixed or the documentation updated.

@helviojr
Copy link

I had a problem that took my weekend away, but finally found it: the entities' additional attributes cannot have non-English characters!! The documentation does not say that. I'm planning on create a PR to fix that verification, so Discovery json will fail test (instead of being silently ignored by Alexa).

Other problem I found is the lack of WakeOnLANController in schema. If you're using that controller, surely you'll get those "hundreds of errors" (when it does not find a suitable option, it just report error for each one of the possibilities unfufilled). I proposed PR #157 to solve this one.

@cloudon7281 , please, let me know if those two would solve your issue (Wake on LAN PR or accent letter in additionalAttributes), so I can send a PR to solve that last one also.

@aszk aszk self-assigned this Oct 6, 2023
@aszk
Copy link
Contributor

aszk commented Oct 6, 2023

We've added WakeOnLANController. Closing.

@aszk aszk closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants