... | ... | @@ -10,6 +10,21 @@ This Addon listen for system commands on MQTT and execute it on the host machine |
|
|
|
|
|
This addon have the following commands:
|
|
|
|
|
|
- **(IOT Link) Refresh System Information**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/refresh
|
|
|
- **Payload Type**: None
|
|
|
- **Payload:** Empty
|
|
|
- **Home Assistant:**
|
|
|
```
|
|
|
my_computer_shutdown:
|
|
|
alias: "My Computer - Refresh"
|
|
|
sequence:
|
|
|
- service: mqtt.publish
|
|
|
data:
|
|
|
topic: "iotlink/workgroup/my-computer/refresh"
|
|
|
payload: ""
|
|
|
```
|
|
|
|
|
|
- **Shutdown Host System**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/commands/shutdown
|
|
|
- **Payload Type**: None
|
... | ... | @@ -130,18 +145,48 @@ This addon have the following commands: |
|
|
payload: ""
|
|
|
```
|
|
|
|
|
|
- **Turn On Displays**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/commands/displays/on
|
|
|
- **Payload Type**: None
|
|
|
- **Payload:** Empty
|
|
|
- **Home Assistant:**
|
|
|
```
|
|
|
my_computer_suspend:
|
|
|
alias: "My Computer - Displays On"
|
|
|
sequence:
|
|
|
- service: mqtt.publish
|
|
|
data:
|
|
|
topic: "iotlink/workgroup/my-computer/commands/displays/on"
|
|
|
payload: ""
|
|
|
```
|
|
|
|
|
|
- **Turn Off Displays**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/commands/displays/off
|
|
|
- **Payload Type**: None
|
|
|
- **Payload:** Empty
|
|
|
- **Home Assistant:**
|
|
|
```
|
|
|
my_computer_suspend:
|
|
|
alias: "My Computer - Displays Off"
|
|
|
sequence:
|
|
|
- service: mqtt.publish
|
|
|
data:
|
|
|
topic: "iotlink/workgroup/my-computer/commands/displays/off"
|
|
|
payload: ""
|
|
|
```
|
|
|
|
|
|
- **Run Application**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/commands/run
|
|
|
- **Payload Type**: JSON
|
|
|
- **Payload:**
|
|
|
- **command:** Application name or command line.
|
|
|
- **Example:** "notepad++.exe" or "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
|
|
|
- **args:** Command line arguments.
|
|
|
- **path:** Working directory which the application or command line will be executed from.
|
|
|
- **user:** Username which the application will be executed from. If empty will execute on the first logged user.
|
|
|
- **visible:** The application should be visible or will be completely hidden.
|
|
|
- **fallback:** Should the system fallback to the current logged user if the specified user is not currently logged in.
|
|
|
- **Home Assistant:**
|
|
|
- **Example:** "notepad++.exe" or "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
|
|
|
- **args:** Command line arguments.
|
|
|
- **path:** Working directory which the application or command line will be executed from.
|
|
|
- **user:** Username which the application will be executed from. If empty will execute on the first logged user.
|
|
|
- **visible:** The application should be visible or will be completely hidden.
|
|
|
- **fallback:** Should the system fallback to the current logged user if the specified user is not currently logged in.
|
|
|
- **Home Assistant:**
|
|
|
```
|
|
|
my_computer_run_chrome:
|
|
|
alias: "My Computer - Run Chrome"
|
... | ... | @@ -160,6 +205,40 @@ This addon have the following commands: |
|
|
payload: '{ "command": "C:\\Program Files\\CCleaner\\CCleaner64.exe", "args": "/AUTO", "path": "C:\\Program Files\\CCleaner\\", "user": "", "visible": true, "fallback": true }'
|
|
|
```
|
|
|
|
|
|
- **Show Notification**
|
|
|
- **Topic:** {prefix}/{domainName}/{machineName}/commands/notify
|
|
|
- **Payload Type**: JSON
|
|
|
- **Payload:**
|
|
|
- **title:** Notification Title (String - Len: +/- 27)
|
|
|
- **message:** Message (String - Len: +/- 100)
|
|
|
- **iconUrl:** (Optional) Custom icon URL (http or https) or file path (file:///). Must be accessible from the notified computer.
|
|
|
- **launchParams:** (Optional) Behavior when the notification is clicked.
|
|
|
- **Open URL:** toast://open/https://iotlink.gitlab.io
|
|
|
- **Open App:** toast://open/C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe#https://iotlink.gitlab.io#C:\\Program Files (x86)\\Google\\Chrome\\Application
|
|
|
- Additional parameters are sepatared by '#' (without quotes).
|
|
|
- **1st parameter:** Command Line
|
|
|
- **2nd parameter:** (Optional) Arguments
|
|
|
- **3rd parameter:** (Optional) Working Directory
|
|
|
- **Home Assistant:**
|
|
|
```
|
|
|
my_computer_notify_url:
|
|
|
alias: "My Computer - Notify Url"
|
|
|
sequence:
|
|
|
- service: mqtt.publish
|
|
|
data:
|
|
|
topic: "iotlink/workgroup/my-computer/commands/notify"
|
|
|
payload: '{ "title": "My Notification Title", "message": "This is an example of notification using IOT Link", "iconUrl": "", "launchParams": "toast://open/https://iotlink.gitlab.io" }'
|
|
|
|
|
|
my_computer_notify_app:
|
|
|
alias: "My Computer - Notify App"
|
|
|
sequence:
|
|
|
- service: mqtt.publish
|
|
|
data:
|
|
|
topic: "iotlink/workgroup/my-computer/commands/notify"
|
|
|
payload: '{ "title": "My Notification Title", "message": "This is an example of notification using IOT Link", "iconUrl": "", "launchParams": "toast://open/C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe#https://iotlink.gitlab.io" }'
|
|
|
|
|
|
```
|
|
|
|
|
|
# Observation
|
|
|
|
|
|
- Remember that all topics will be prefixed with your configured prefix, domain and machine name.
|
... | ... | |