https://github.com/seven-io/webthings
WebThings addon for sending SMS via seven
https://github.com/seven-io/webthings
iot sms webthings webthings-adapter
Last synced: about 15 hours ago
JSON representation
WebThings addon for sending SMS via seven
- Host: GitHub
- URL: https://github.com/seven-io/webthings
- Owner: seven-io
- License: mit
- Created: 2022-01-27T10:51:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T13:27:38.000Z (over 2 years ago)
- Last Synced: 2025-01-07T12:51:18.560Z (over 1 year ago)
- Topics: iot, sms, webthings, webthings-adapter
- Language: TypeScript
- Homepage: https://www.seven.io
- Size: 132 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
seven SMS for WebThings
Send SMS notifications from your WebThings gateway via the seven gateway.
---
## Features
- **Outbound SMS** - Trigger SMS notifications from any WebThings rule or event
- **Multiple recipients** - Configure a list of phone numbers to be notified
- **Custom sender ID** - Optional alphanumeric or numeric sender identifier
- **API key fallback** - Reads `SEVEN_API_KEY` from the environment if not configured
## Prerequisites
- [WebThings Gateway](https://webthings.io/) 0.10.0 or newer
- A [seven account](https://www.seven.io/) with API key ([How to get your API key](https://help.seven.io/en/api-key-access))
- Node.js 20+ (only required when building from source)
## Installation
### Option 1: Pre-built release (recommended)
1. Download the latest [release archive](https://github.com/seven-io/webthings/releases/latest).
2. Extract the contents to `~/.webthings/addons/seven-adapter`:
```bash
mkdir -p ~/.webthings/addons/seven-adapter
tar -xzf seven-adapter-*.tgz -C ~/.webthings/addons/seven-adapter --strip-components=1
```
3. Restart the WebThings Gateway and enable the addon under **Settings > Add-ons**.
### Option 2: Build from source
```bash
git clone https://github.com/seven-io/webthings.git
cd webthings
npm ci
npm run build
./package.sh
```
The resulting `seven-adapter-.tgz` can be installed as in option 1.
## Configuration
Configure the addon under **Settings > Add-ons > seven > Configure**:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `apiKey` | string | yes* | Your seven API key. Falls back to `process.env.SEVEN_API_KEY` if empty. |
| `from` | string | no | Sender identifier. Max 11 alphanumeric or 16 numeric characters. Country-specific limitations may apply ([details](https://help.seven.io/en/set-sender-id)). |
| `recipients` | string[] | yes | Phone numbers in E.164 format that will receive notifications. |
\* required unless `SEVEN_API_KEY` is set in the environment.
### Example
```json
{
"apiKey": "your-seven-api-key",
"from": "WebThings",
"recipients": ["+491701234567", "+491709876543"]
}
```
## Usage
Once configured, the addon registers a notifier device. Use it in any WebThings rule by selecting **seven** as the notification target. The configured recipients will receive an SMS with the rule's notification message.
## Development
```bash
npm ci # install dependencies
npm run build # compile TypeScript to dist/
./package.sh # produce a release tarball
```
CI runs the build matrix on Node 20.x, 22.x and 24.x.
## Support
Need help? Feel free to [contact us](https://www.seven.io/en/company/contact).
## License
[MIT](LICENSE)