Skip to content

Commit ba2ae93

Browse files
committed
Update readme
1 parent 08babd4 commit ba2ae93

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ import LametricFoundation
9191
// For a local device (recommended for Raspberry Pi, local servers)
9292
let client = try LametricClient(
9393
apiKey: "your-device-api-key",
94-
mode: .local(name: "your-device-name") // e.g., "sky3845" or "time1234"
94+
connection: .local(name: "your-device-name") // e.g., "sky3845" or "time1234"
9595
)
9696

9797
// For a device being exposed to the internet via a proxy
9898
let client = try LametricClient(
9999
apiKey: "your-device-api-key",
100-
mode: .remote(domain: "your-domain.com")
100+
connection: .url(host: "your-domain.com")
101101
)
102102
```
103103

@@ -171,7 +171,7 @@ class SystemMonitor {
171171
init() throws {
172172
self.client = try LametricClient(
173173
apiKey: ProcessInfo.processInfo.environment["LAMETRIC_API_KEY"] ?? "",
174-
mode: .local(name: "time1234")
174+
connection: .local(name: "time1234")
175175
)
176176
}
177177

@@ -192,13 +192,13 @@ class SystemMonitor {
192192

193193
### CLI Usage
194194

195-
The CLI supports environment variables for convenient configuration. If you don't configure these, you'll need to pass the api key and the device name (or remote host) as options **in every command**.
195+
The CLI supports environment variables for convenient configuration. If you don't configure these, you'll need to pass the api key and the device name (or an explicit host) as options **in every command**.
196196

197197
```bash
198198
export LAMETRIC_API_KEY="your-api-key"
199199
export LAMETRIC_DEVICE_NAME="your-device-name" # For local devices
200200
# OR
201-
export LAMETRIC_REMOTE_HOST="your-domain.com" # For remote devices
201+
export LAMETRIC_HOST="your-domain.com" # For remote devices or devices in the same network with a known host
202202
```
203203

204204
#### Basic Commands
@@ -242,8 +242,8 @@ lametric apps activate com.lametric.clock 1234567890
242242
# Local device (Raspberry Pi, same network)
243243
lametric --local-device-name "lametric-12ab34" notifications send --text "Local message"
244244

245-
# Remote device (cloud server, exposing your local device to the internet via some proxy)
246-
lametric --remote-host "my-lametric.example.com" notifications send --text "Remote message"
245+
# Remote device (cloud server, exposing your local device to the internet via some proxy) or device in the same network with a known host
246+
lametric --host "my-lametric.example.com" notifications send --text "Remote message"
247247
```
248248

249249
## Configuration
@@ -254,7 +254,7 @@ lametric --remote-host "my-lametric.example.com" notifications send --text "Remo
254254
|----------|-------------|---------|
255255
| `LAMETRIC_API_KEY` | Device API key | `abc123def456` |
256256
| `LAMETRIC_DEVICE_NAME` | Local device name | `sky3298` |
257-
| `LAMETRIC_REMOTE_HOST` | Remote host domain | `my-device.example.com` |
257+
| `LAMETRIC_HOST` | Host domain or IP address | `my-device.example.com` or `192.168.1.100` |
258258

259259
### Getting Your API Key
260260

0 commit comments

Comments
 (0)