diff --git a/README.md b/README.md index 8ee24af..d82bd54 100644 --- a/README.md +++ b/README.md @@ -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 === @@ -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 @@ -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 === @@ -64,7 +70,7 @@ tcp 0 0 :43340 :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 @@ -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) diff --git a/docs/dashboard-with-git-n-rpistats.yml b/docs/dashboard-with-git-n-rpistats.yml new file mode 100644 index 0000000..1b859ab --- /dev/null +++ b/docs/dashboard-with-git-n-rpistats.yml @@ -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 \ No newline at end of file diff --git a/docs/dashboard.yml b/docs/dashboard.yml new file mode 100644 index 0000000..ff67686 --- /dev/null +++ b/docs/dashboard.yml @@ -0,0 +1,98 @@ +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 \ No newline at end of file diff --git a/docs/image-10.png b/docs/image-10.png new file mode 100644 index 0000000..5370996 Binary files /dev/null and b/docs/image-10.png differ diff --git a/docs/image-2.png b/docs/image-2.png index 6333246..b336e3b 100644 Binary files a/docs/image-2.png and b/docs/image-2.png differ diff --git a/docs/image-3.png b/docs/image-3.png index ebc5ca5..edaa800 100644 Binary files a/docs/image-3.png and b/docs/image-3.png differ diff --git a/docs/image-4.png b/docs/image-4.png index ebd08bb..a0ff355 100644 Binary files a/docs/image-4.png and b/docs/image-4.png differ diff --git a/docs/image-5.png b/docs/image-5.png index f8d160d..0244d2c 100644 Binary files a/docs/image-5.png and b/docs/image-5.png differ diff --git a/docs/image-6.png b/docs/image-6.png index d90bec6..1513037 100644 Binary files a/docs/image-6.png and b/docs/image-6.png differ diff --git a/docs/image-7.png b/docs/image-7.png index 7b2c126..3deb845 100644 Binary files a/docs/image-7.png and b/docs/image-7.png differ diff --git a/docs/image-8.png b/docs/image-8.png index f3e6115..d8788fd 100644 Binary files a/docs/image-8.png and b/docs/image-8.png differ diff --git a/docs/image-9.png b/docs/image-9.png index fb899f1..df99bda 100644 Binary files a/docs/image-9.png and b/docs/image-9.png differ diff --git a/docs/image.png b/docs/image.png index 61b635f..ec53337 100644 Binary files a/docs/image.png and b/docs/image.png differ