mirror of
https://github.com/caronc/apprise.git
synced 2025-01-08 15:09:27 +01:00
Updated Notify_lametric (markdown)
parent
0e37cf4278
commit
0c18cf4fc7
@ -18,9 +18,18 @@ With Device Mode, your Apprise query will directly interface with the LaMetric T
|
||||
#### Cloud Mode Setup
|
||||
Using Cloud Mode, you will interface with your LaMetric Time device through the internet.
|
||||
1. Sign Up and login to the [Developer Webpage](https://developer.lametric.com).
|
||||
1. Create a **Notification App** if you haven't already done so from [here](https://developer.lametric.com/applications/sources).
|
||||
1. Provide it an app name, a description and privacy URL (which can point to anywhere; I set mine to `http://localhost`). No permissions are required.
|
||||
1. Access your newly created app so that you can acquire both the **Client ID** and the **Client Secret** [here](https://developer.lametric.com/applications/sources)
|
||||
2. Create a **Indicator App** if you haven't already done so from [here](https://developer.lametric.com/applications/sources).
|
||||
- There is a great official tutorial on how to do this [here](https://lametric-documentation.readthedocs.io/en/latest/guides/first-steps/first-lametric-indicator-app.html#publish-app-and-install-it-to-your-lametric-time)
|
||||
3. Make sure to set the **Communication Type** to **PUSH**
|
||||
4. You will be able to **Publish** your app once you've finished setting it up. This will allow it to be accessible from the internet using the `cloud` mode of this Apprise Plugin. The **Publish** button shows up from within the settings of your Lametric App upon clicking on the **Draft Vx** folder (where `x` is the version - usually a 1)
|
||||
|
||||
5. When you've completed the above steps, the site would have provided you a **PUSH URL** that looks like this:
|
||||
- `https://developer.lametric.com/api/v1/dev/widget/update/com.lametric.{app_id}/{app_version}`
|
||||
|
||||
You will need to record the `{app_id}` and `{app_version}` to use the `cloud` mode.
|
||||
|
||||
The same page should also provide you with an **Access Token**. It's approximately 86 characters with two equal (`=`) characters at the end of it. This becomes your `{app_access_token}`. Here is an example of what one might look like:
|
||||
- `K2MxWI0NzU0ZmI2NjJlZYTgViMDgDRiN8YjlmZjRmNTc4NDVhJzk0RiNjNh0EyKWW==`
|
||||
|
||||
### Syntax
|
||||
Device Mode syntaxes are as follows:
|
||||
@ -30,7 +39,8 @@ Device Mode syntaxes are as follows:
|
||||
* `lametric://{userid}:{apikey}@{hostname}:{port}`
|
||||
|
||||
Cloud Mode syntax is as follows:
|
||||
* `lametric://{client_id}@{client_secret}`
|
||||
* `lametric://{app_access_token}@{app_id}`
|
||||
* `lametric://{app_access_token}@{app_id}/{app_version}`
|
||||
|
||||
### Parameter Breakdown
|
||||
The breakdown of parameters depend on whether you are using the Cloud Mode or Device Mode.
|
||||
@ -51,8 +61,8 @@ The breakdown of parameters depend on whether you are using the Cloud Mode or De
|
||||
#### Cloud Mode
|
||||
| Variable | Required | Description
|
||||
| ----------- | -------- | -----------
|
||||
| client_id | Yes | Your Device **Client ID** can be found on LaMetric's website [here](https://developer.lametric.com/applications/sources) after you create a **Notification App**.
|
||||
| client_secret | Yes | Your Device **Client Secret** can be found on LaMetric's website [here](https://developer.lametric.com/applications/sources) after you create a **Notification App**.
|
||||
| app_id | Yes | Your Indicator App's **Application ID** can be found in your *Indicator App Configuration**. You can access your application's configuation from the LaMetric's website [here](https://developer.lametric.com/applications/).
|
||||
| client_secret | Yes | Your Indicator App's **Access Token** can be found in your *Indicator App Configuration**. You can access your application's configuation from the LaMetric's website [here](https://developer.lametric.com/applications/).
|
||||
| mode | No | Define the Apprise/Lametric mode to use. This can be either set to `cloud` or `device`. It's worth pointing out that Apprise is smart enough to detect the mode you're using based on the URL you provide it. But for those who want to explicitly provide it's value, they can do so.
|
||||
|
||||
#### Example
|
||||
@ -65,7 +75,7 @@ apprise -vv -b "Test Message Body" lametric://abc123@192.168.1.3
|
||||
|
||||
Send a LaMetric Time notification using Cloud Mode (using LaMetrics Developer API):
|
||||
```bash
|
||||
# Assuming our {client_id} is 12:23:45:64
|
||||
# Assuming our {client_secret} is abcdefg==
|
||||
apprise -vv -b "Test Message Body" lametric://12:23:45:64@abcdefg==
|
||||
# Assuming our {app_id} ABCD1234
|
||||
# Assuming our {app_access_token} is abcdefg==
|
||||
apprise -vv -b "Test Message Body" lametric://abcdefg==@ABCD1234
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user