Skip to content

Commit

Permalink
Merge branch 'current' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelPearson authored Jan 6, 2025
2 parents 268520e + 5637803 commit 823e2a2
Show file tree
Hide file tree
Showing 31 changed files with 164 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ group :development do
gem 'stringex', '2.8.6'
# > 2.1.0 causes slowdowns https://github.com/sass/sassc-ruby/issues/189
gem 'sassc', '2.1.0'
gem 'sass-embedded', '1.83.0'
gem 'sass-embedded', '1.83.1'
gem 'rubocop', '1.69.2'
gem 'ruby-lsp', '0.22.1'
gem 'rackup', '2.2.1'
Expand Down
14 changes: 8 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ GEM
base64 (>= 0.1.0)
logger (>= 1.6.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rackup (2.2.1)
rack (>= 3)
Expand Down Expand Up @@ -134,9 +135,10 @@ GEM
ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sass (3.4.25)
sass-embedded (1.83.0)
google-protobuf (~> 4.28)
rake (>= 13)
sass-embedded (1.83.1-arm64-darwin)
google-protobuf (~> 4.29)
sass-embedded (1.83.1-x86_64-linux-gnu)
google-protobuf (~> 4.29)
sass-globbing (1.1.5)
sass (>= 3.1)
sassc (2.1.0)
Expand All @@ -150,7 +152,7 @@ GEM
rack-protection (= 4.1.1)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
sorbet-runtime (0.5.11710)
sorbet-runtime (0.5.11718)
stringex (2.8.6)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand Down Expand Up @@ -178,7 +180,7 @@ DEPENDENCIES
rake (= 13.2.1)
rubocop (= 1.69.2)
ruby-lsp (= 0.22.1)
sass-embedded (= 1.83.0)
sass-embedded (= 1.83.1)
sass-globbing (= 1.1.5)
sassc (= 2.1.0)
sinatra (= 4.1.1)
Expand Down
4 changes: 1 addition & 3 deletions source/_includes/integrations/remove_device_service.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
### To remove an integration instance from Home Assistant

1. Go to {% my integrations title="**Settings** > **Devices & services**" %} and select the integration card.
2. From the list of devices, select the integration instance you want to remove.
3. Next to the entry, select the three-dot {% icon "mdi:dots-vertical" %} menu. Then, select **Delete**.
{% include integrations/remove_device_service_steps.md %}
3 changes: 3 additions & 0 deletions source/_includes/integrations/remove_device_service_steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Go to {% my integrations title="**Settings** > **Devices & services**" %} and select the integration card.
2. From the list of devices, select the integration instance you want to remove.
3. Next to the entry, select the three-dot {% icon "mdi:dots-vertical" %} menu. Then, select **Delete**.
2 changes: 1 addition & 1 deletion source/_integrations/modbus.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ All modbus entities have the following parameters:

{% configuration %}
address:
description: "Address of coil/register."
description: "Address of coil/register. Note that this can also be specified in Hex. For example: `0x789A`"
required: true
type: integer
name:
Expand Down
126 changes: 125 additions & 1 deletion source/_integrations/reolink.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ Set up the Reolink integration in Home Assistant using the credentials you set i

Removing a directly connected camera/NVR/Home Hub can be done by removing the integration following these steps:

{% include integrations/remove_device_service.md %}
{% include integrations/remove_device_service_steps.md %}

This will also remove all cameras/chimes connected to the NVR/Home Hub from Home Assistant.

Expand Down Expand Up @@ -493,6 +493,130 @@ For example, you can place arrow buttons on the card to [control the camera](/da

You can receive rich notifications on your phone when someone rings a Reolink doorbell or a Reolink camera detects an event like motion or a person.

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__small_notification.jpg' alt='Screenshot: Small phone notification'>
<img src='/images/integrations/reolink/rich_notification__big_notification.jpg' alt='Screenshot: Expanded phone notification'>
</p>

{% details "Rich notification tutorial" icon="mdi:cursor-hand" %}

Prerequisites:

- This [Reolink integration](#configuration)
- [Android or iOS companion app](https://companion.home-assistant.io/docs/getting_started#setting-up)
- [Remote access to Home Assistant](https://www.home-assistant.io/docs/configuration/remote/). Although you can receive text notifications without remote access, to see the camera image in the notification (rich notification), the phone needs to be able to reach Home Assistant. The rich notification will always work, even without remote access, when the phone is on the same network as Home Assistant.

1. In order to receive such a rich notification, we are going to make an automation in Home Assistant. In Home Assistant go to {% my automations title="**Settings** > **Automations & scenes**" %} and select **Create automation** > **Create new automation**.

![Settings button](/images/integrations/reolink/rich_notification__settings.png)
![Automations & scenes button](/images/integrations/reolink/rich_notification__automations_and_scenes.png)
![Create automation button](/images/integrations/reolink/rich_notification__create_automation.png)

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__new_automation.png' alt='Screenshot: new automation'>
</p>

2. Under **When**, select: **Add trigger** > **Entity** > **State**.

![Add trigger](/images/integrations/reolink/rich_notification__add_trigger.png)
![Entity](/images/integrations/reolink/rich_notification__entity.png)
![State](/images/integrations/reolink/rich_notification__state.png)

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__new_trigger.png' alt='Screenshot: new trigger'>
</p>

Then under **Entity**, select the binary sensor from the drop-down list corresponding to the camera event for which you want to receive a rich notification. For the Reolink integration the options are:

- binary_sensor.*camera name*_motion
- binary_sensor.*camera name*_person
- binary_sensor.*camera name*_vehicle
- binary_sensor.*camera name*_pet
- binary_sensor.*camera name*_animal
- binary_sensor.*camera name*_visitor (doorbell press)
- binary_sensor.*camera name*_package

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__entity_select.png' alt='Screenshot: Entity select'>
</p>

Note that these entity names will be translated into the language you configured Home Assistant in. You can type to search through all your entities. You can add multiple triggers if you want to send the same message for multiple camera events like person and vehicle detection. You can also create multiple automations with different messages for each event. In this case, we chose the visitor detection for doorbell presses:

3. Under **To** select the state in which the event is detected: for visitor **On** for the other sensors **Detected**:

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__state_select.png' alt='Screenshot: State select'>
</p>

4. Under **And if** you can **optionally** limit when the notifications need to be sent.

- For instance only when you are not home. The companion app will provide a device_tracker entity based on the GPS of your phone if you allow location tracking during the setup of the app. We will use this as an example but you can add as many conditions as you like:

Select **+ Add Condition** > **Entity** > **State**. Then under **Entity** select the device_tracker entity of your phone and under **State** select **Home**.

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__device_tracker_condition.png' alt='Screenshot: Device tracker condition'>
</p>

- If you want to limit the amount of notifications being sent using a cooldown time you can use the following template condition:

Select **Add Condition** again > **Other conditions** > **Template**. Then, under **Value template**, type the following:

{% raw %}

```yaml
{{as_timestamp(now()) - as_timestamp(state_attr('automation.reolink_push', 'last_triggered'), 0) > 30}}
```

{% endraw %}

The `automation.reolink_push` is the name of this automation, which will be set under step 7, and the `30` is the cooldown time in seconds.

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__cooldown_time_condition.png' alt='Screenshot: cooldown time condition'>
</p>

5. Under **Then do**, select **Add Action** > **Camera** > **Take snapshot**.

![Add action button](/images/integrations/reolink/rich_notification__add_action.png)
![Camera button](/images/integrations/reolink/rich_notification__camera.png)
![Take snapshot button](/images/integrations/reolink/rich_notification__take_snapshot.png)

Under **Targets**, select **Choose entity** and select the camera for which you want to add the image to the notification.

![Choose entity button](/images/integrations/reolink/rich_notification__chose_entity.png)
![Select Fluent camera](/images/integrations/reolink/rich_notification__select_fluent_camera.png)

Under **Filename**, fill in `/config/www/reolink_snapshot/last_snapshot_doorbell.jpg`. The first part `/config/www/` is absolutely necessary to allow your phone to access the saved image when it receives the notification. The reset of the folder and filename can be changed at will as long as you fill in the same filename under step 6.

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__screenshot_take_snapshot.png' alt='Screenshot: take snapshot'>
</p>

6. Add another action underneath by selecting **Add Action** > **Notifications** > **Send a notification via mobile_app_<phone name>**.

![Add action button](/images/integrations/reolink/rich_notification__add_action.png)
![Notifications button](/images/integrations/reolink/rich_notification__notifications.png)
![Send a notification via mobile app](/images/integrations/reolink/rich_notification__send_to_mobile_button.png)

Under **message**, type the text you want to receive in the notification. For instance, “Someone rang the doorbell”.
If you want to give the notification a title, select the **title** option. For instance, if you have multiple cameras that send you notifications, select the camera name: `Doorbell`.
Select the **data** option and fill in `image: /local/reolink_snapshot/last_snapshot_doorbell.jpg`. Note that `/config/www/` of the filename of step 5 now needs to be changed to `/local/`. The rest of the filename needs to be the same as in step 5.

<p class='img'>
<img src='/images/integrations/reolink/rich_notification__send_to_mobile.png' alt='Screenshot: send notification'>
</p>

You can personalize the notification further and even control what happens if you tap the notification on your phone, [read more about this here](https://companion.home-assistant.io/docs/notifications/notifications-basic/).

7. Select **Save**, give your automation a name like `doorbell notification`, and select **save** again.

![Save](/images/integrations/reolink/rich_notification__save.png)

You are all set, ring your doorbell and see the notification on your phone. Remember the conditions under **And if** need to be met, otherwise you will not receive the notification.

{% enddetails %}

### Automation ideas

- Turn on (outdoor) lights near the camera to improve image clarity at night once the camera detects a person, vehicle, or animal.
Expand Down
41 changes: 25 additions & 16 deletions source/_integrations/systemmonitor.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,40 @@ ha_codeowners:
- '@gjohansson-ST'
---

The System monitor integration allows you to monitor disk usage,
memory usage, CPU usage, and running processes.
The **System monitor** {% term integration %} allows you to monitor disk usage, memory usage, network usage, CPU usage, and running processes.

{% include integrations/config_flow.md %}

## Sensors

{% note %}

All entities are disabled by default, you need to enable the entities that you wish to use.
All entities are disabled by default, you need to [enable the entities](/common-tasks/general/#enabling-or-disabling-entities) that you wish to use.

All sensors are also marked as diagnostic and won't be automatically added to automatic dashboards.

{% endnote %}

### Disks

- Disk free - (One per disk/mount point)
- Disk use - (One per disk/mount point)
- Disk usage (percent) - (One per disk/mount point)
One sensor per found disk/mount point will be created

- Disk free
- Disk use
- Disk usage (percent)

### Network

- IPv4 address - (One per network interface)
- IPv6 address - (One per network interface)
- Network in - (One per network interface)
- Network out - (One per network interface)
- Packets in - (One per network interface)
- Packets out - (One per network interface)
- Network throughput in - (One per network interface)
- Network throughput out - (One per network interface)
One sensor per found network interface will be created

- IPv4 address
- IPv6 address
- Network in
- Network out
- Packets in
- Packets out
- Network throughput in
- Network throughput out

### Other

Expand All @@ -65,23 +68,29 @@ All sensors are also marked as diagnostic and won't be automatically added to au

## Add `process` binary sensor

The `process` binary sensor needs to be configured by the config entry options. Go to **{% my integrations title="Settings > Devices & services" %}**, select the **System Monitor** integration and click **Configure** to select which `process` binary sensors should be created.
The `process` binary sensor needs to be configured by the config entry options. Go to **{% my integrations title="Settings > Devices & services" %}**, select the **System Monitor** integration and select **Configure**.

You can select from the pre-populated list (current running processes) or manually enter the process name, to which a binary sensor will be created per selected `process`.

## Disk usage

{% note %}

The disk usage sensors do not support monitoring folder/directory sizes. Instead, it is only concerned with "disks" (more specifically mount points on Linux).
The disk usage sensors do not support monitoring folder/directory sizes. Instead, it is only targeting "disks" (more specifically mount points on Linux).

{% endnote %}

**Example output from the Linux `df -H` command**

```bash

$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 12G 16G 42% /
devtmpfs 805M 0 805M 0% /dev
tmpfs 934M 0 934M 0% /dev/shm
/dev/mmcblk0p1 253M 54M 199M 22% /boot

```

## Processor temperature
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 823e2a2

Please sign in to comment.