Skip to content

Commit

Permalink
GITBOOK-43: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly authored and gitbook-bot committed Nov 26, 2023
1 parent 56af19a commit 936ef63
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Companion app
description: Effortlessly manage your Linux machine
---

# 🌩 LNXlink
Expand Down
4 changes: 2 additions & 2 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
* [🌩 LNXlink](README.md)
* [🖥 Setup](setup.md)
* [🎬 Media Player](media-player.md)
* [🤯 Examples](examples.md)
* [🚗 Automations](automations.md)
* [🔱 Modules Usage](examples.md)
* [🤯 Automations](automations.md)
* [🛠 Development](development.md)
30 changes: 4 additions & 26 deletions automations.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
# 🚗 Automations
---
description: These are automation ideas that are really useful when Working From Home
---

## Set unavailable after shutdown

Just before LNXlink stops, it sends to MQTT an OFF command, but sometimes it doesn't stop gracefully. To fix this, you will have to create an automation on Home Assistant which checks for when was the last time one of the sensors got a value and if it exceeds it sends the OFF command to the MQTT server.

This is an example of the automation which checks events for the idle sensor:

```yaml
alias: lnxlink powered down
description: ""
mode: single
trigger:
- platform: template
value_template: >-
{{ (now() | as_timestamp -
states.sensor.desktop_linux_idle.last_changed | as_timestamp) >
10 }}
condition: []
action:
- service: mqtt.publish
data:
qos: 0
retain: true
topic: lnxlink/desktop-linux/lwt
payload: "OFF"
```
# 🤯 Automations

## Pause media playback when I am on the phone

Expand Down
10 changes: 7 additions & 3 deletions development.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# 🛠 Development
---
description: >-
You can easily create your own modules for exposing any sensor you want for
controlling or monitoring it.
---

## Programming
# 🛠 Development

### How to start

Create a python app which starts with the class Addon:
Create a python app `yourmodule.py` with a unique name which starts with the class Addon:

```python
class Addon():
Expand Down
44 changes: 43 additions & 1 deletion examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# 🤯 Examples
---
description: >-
These modules are not created using the autodiscovery or they need to be
combined with others to work.
---

# 🔱 Modules Usage

## Voice Assistant

Expand Down Expand Up @@ -921,3 +927,39 @@ card:

</details>

## Install Update

When a new version of LNXlink is available the update sensor on Home Assistant activates the INSTALL button, but when you are using the development installation this option doesn't get activated. You can manually send the MQTT topic to start the update:

```yaml
service: mqtt.publish
data:
topic: lnxlink/desktop-linux/commands/update/update
```
## Set unavailable after shutdown
Just before LNXlink stops, it sends to MQTT an OFF command, but sometimes it doesn't stop gracefully. To fix this, you will have to create an automation on Home Assistant which checks for when was the last time one of the sensors got a value and if it exceeds it sends the OFF command to the MQTT server.
This is an example of the automation which checks events for the idle sensor:
```yaml
alias: lnxlink powered down
description: ""
mode: single
trigger:
- platform: template
value_template: >-
{{ (now() | as_timestamp -
states.sensor.desktop_linux_idle.last_changed | as_timestamp) >
10 }}
condition: []
action:
- service: mqtt.publish
data:
qos: 0
retain: true
topic: lnxlink/desktop-linux/lwt
payload: "OFF"
```
4 changes: 4 additions & 0 deletions media-player.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: Control your media
---

# 🎬 Media Player

MQTT integration for a media player is not supported by home assistant, so a custom addon must be installed using HACS. I've modified an addon called [mqtt-mediaplayer](https://github.com/bkbilly/hass-mqtt-mediaplayer) for creating a new media\_player entity.
Expand Down
4 changes: 4 additions & 0 deletions setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: Get started with LNXlink
---

# 🖥 Setup

## Installation
Expand Down

0 comments on commit 936ef63

Please sign in to comment.