Skip to content

Commit

Permalink
Extended documentation (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinussen authored May 29, 2024
1 parent 4b29cc9 commit 8022a19
Show file tree
Hide file tree
Showing 13 changed files with 359 additions and 10 deletions.
150 changes: 140 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ This integration is based on MQTT messages from the openmower container that run

It will give you full control over the mower. Buttons to start, stop, pause, create automations from etc. Statistics like battery load, motor temperature, location. GPS coordinates are integrated into the device tracker.

![alt text](docs/image-9.png)

![alt text](docs/image.png)

Prerequisites
===
Expand All @@ -30,12 +29,12 @@ export OM_MQTT_TOPIC_PREFIX="openmower" # The prefix that all MQTT traffic from
* Home assistant with HACS
* Mosquitto or similar MQTT broker. Mosquitto is the easiest to install, you find it in the add-on store.

![alt text](docs/image-5.png)
![alt text](docs/image-6.png)
![alt text](docs/image-8.png)
![alt text](docs/image-2.png)

Once installed it will turn up in the normal integrations as MQTT.

![alt text](docs/image-7.png)
![alt text](docs/image-3.png)


Installation
Expand All @@ -49,10 +48,17 @@ Add the integration in settings -> integrations. Here you fill in the details fo

Your mower should now turn up in Home assistant

![alt text](docs/image-2.png)
![alt text](docs/image-4.png)

![alt text](docs/image.png)
![alt text](docs/image-5.png)

On the lawn_mower.openmower you have the start/pause/return to home commands.

![alt text](docs/image-9.png)

If you want to expose those buttons directly in the dashboard, add them as scripts:

![alt text](docs/image-10.png)

Troubleshooting
===
Expand All @@ -64,7 +70,7 @@ tcp 0 0 <MOWER_IP>:43340 <HOMEASSISTANT_IP>:1883 ESTABLISHE
```
Verify that messages actually reach HA. In the MQTT integration listen for topic # or e.g. openmower/# if your prefix is openmower.

![alt text](docs/image-3.png)
![alt text](docs/image-6.png)


Additional resources
Expand All @@ -73,6 +79,130 @@ Additional resources
[RPI MQTT monitor](https://github.com/2m/rpi-mqtt-monitor-docker)
Nice way to get stats from the RPI into your HA. Install as a service/container on the RPI. In Mosquitto you add a bridge config for the messages.

![alt text](docs/image-8.png)
![alt text](docs/image-7.png)

Place the config file in /share/mosquitto in your HA, remember to do it IN the HA container if you run like that.
Place the config file in /share/mosquitto in your HA and set active to true, remember to do it IN the HA container if you run like that.

**HA built in GIT integration**

For those staying on the edge(!) of development, see what the latest commits are. Update or not?

**HA automation examples**

prisukamas delivers this automation. "I'm using this automation to send a pushover if mower is i IDLE state for > 10 mins and not charging with battery level lower than 98%, works fine:"


- alias: "OpenMower Failed Docking Alert"
trigger:
platform: state
entity_id: sensor.openmower_current_state
to: 'IDLE'
for:
minutes: 10
condition:
- condition: state
entity_id: binary_sensor.openmower_is_charging
state: 'off'
- condition: numeric_state
entity_id: sensor.openmower_battery
below: 98
action:
service: notify.pushover
data:
message: "OpenMower possibly failed to dock Battery level is {{ states('sensor.openmower_battery') }}%."

2m has this automation. "I am also using this automation to send a push notification to phones running Home Assistant app when OM enters emergency mode:"

- alias: OpenMower Emergency -> Mobile Notification
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.openmower_emergency
from: "off"
to: "on"
condition: []
action:
- service: notify.openmower_notification_devices
data:
title: OpenMower Emergency
message: OpenMower got into the emergency mode
data:
clickAction: lovelace/4
color: red
mode: single

Here notify.openmower_notification_devices is defined in configuration.yaml as:

notify:
- name: openmower_notification_devices
platform: group
services:
- service: mobile_app_pixel_8_pro
- service: mobile_app_pixel_tablet
- service: mobile_app_pixel_5

pinussen has this to start mowing if rain has not fallen or is predicted today. The rain sensor was set up following this Smart home junkie [video](https://www.youtube.com/watch?v=e8mlJBce3uQ)

alias: Mow the lawn
description: ""
trigger:
- platform: sun
event: sunrise
offset: "3:00:00"
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.total_rain_fallen_plus_expected
below: 1
- condition: numeric_state
entity_id: sensor.openmower_battery
above: 95
- condition: state
entity_id: sensor.openmower_current_state
state: IDLE
sequence:
- service: button.press
data: {}
target:
entity_id: button.openmower_start_mowing
mode: single


**Button scripts**

Example of script to start the mowing.

alias: Start mowing
sequence:
- service: lawn_mower.start_mowing
metadata: {}
data: {}
target:
device_id: 2f51ea5d53384b5c8af44e3874fa295f
mode: single
icon: mdi:play

Added in the dashboard like this:

cards:
- type: entity
entity: lawn_mower.openmower
- type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.start_mowing
icon: mdi:play
name: Start

**Example dashboards**

[simple dashboard](docs/dashboard.yml)

[simple dashboard with GIT integration and raspberry monitor](docs/dashboard-with-git-n-rpistats.yml)
121 changes: 121 additions & 0 deletions docs/dashboard-with-git-n-rpistats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
views:
- title: Openmower
path: Openmower
icon: mdi:robot-mower-outline
cards:
- type: vertical-stack
cards:
- type: entity
entity: lawn_mower.openmower
- type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.start_mowing
icon: mdi:play
name: Start
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.pause_mowing
icon: mdi:pause
name: Pause
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
icon: ''
entity: button.openmower_skip_path
name: Skip path
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: button.openmower_skip_area_2
icon: ''
name: Skip area
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.return_to_dock
icon: ''
- type: entities
entities:
- entity: sensor.battery
name: Battery
- entity: sensor.openmower_current_state_2
name: Current State
- entity: binary_sensor.openmower_emergency_2
name: Emergency
- entity: sensor.openmower_gps_percentage
name: GPS Percentage
- entity: binary_sensor.openmower_is_charging_2
name: Is Charging
title: Openmower
- type: map
entities:
- entity: device_tracker.openmower
default_zoom: 20
hours_to_show: 24
theme_mode: auto
- type: vertical-stack
cards:
- type: entities
entities:
- entity: sensor.openmower_battery_voltage
name: Battery Voltage
- entity: sensor.openmower_charge_current_2
name: Charge Current
- entity: sensor.openmower_charge_voltage
name: Charge Voltage
- entity: sensor.openmower_current_action_progress
name: Current action progress
- entity: sensor.openmower_gps_accuracy
name: GPS Accuracy
- entity: sensor.openmower_left_esc_temperature
name: Left ESC Temperature
- entity: sensor.openmower_mow_esc_temperature
name: Mow ESC Temperature
- entity: sensor.openmower_mow_motor_current_2
name: Mow Motor Current
- entity: sensor.openmower_mow_motor_temperature
name: Mow Motor Temperature
- entity: device_tracker.openmower
name: Position
- entity: sensor.openmower_right_esc_temperature
name: Right ESC Temperature
- entity: sensor.openmower_version
name: Version
title: Openmower
- type: vertical-stack
cards:
- type: entities
entities:
- entity: sensor.clemenselflein_open_mower_ros_latest_commit
- entity: sensor.clemenselflein_openmower_latest_commit
- entity: sensor.clemenselflein_openmoweros_latest_commit
title: GIT - latest commits
- type: entities
entities:
- entity: sensor.raspberrypi_cpu_clock_speed
name: CPU Clock Speed
- entity: sensor.raspberrypi_cpu_temperature
name: CPU Temperature
- entity: sensor.raspberrypi_cpu_usage
name: CPU Usage
- entity: sensor.raspberrypi_memory_usage
name: Memory Usage
- entity: sensor.raspberrypi_uptime
name: Uptime
- entity: sensor.raspberrypi_wifi_signal
name: Wifi Signal
title: rpi stats
Loading

0 comments on commit 8022a19

Please sign in to comment.