Your own Alexa skill
Running Dominevo's Alexa export through your own Smart Home skill and AWS Lambda — the Lambda, the skill, account linking, Send Alexa Events, the values Dominevo needs, testing and common errors.
The Alexa exporter works out of the box with the built-in Dominevo skill. This page is for running it through your own Smart Home skill instead: the same setup the built-in skill uses, in your own Amazon developer and AWS accounts. Choose it when you want full control over the skill, or cannot use the beta invitation.
Amazon now calls smart home skills smart home add-ons in places. They are the same thing; the developer console still lists them under Skills.
How the pieces fit
| Piece | Where it runs | What it does |
|---|---|---|
| Smart Home skill | Amazon developer console | Tells Alexa where to send requests and how to link accounts. |
| Lambda function | Your AWS account | Receives every Alexa request and forwards it to your hub. Also serves the two account-linking pages. |
| Alexa exporter | Your Dominevo hub | Answers the requests, and pushes doorbell presses, motion, battery level and device-list updates to Alexa. |
The Lambda keeps no state. Every token your hub issues carries the hub's public address, and the Lambda reads it to know where to forward each request. One Lambda can therefore serve several hubs.
What you need
- An Amazon developer account, signed in with the same Amazon account your Echo devices use. A skill in development is only visible to that account.
- An AWS account for the Lambda. A camera skill's traffic fits comfortably in the Lambda free tier.
- Your hub reachable from the internet over HTTPS, as for the built-in skill.
See Before you start. This page
uses
https://cams.example.comas the hub's public address. - The Alexa Smart Home export addon installed and running.
Pick the region first
The skill, the Lambda and Dominevo's Skill region must all match the region of your Amazon account:
| Your Amazon account | Skill language | AWS region for the Lambda | Dominevo Skill region |
|---|---|---|---|
| United States, Canada, Mexico, Brazil | e.g. English (US) | US East (N. Virginia), us-east-1 | North America |
| UK, Europe, India | e.g. English (UK), Italian, German | EU (Ireland), eu-west-1 | Europe |
| Japan, Australia | e.g. Japanese, English (AU) | US West (Oregon), us-west-2 | Far East |
A Lambda in another AWS region is not called for your account. A wrong Skill region in Dominevo makes Alexa reject everything the hub pushes: doorbell presses, motion, battery level and device-list updates.
Set it up
You go back and forth between the two consoles once: the Lambda needs the skill ID, and the skill needs the Lambda's ARN.
Generate two secrets
The skill and the Lambda share a client ID and a client secret. They are yours to choose: any two strong random strings. For example, run this twice:
openssl rand -hex 32Keep them at hand as SKILL_CLIENT_ID and SKILL_CLIENT_SECRET.
Get the Lambda code
The Lambda is a single file, index.js, with no dependencies. It ships in the
Alexa exporter's package, in the lambda-template folder:
npm pack @dominevo/addon-export-alexa
tar -xzf dominevo-addon-export-alexa-*.tgz package/lambda-template
# the Lambda is package/lambda-template/index.jsThe folder also holds the skill icons, in the two sizes Amazon asks for.
Create the Lambda function
In the AWS Lambda console, switch to the AWS region from the table above, then Create function:
- Author from scratch, any name, for example
dominevo-alexa. - Runtime: Node.js 22.x or newer.
- Architecture: either; arm64 is cheaper.
Then:
- Paste
index.jsinto the code editor (or upload it zipped) and Deploy. - Under Configuration → General configuration, set Timeout to 8 seconds. Alexa gives up after 8 seconds anyway. 256 MB of memory is plenty.
- Under Configuration → Function URL, create a function URL with Auth
type
NONE. Note it, for examplehttps://abc123xyz.lambda-url.eu-west-1.on.aws/. Account linking opens this URL in the Alexa app, so it must be public. - Note the function's ARN, from the Function overview.
Leave the trigger for later: it needs the skill ID.
Create the skill
In the Alexa developer console, Create Skill:
- Name: what the Alexa app will show, for example Dominevo (home).
- Primary locale: your language, in the region from the table above.
- Model / experience: Smart Home.
When it is created, copy the skill ID. It looks like
amzn1.ask.skill.<id>.
Connect the Lambda and the skill
Back in the Lambda console, Add trigger, choose Alexa, then Alexa Smart Home, and paste the skill ID as the application or skill ID. Only that skill can then invoke the function.
In the Alexa developer console, on the skill's Smart Home page, paste the Lambda's ARN as the Default endpoint and save. If your skill has locales in more than one region, each region needs its own Lambda in that region's AWS region, with its ARN in the matching regional field.
Account linking
On the skill's Account Linking page, with Auth Code Grant (the only grant smart home skills support):
| Field | Value |
|---|---|
| Your Web Authorization URI | <function URL>/authorize — e.g. https://abc123xyz.lambda-url.eu-west-1.on.aws/authorize |
| Access Token URI | <function URL>/token |
| Your Client ID | your SKILL_CLIENT_ID |
| Your Secret | your SKILL_CLIENT_SECRET |
| Your Authentication Scheme | Credentials in request body |
| Scope | leave empty |
| Domain List | leave empty |
| Default Access Token Expiration Time | leave empty |
Save.
Credentials in request body matters. With HTTP Basic the Lambda
never sees the client ID and secret it compares, and every link fails at the
token step with invalid_client.
The Authorization URI is a small page on the Lambda that asks for your hub's
address (https://cams.example.com), then hands over to the hub's own sign-in
and consent page. The hub only accepts Amazon's own return addresses
(layla.amazon.com, pitangui.amazon.com, alexa.amazon.co.jp), so the
Alexa Redirect URLs listed on the page need no action.
Allow the skill to send events
On the skill's Permissions page, turn on Send Alexa Events. Under Alexa Skill Messaging, select SHOW and copy the Alexa Client Id and Alexa Client Secret.
This is what lets your hub push doorbell presses, motion, battery level and device-list updates. Without it the cameras still work for live view, but nothing arrives on its own.
Set the Lambda's environment variables
In the Lambda console, Configuration → Environment variables:
| Variable | Value |
|---|---|
SKILL_CLIENT_ID | your SKILL_CLIENT_ID |
SKILL_CLIENT_SECRET | your SKILL_CLIENT_SECRET |
LWA_CLIENT_ID | the skill's Alexa Client Id |
LWA_CLIENT_SECRET | the skill's Alexa Client Secret |
LAMBDA_REDIRECT_URI | <function URL>/token |
HUB_INGRESS_TOKEN | optional — see Protect the hub's Alexa endpoint |
Save. No redeploy is needed.
Configure Dominevo
Open Administration → Connectivity → Device export → Alexa Smart Home export:
In Connection:
- Alexa skill: Custom skill.
- Skill region: the region from the table above.
- Alexa skill id: the skill ID.
- External address: your public address, e.g.
https://cams.example.com. The list is read from your connected remote access when the page opens; if your address is missing, check that the tunnel is connected and reopen the page. This is the address baked into every link, so set it before linking. - Save, and expose the cameras you want. See Exporters.
No client ID or secret is entered in Dominevo: the Lambda holds them and hands the hub short-lived tokens.
Enable the skill on your account
- In the Alexa developer console, open the skill's Test tab and enable testing in Development.
- In the Alexa app, open More → Skills & Games → Your Skills, then the Dev tab, and select your skill.
- Select Enable to use. The Lambda's page asks for your hub's address:
enter
https://cams.example.comand Continue. - Sign in to your hub if asked, and approve the request.
- Back in the Alexa app, let it discover devices.
In Dominevo, Account link now shows the Dominevo user who approved, and Amazon push grant: held. Exposed cameras appear in the Alexa app within a few seconds.
Test it
- Discovery — every exposed camera is listed in the Alexa app. If one is missing, select Troubleshooting → Re-sync now in Dominevo.
- Live view — "Alexa, show the front door" on an Echo Show.
- Events — press a doorbell, or walk past a camera with its own motion sensor, and watch for the announcement or the routine trigger.
- Logs — the Lambda's logs are in CloudWatch (Monitor → View
CloudWatch logs in the Lambda console). Each call to the hub logs a
timedFetch_timingline with its status and timing. On the hub, every request that arrives logsalexa directive: arrivedin the Alexa exporter's log.
Protect the hub's Alexa endpoint
The hub's Alexa endpoint is public, and every request already carries the linked account's token. With your own Lambda you can add a shared secret on top, so that only your Lambda gets through. It is in the Custom-skill security section, which appears only with Alexa skill set to Custom skill and is closed until you open it:
- Select Show ingress token and copy the value it shows. Only administrators can do this; the Setup block shows the token masked.
- Paste it into the Lambda's
HUB_INGRESS_TOKENvariable and save. - Back in Dominevo, turn on Require ingress token.
Turn it on only after the Lambda has the token, or Alexa stops working. Regenerate token under Rotate ingress token issues a new one and shows it once; update the Lambda straight after.
The ingress token applies only to a custom skill. With the built-in skill, Dominevo never requires it, whatever the switch was set to.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
| The Alexa app reports a generic error when you link | The hub is not reachable from the internet, or External address is empty or wrong. | Check https://cams.example.com opens from outside your network. Reopen the settings, check Connection → External address, then link again. |
Linking fails after you approve on the hub; the Lambda log shows invalid_client | Your Authentication Scheme is not Credentials in request body, or the client ID and secret differ between the skill and the Lambda. | Fix the scheme or the values, then link again. |
Lambda log shows unconfigured | SKILL_CLIENT_ID or SKILL_CLIENT_SECRET is not set on the Lambda. | Set both. |
Lambda log shows token has no hubUrl claim | The hub had no external address when the link was made. | Set External address, select Unlink now, and link again. |
| Cameras work but no doorbell, motion or battery events arrive; Account link shows no push grant | Send Alexa Events is off, or LWA_CLIENT_ID, LWA_CLIENT_SECRET or LAMBDA_REDIRECT_URI is wrong on the Lambda. The Lambda log shows ACCEPT_GRANT_FAILED. | Fix them, then Unlink now and link again: the grant is only handed over while linking. |
| A push grant is held but events still do not arrive | Skill region does not match your Amazon account. | Fix it in Dominevo. |
| Everything stopped after turning on Require ingress token | The Lambda has no token, or an old one. The hub logs rejected — missing/invalid ingress token. | Copy the current token into HUB_INGRESS_TOKEN. |
| The Alexa app says the skill needs re-linking | The link was revoked, by Unlink now or from Identity & Access. | Link again from the Alexa app. |
| The skill is not in Your Skills → Dev | The developer account and the Alexa app use different Amazon accounts, or testing is not enabled. | Use the same Amazon account; enable testing on the Test tab. |
| No devices are discovered and the Lambda log is empty | The Lambda's AWS region does not match the skill's region, or the trigger has a different skill ID. | Move the Lambda to the right region, or fix the trigger's skill ID. |
| Live view times out on the first try | The camera is slow to start, such as a sleeping battery camera. Alexa waits about 8 seconds. | Try again; see Limitations. |
Moving the hub
The hub's address is baked into each link. After changing External address, select Unlink now and link again from the Alexa app. The Lambda needs no change.
Then
- Alexa — what Alexa receives, per-camera options and managing the link.
- Remote access — the public address Alexa needs.
Alexa
Publishing Dominevo cameras and devices to Alexa — the public address it needs, the Dominevo skill, account linking, who sees what, detection sensors, snapshots, object detection, what an Echo Show receives, and managing the link.
Home Assistant
Publishing Dominevo cameras and devices to Home Assistant through the Dominevo integration — installing it, connecting both sides, choosing devices, and the entities you get.