custom.job_finished, and a Home Assistant automation can react to it.
The integration connects to AlexWeb resources and events. It does not automatically import Nest thermostats, Denon receivers, Homebridge accessories, or other physical devices. Changing an AlexWeb switch changes the stored API value; a separate app or automation must act on that value if you want it to operate hardware.
Before you start
You need:- Home Assistant 2026.10.0 or newer. This release targets the Home Assistant 2026.10 series.
- The AlexWeb API integration 1.0.0 package. Its file name is
alexweb-api-home-assistant-1.0.0.zip. Obtain the package from the API owner or the integration package supplied with this release. - An AlexWeb account and either a dedicated API key or an OAuth application.
- A connection from your Home Assistant server to
https://api.alexxweb.com. - Access to Home Assistant’s configuration folder so you can install a custom integration.
Install the integration
- Extract
alexweb-api-home-assistant-1.0.0.zipon your computer. It contains acustom_componentsfolder. - Open your Home Assistant configuration folder. This is the folder containing
configuration.yaml. On Home Assistant OS, file tools commonly show it as/configor/homeassistant. - If
custom_componentsdoes not exist inside that folder, create it. - Copy the entire
alexweb_apifolder from the package intocustom_components. - Confirm that the files sit directly inside
custom_components/alexweb_api. They must not be inside another nestedalexweb_apiorcustom_componentsfolder. - Restart Home Assistant Core so it discovers the integration.
- Go to Settings → Devices & services → Add integration and search for AlexWeb API.
translations/en.json inside translations. Uploading the ZIP itself into the configuration folder does not install it; its contents must be extracted and placed as shown above.
You configure the connection in Home Assistant’s interface. Do not add an alexweb_api: block to configuration.yaml.
Choose how to connect
Both methods access the resources and events belonging to the account that approves the connection. Neither method gives Home Assistant permission to manage keys, applications, webhooks, or schedules unless you independently give it those scopes. This integration does not use those management permissions.
Permissions you need
A scope is a permission attached to a key or OAuth token. All three read scopes below are required, even if you only want sensors.
For read-only access, grant the three read scopes and leave out
resources:write. Sensors and binary sensors are always read-only in Home Assistant. Switch and text entities still appear on a read-only connection, but an attempt to change them returns a read-only error and does not change the API value.
Connect with an API key
1. Create a dedicated Home Assistant key
Get a key privately from the API owner, or create one using a credential withkeys:manage. The creating credential must also have every permission you want to give the new key.
This example creates a key that can read resources and events and control switches and text:
"resources:write" from scopes. The response’s key is the secret value you will paste into Home Assistant. Save it privately when it is returned; the API shows it once. The response’s id is an identifier for managing the key, not a value you can use to sign in.
expiresInDays accepts 1–365. If you omit it, the default is 90 days. The new key cannot outlive the credential that creates it, so check the returned expiry date. When the key expires or is revoked, Home Assistant will ask you to reconnect with a replacement key for the same account.
See API Keys for key creation, listing, and revocation.
2. Enter the connection in Home Assistant
- Add AlexWeb API under Settings → Devices & services.
- Choose API key (simplest).
- Leave API address as
https://api.alexxweb.com. - Paste the complete
aw_key_...value into API key. Do not addBearerbefore it. - Submit the form.
/api/v1, a username, a password, a query string, or a fragment. A trailing / is accepted and removed. HTTPS is required for a public server. The API-key option also allows HTTP for a private IP address or localhost when connecting to your own local AlexWeb API.
Remember that localhost in this form means the Home Assistant server, not the computer where your browser is running.
Connect with OAuth
OAuth setup takes a few more steps. Home Assistant receives an access token after you approve its requested permissions. The integration uses the authorization-code flow with S256 PKCE and Home Assistant’s token refresh support. This OAuth option connects tohttps://api.alexxweb.com. Use the API-key option for a different API server.
1. Register a confidential application
Use an AlexWeb credential withapps:manage and the scopes you want to register. Home Assistant needs a confidential application because it stores and uses a client secret.
With the usual My Home Assistant setup, register this exact redirect URL:
"resources:write" from scopes and turn off controls when you connect in Home Assistant.
The redirect URL must match exactly. Do not substitute the Home Assistant dashboard URL or add a trailing slash. If you have intentionally configured a different OAuth redirect, register the exact callback Home Assistant uses. AlexWeb accepts HTTPS callbacks and HTTP loopback callbacks; an ordinary http://192.168.x.x callback is not supported. The My Home Assistant HTTPS redirect is the recommended choice for a Home Assistant server accessed over local HTTP.
My Home Assistant needs to be enabled for that redirect. It is included in a normal default_config: setup. The redirect page may ask you for your Home Assistant address so it can send the browser back to your installation.
See Applications for registration and OAuth for the authorization flow.
2. Add application credentials in Home Assistant
- Go to Settings → Devices & services.
- Open the menu in the top-right corner and choose Application credentials.
- Select Add application credentials and choose AlexWeb API.
- Enter a recognizable name, the returned client ID, and the returned client secret.
- Save the application credentials.
3. Approve the connection
- Add AlexWeb API and choose OAuth connection.
- Leave Allow switch and text controls on if you registered
resources:write. Turn it off for read-only access. - Choose your registered application if Home Assistant shows an application picker.
- On the AlexWeb consent page, check the application name and requested permissions.
- Enter an AlexWeb API key for the account you want to connect. That key must have all the requested scopes. Enter it only on the AlexWeb consent page at
api.alexxweb.com. - Approve the connection and follow the redirect back to Home Assistant.
What you’ll see
Your resources appear under the AlexWeb API integration. They are grouped under one service device for the connected account. Each resource has its own entity, and you can add those entities to dashboards or use them in automations.
For a switch,
true means on and false means off. For a binary sensor, Home Assistant may display a device-specific label such as open/closed if you set a supported device_class.
The API’s resource ID is the permanent identity. Home Assistant also scopes it to the API server and account, so unrelated accounts cannot share entity identities. Replacing a key for the same account keeps those identities. Home Assistant chooses the visible entity_id; copy the actual one from the entity’s settings when writing an automation.
Names, attributes, and tags
The resource’sname supplies its entity name. Rename a resource in the API to update the integration’s name; a name you explicitly customize in Home Assistant can take precedence.
Each entity exposes these attributes:
For numeric sensors, metadata such as
"device_class":"temperature", "unit_of_measurement":"°C", and "state_class":"measurement" can give Home Assistant the correct display and statistics behavior. The integration validates these values against Home Assistant’s supported classes and units. Invalid or incompatible metadata is ignored. String sensors do not receive numeric units or statistics classes.
Values longer than 255 characters
AlexWeb accepts text and string-sensor values up to 2,000 characters, but Home Assistant’s normal entity state has a 255-character limit. The integration does not truncate a longer value. Instead, its normal state is unknown and the full value is available in theresource_state attribute. It also adds state_exceeds_home_assistant_limit: true. This is a length limitation, not proof that the API is offline.
To read the full value in a template, use your actual entity ID:
Create your first resources
Resources are created in AlexWeb, then discovered by Home Assistant. The integration does not automatically create demo resources or offer a resource-creation form. The following requests need a credential withresources:write. A read-only Home Assistant key cannot run them; use a separate credential that has permission.
A temperature sensor
An on/off setting
true in AlexWeb, and turning it off saves false. This example is an application setting; it operates a physical device only if another app or automation uses the setting to do so.
A status message
How updates work
The integration first loads a snapshot containing the current resource states and an event cursor. The cursor is a number identifying the last API event included in that snapshot. It then asks for events after that number. By default, it uses two update paths:- Live updates: a Server-Sent Events connection, often called SSE, receives changes as the API sends them. One connection serves all entities in an integration entry.
- Periodic checks: Home Assistant uses a 30-second check interval to read event pages after its current cursor. These checks recover changes if the live connection was interrupted. Successful live updates can reset the next scheduled check.
Change the update settings
Open Settings → Devices & services → AlexWeb API and use the entry’s Configure or Options control.
Saving options reloads the connection. An interval of 30 seconds is a practical default. A shorter interval creates more API requests; a longer one delays recovery or updates when SSE is off.
Recovery after missing history
AlexWeb keeps the latest 10,000 events per account. If the integration’s cursor is older than the retained history, the API returns 410. The integration automatically loads a fresh snapshot and resumes from its new cursor. That recovers current resource states. It cannot recreate custom events that have already left the API’s retained history. The initial snapshot and a new snapshot after reload also start at the current cursor; events that happened before those snapshots are not replayed into Home Assistant automations. Treat event automations as reactions to events received while the connection is running, rather than as a durable job queue.Use API events in an automation
Every new API event received by the integration is fired on Home Assistant’s event bus asalexweb_api_event. This includes resource changes, schedule execution events, and your app’s custom.* events.
Event data
For acustom.job_finished API event with {"message":"Backup completed"}, the Home Assistant event data looks like this:
type is the AlexWeb event type, while data is the original event’s payload. entry_id identifies this Home Assistant connection and account_id identifies its AlexWeb account. Neither field is an API key.
For resource.created and resource.updated, data includes resourceId and the complete changed resource. For resource.deleted, it identifies the removed resource. Inspect the actual event for the exact fields needed by your automation.
To inspect events, open Developer tools → Events, enter alexweb_api_event under Listen to events, and start listening. Publish a test event from your app. The event should appear immediately with SSE or on the next periodic check.
Publish a test event
This request needsevents:write. That permission is not required by the integration itself; use a key belonging to the app that publishes the event.
alexweb_api_event in Home Assistant. Manually firing the Home Assistant event can test an automation, but it does not create an API event or change an AlexWeb resource.
Example automation
Create an empty automation under Settings → Automations & scenes, open its YAML editor, and use this example. It listens forcustom.job_finished and creates a Home Assistant notification.
trigger.event.data is the integration’s event envelope. The second .data accesses your app’s original payload. The .get() supplies a fallback message if your payload does not include message.
If several AlexWeb accounts are connected to the same Home Assistant, add account_id: YOUR_ACCOUNT_ID or entry_id: YOUR_ENTRY_ID under event_data to restrict the trigger to one connection. You can copy those IDs from the event listener.
You can also use ordinary Home Assistant state triggers with a resource entity, such as a switch becoming on. See Home Assistant’s event trigger documentation for additional trigger options.
Control a switch or text resource
Use the standard Home Assistant actionsswitch.turn_on, switch.turn_off, and text.set_value, or use the entity’s dashboard control. Choose your actual AlexWeb entity as the target. The connection must have resources:write as well as the three read scopes.
The integration sends the resource’s last confirmed version with each command. A version is the resource’s change number. If an app changes a resource before Home Assistant submits its command, the old version prevents Home Assistant from overwriting that newer change.
The entity only changes after the API confirms the command. It does not show a successful change in advance of a server response. If the API returns 412, the integration refreshes the resource and tells you that it changed elsewhere. Review the refreshed state and try again; it does not automatically overwrite the other client’s change.
For example, when you call the API directly, this command needs the version you last read:
RESOURCE_ID and 1 with the real resource ID and current version. The API accepts this command for switch and text resources only. A successful response contains the updated entity and its new version.
Replace credentials or reconnect
API key replacement
Create a new dedicated key for the same AlexWeb account, with the three read scopes and optional write scope. In the integration entry’s menu, choose Reconfigure and paste the new key. Leave the API address unchanged. Leaving the optional key field empty keeps the existing key. If Home Assistant has already marked the credential invalid, use its reconnect or repair prompt instead. That flow asks for a new key and verifies that it belongs to the original account. After confirming that the replacement works, revoke the old key in AlexWeb. Reconfiguration does not revoke the previous key for you.OAuth reapproval
Follow the reconnect prompt when Home Assistant reports that approval is needed. Approve using the original AlexWeb account. Use Reconfigure if you need to request switch/text permissions again or change a read-only OAuth connection to one with controls. The application registration and the approving key must include the newly requested scopes. An account is uniquely identified by its API server and account ID. The integration does not allow you to replace an existing entry with credentials for another account or a different API server. Add a separate integration entry for a different server or account. Adding the same server and account twice reports that it is already configured.Update or remove the integration
To update the integration, obtain the new release package, back up your Home Assistant configuration, replace the files insidecustom_components/alexweb_api, and restart Home Assistant Core. Keep the folder name alexweb_api. Use the release’s compatibility requirements when upgrading.
To disconnect an account, remove its entry under Settings → Devices & services. Reloading or removing an entry stops its live-event connection and unloads its entities. It does not delete the resources, events, API keys, or applications stored in AlexWeb.
Revoke the dedicated API key in AlexWeb if it is no longer needed. For OAuth, remove or revoke the application’s authorization in AlexWeb as appropriate; deleting a registered application revokes its OAuth access. Home Assistant’s stored application credentials can be managed separately from the integration entry. See Home Assistant’s credential removal instructions.
To uninstall the custom integration completely, remove its Home Assistant entries first, remove only the custom_components/alexweb_api folder, and restart Home Assistant Core.
Limits to keep in mind
The API also limits JSON request bodies to 16 KiB. Resource attributes have their own size and structure limits; see Resources. Your app should keep payloads and metadata small enough for the API’s documented limits.
Troubleshooting
AlexWeb API is missing from Add integration
Check thatmanifest.json is directly inside the configuration folder’s custom_components/alexweb_api directory. Make sure you uploaded all files, including __init__.py and translations/en.json. Restart Home Assistant Core after installing files, then refresh the browser and search again. Confirm that Home Assistant is 2026.10.0 or newer. Check Settings → System → Logs for an alexweb_api loading error if it still does not appear.
Setup succeeds, but there are no entities
An account with no resources produces no entities. Create a sensor, binary sensor, switch, or text resource using the Resources API. Make sure the creating app and Home Assistant’s key or OAuth approval use the same account. Wait for a live update or the next periodic check. Check the integration’s entities list as well as your dashboard; new entities do not necessarily appear on a manually configured dashboard automatically.The API address is rejected
Usehttps://api.alexxweb.com, with no /api/v1 suffix. Do not include spaces, login credentials, query parameters, or a fragment. For a local API-key connection, HTTP is permitted only for a private IP address or localhost. OAuth uses the hosted AlexWeb API address.
Invalid authentication or HTTP 401
The key or token is invalid, expired, or revoked. For an API key, paste the completeaw_key_... value and omit the word Bearer. A key ID is not a key secret. Create a replacement for the same account and use the reconnect prompt or Reconfigure. For OAuth, approve again; if the application secret changed, update Home Assistant’s application credentials first.
Missing permissions or HTTP 403
The connection requires all three ofresources:read, events:read, and integrations:read. Add resources:write if you want switch/text controls. A key’s permissions are fixed when it is created, so create a replacement key with the needed scopes. For OAuth, register the needed scopes on the application and approve again. Changing the application’s scopes invalidates older grants.
A switch or text control says the connection is read-only
The entity is visible, but the connected credential has noresources:write. Replace the key with one that has write permission, or reconfigure OAuth with Allow switch and text controls on. The app’s allowed scopes and the key used on the consent page must both permit writes. Sensors and binary sensors remain read-only by design.
OAuth reports a callback or redirect mismatch
Register the exact redirect used by Home Assistant. With My Home Assistant, it ishttps://my.home-assistant.io/redirect/oauth. Check spelling, scheme, path, and trailing slash. Make sure My Home Assistant is enabled and its redirect page points at your Home Assistant installation. An HTTP LAN dashboard address is not a supported AlexWeb OAuth callback. Restart the authorization flow after correcting the application registration.
Cannot connect, or entities are unavailable
Check that the API is reachable from the Home Assistant server, not just from your browser. Verify DNS, internet access, the API address, and TLS connectivity. The integration rejects API redirects, so use the actual server address instead of a redirecting URL. Temporary connection or server failures are retried; successful periodic updates restore availability. If authentication has failed, reconnect with working credentials.Live updates stopped, but periodic updates work
Leave Use live updates on and allow the stream to reconnect. A proxy or firewall may be interrupting the long-running connection. A 45-second stream read timeout detects a connection that stops sending data. If needed, turn live updates off and use periodic checks while you investigate. You do not need to open an inbound port to your Home Assistant server for this connection.HTTP 429 or request limit reached
The integration waits for the API’sRetry-After period before making more API requests; its delay is bounded to 1–300 seconds. It also pauses stream reconnection when limited. Keep the default 30-second check interval, and use a dedicated key so unrelated apps do not share the same credential’s request budget. Too many streams can also return 429; the account supports at most five at once. Avoid repeatedly reloading or submitting controls while the limit is active.
HTTP 410 or an event cursor expired
The integration automatically replaces the expired cursor with a fresh snapshot. Current resource states recover. Events no longer present in the retained history are not replayed into automations. No manual cursor editing is required.A command fails with HTTP 412
Another client changed the resource before your command was saved. The integration refreshes the state and reports the conflict. Review the new value and try again. This prevents your older view from silently overwriting a newer edit.Text or a string sensor shows unknown
Checkstate_exceeds_home_assistant_limit and resource_state in the entity’s attributes. A string longer than 255 characters is still stored in AlexWeb and is available in resource_state; shorten it to show it as the normal Home Assistant state. This differs from unavailable, which indicates a connection or resource-availability issue.
An old entity remains after deleting its resource
The integration leaves the registered entity unavailable. Remove the unused entity in Home Assistant after updating any dashboards or automations that reference it. Recreating the same name in AlexWeb does not reuse the old resource ID.Reconnecting says the account does not match
Use a replacement credential for the original account and API address. If you intend to connect another account or another server, add a separate integration entry. This check prevents an existing entity set from being silently reassigned to another account.Try the API directly
This snapshot request is useful when checking your key independently of Home Assistant. It needs the three read scopes.What the snapshot contains
The response has entities, cursor, and createdAt. Each entity includes its resource ID, stable unique ID, suggested API entity ID, domain, name, state, attributes, tags, version, availability, and whether its type supports commands. The integration additionally checks your credential’s write scope before allowing a command. The snapshot’s suggestedentityId is API metadata. Home Assistant’s entity registry decides the actual entity ID you use in its dashboards and automations.
Here is a shortened example with one switch resource:
false and its last saved version is 1. writable: true means its resource type accepts a command; a read-only credential still cannot send one. The cursor 123 means the client should ask for events after event 123 rather than treating it as a resource version. The cursor and resource version serve different purposes.
Other requests
These requests support the same major Home Assistant feature; they do not require separate Home Assistant integrations or separate documentation pages.
For app-side resource management, use Resources. For event payloads and polling, use Events. For credential setup, use API Keys, Applications, and OAuth.