barma-lej / halandroid Goto Github PK
View Code? Open in Web Editor NEWWorx Landroid package for Home Assistant based on Landroid Cloud by @MTrab
License: MIT License
Worx Landroid package for Home Assistant based on Landroid Cloud by @MTrab
License: MIT License
Hi,
thanks for this plugin!
I have installed as described (renamed even my mover) so that have now the 3 sensors like "sensor.landroid_mover_status" etc.
Can see in status sensor the changing attributes - so all seems to be fine.
Adding your card - I see only "Unbekannt" , "0,0 km" etc.
If I check the properties in card I see as sample "sensor.mower_distance" for the value - but as far as I understand this is should be an attribute, right?
What I made wrong? what is missing?
Thank you for your help!
Have you thought about getting it working using its mqqt? I've seen an successful integration of a recuperating system with the use of mqqt. That would avoid the cloud dependency.
The definition of your template sensors create a warning in the logs since the last home assistant update:
Entity sensor.landroid_rasi_battery (<class 'custom_components.landroid_cloud.sensor.LandroidSensor'>) implements device_state_attributes. Please report it to the custom component author.
Honestly I don't fully understand it, adding attributes to a template sensor is still allowed according to the documentation.
Maybe you would want to look into that, could stop working at some point.
First device added after first installation of HomeAssistant. That has been a tough time!
I first couldn't get any information from sensor and I finally realized that your hardcoded the name you have to your mower, m500 (maybe the default one?) into each and any sensor name in both landroid.yaml and add_to_lovelace.yaml
Thus, if one has a mower called 'mymower', he should replace all 'sensor.landroid_m500' by 'sensor.landroid_mymower'.
I guest your package could be improved and that name retrieved by http and not hardcoded.
Your upper range for
halandroid/packages/landroid.yaml
Line 363 in 1194d9a
These are my first steps in github, I wanted to contribute by adding the Polish translation so I've prepared it and made it available here:
https://github.com/Erestes/PL-translation-for-halandroid/tree/main
@Barma-lej Not sure whether or not it is the right way of doing it - feel free to just copy/paste the file to your repo and let me know whether I should remove the file/folder from that repository afterwards.
Cheers.
In the YAML is the IP defined as
value_template: !secret landroid_ip
Is this intended? Since for this we'd had to define it in the Secrets-File?
Hi,
Just got done updating and re-configuring this after a year of neglect, there seems to be a missing - in the yaml
https://github.com/Barma-lej/halandroid/blob/master/packages/landroid.yaml#L251
According to vscode it's expecting an array so should be - sensor:
Hello can you please add LandXCape and Kress. For example like here https://github.com/MTrab/landroid_cloud.
To stop the owner and make it go home, landroid.yaml calls landroid_cloud.stop but that doens't exist. It's landroid_cloud.pause. Just replace it in landroid.yaml line 271 in script/landroid_stop/sequence
Hello
I installed this package a few days ago - just after I upgraded to HA 2021.11.
All works well - great work. Only issue is that I get the following error on the card when displaying the automations:
I have used the landroid.yaml and landroid_en.yaml from github.
When I try to run either of the two "missing" automations from the automations dashboard in HA I have errors returned in my log, such as:
Error while executing automation automation.mower_status_notificaion: Error rendering data template: UndefinedError: 'dict object' has no attribute 'from_state'
15:38:19 – (ERROR) Automation
Mower status notification: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'dict object' has no attribute 'from_state'
15:38:19 – (ERROR) Automation
Template variable error: 'dict object' has no attribute 'from_state' when rendering '{{ trigger.from_state.state }} -> {{ trigger.to_state.state }} - {{ states('sensor.date_time') }}'
15:38:19 – (ERROR) helpers/template.py - message first occurred at 15:38:18 and shows up 2 times
Error while executing automation automation.mower_error_notificaion: Error rendering data template: UndefinedError: 'dict object' has no attribute 'from_state'
15:38:18 – (ERROR) Automation
Mower error notification: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'dict object' has no attribute 'from_state'
15:38:18 – (ERROR) Automation
This is the section of my landroid.yaml which defines the two automations:
# Automations #######################################################
automation:
- id: mower_notify_status
alias: Mower status notificaion
initial_state: false
trigger:
- platform: state
entity_id: sensor.landroid_mower_status
condition:
- condition: template
value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
action:
- service: persistent_notification.create
data:
title: 🏎️ Lanroid M500
message: "{{ trigger.from_state.state }} -> {{ trigger.to_state.state }} - {{ states('sensor.date_time') }}"
- id: mower_notify_error
alias: Mower error notificaion
initial_state: true
trigger:
- platform: state
entity_id: sensor.landroid_mower_error
condition:
- condition: template
value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
action:
- service: persistent_notification.create
data:
title: 🏎️ Lanroid M500
message: "{{ trigger.from_state.state }} -> {{ trigger.to_state.state }} - {{ states('sensor.date_time') }}"
(as an aside - there is a typo in the alias of both automations - "notificaion" instead of of "notification")
Am I doing something wrong?
Hi,
this is only a feature request and maybe also interesting for this package. :-)
Problem:
If you have a mowing time from 9 to 12 every day and you have the hole week raining weather. The mower runs the hole week not.
Maybe you can define days variable (example 3) for deactivating the "not mowing with rain". And activate this option again for example after 2 days normaly mowing.
I hope i explained the use case understandable.
Hello,
Thank you for this great package.
I discovered through the error notification that there is a requirement of Time & Date integration with date_time
otherwise the user will get a "- unknown" at the end of the message for mower_notify_status
and mower_notify_error
automations.
The sensor is referenced here:
https://github.com/Barma-lej/halandroid/blob/master/packages/landroid.yaml#L491
and here:
https://github.com/Barma-lej/halandroid/blob/master/packages/landroid.yaml#L491
I am not sure if that's really mandatory to have it here in the first place since the notification has already a time.
I leave it up to you if you prefer to remove the dependency or add the "Time & Date" integration as a requirement in the README.md.
Hi!
Have followed your manual (all steps) but i do not get all the sensors when i created lovelace card.
Edited the landroid.yaml (eng) and switched names for "sensor.landroid_mower_battery", "sensor.landroid_mower_error", "sensor.landroid_mower_status" and replaced mower with my name in the app. I also edited the card and replaced every name there also. But in the lovelacecard i only get "status", "battery". for an example sensor.landroid_wifi only gets an !, the same for sensor.landroid_dist... When i click on the card i have all status inclusive distance. What have i missed. Thank you for very good work!
Hello,
When I add:
packages: !include_dir_named packages
I have this error (check config):
Package landroid setup failed. Component script cannot be merged. Dict expected in main config.
What is wrong ?
Thanks
My apologies, as im the only one I'm sure it's not a bug, but, I can't get the images to display in my lovelace card so everything is crunched up.
I've tried everything from using the full path name to using relative names. The images all seem to have the right permissions (read for everything) and the directories are rwx
The images below show the issue and that it is managing to pull the data without problem.
Has anyone got any ideas?
I get the error when setting [input_select.mower_zone]
Invalid option: 7 (possible options: 0, 1, 2, 3)
This relates to the fact that Landroid is reporting mowing in zone 7 (it shows 1 in the app).
Not sure where this difference is coming from, maybe because I added and removed zones at some point.
Hi @Barma-lej
Once again, great job on Halandroid! Below is my translation from German to English for anyone that may be looking for it.
Simply find and replace the words (using something like Notepad++) in your landroid.yaml file (packages folder) and in your "add_to_lovelace.yaml" file (or your Home Assistant Lovelace Raw Configuration file, if you have already the code added to Lovelace).
German | English |
---|---|
Akku Status | Battery Status |
Akkuladung | Battery |
Akkuspannung | Battery Voltage |
Akkustatus | Battery Status |
Akkutemperatur | Battery Temperature |
Aktualisiert seit | Last Update |
Arbeitszeit | Total Time |
Batteryen | Battery Charge Cycles |
Benachrichtigung | Notification |
Entlädt | Discharging |
Fehler | Error |
Ges. Distanz | Total Distance |
Gesamte Arbeitszeit | Total Time (hours) |
Gesamte Distanz | Total Distance |
Gieren/Рысканье | Yaw |
Information | Information |
IP-Adresse | IP Address |
Klingenarbeitszeit | Blade Time |
Lädt | Charging |
MAC-Adresse | MAC Address |
Mähen | Mow |
Mähen beenden | Stop Mowing |
Mähen pausieren | Pause Mowing |
Mäheroboter | Robotic lawnmower |
Mähplan | Schedule |
Nicken/Тангаж | Pitch |
Regenverzögerung | Rain Delay |
Rollen/Крен | Roll |
Seriennummer | Serial Number |
Stop & Nach Hause fahren | Stop & Drive Home |
WLAN Qualität | WIFI Quality |
Zeiterhöhung | Time Increase |
PS: take care when finding and replacing the word "Mähen" as it exists a few time as part of 2 words.
Hi,
Just installed the new integration version for Landroid - noticed a typo in configuration of one of the config parameters.
In helpers the entity is setup as:
input_number.mower_timeextension
but in the card it is referenced as:
input_number.mower_time_extension
Correcting the helper name fixes the issue.
Regards,
It might be possible to do a mix off this and below to make a fully on click install plugin/add-on for hassio?
https://github.com/stefanlaheij/hassio-addons
Hi, great work by the way...
How can i setup two mowers?
Hi again
I translated the word in the configure section at the end of landroid.yaml, but all the occurrences which are hard-coded in add_to_lovelace.yaml are not replaced. Is that a bug?
Hi to everybody,
so this is not an issue but only a question.
How is it possible to configure multiple accounts?
halandroid/packages/landroid.yaml
Line 249 in 16a0971
halandroid/packages/landroid.yaml
Line 263 in 16a0971
halandroid/packages/landroid.yaml
Line 277 in 16a0971
It is really just cosmetic change, and I am not sure how this could be resolved differently, but an English version of the Tg., Std., should be implemented like:
{{ "%0d D. %0.02d H. %0.02d Min." | format(t // 1440, ((t % 1440) // 60), t % 60) }}
Hi,
I current try to add the halandroid to my HA installation. And with my Worx Landroid M500 Plus I did't get alle entities. Only these few
I hope I configured all correct. landroid_cloud is also added and configure like in the documention. Firmware is 3.24.
When I try to start the mover I get this error:
Or is the M500 plus not supported at the moment?
https://github.com/MTrab/landroid_cloud/releases/tag/v1.8.0
Any chance to get the new functions and services integrated?
Thanks in advance.
Hi there,
I have followed all the installation instructions and in the end i got into this stage with missing components. I can however start, stop, send home and can see the battery charging, etc. But missing the dashboard entities:
Have not much an idea on how i could fix this, as i have no errors in the log file and all configuration files are looking good as per instructions.
Here is the system info:
Any help would be much appreciated
Hi everybody,
I need you ... I'm having an issue when I restart HA.
I have this issue reported in logs :
Invalid config for [template]: expected dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('name', 'Landroid IP'), ('unique_id', 'landroid_ip'), ('state', None), ('icon', 'mdi:ip-network')]), OrderedDict([('name', 'Landroid SN'), ('unique_id', 'landroid_sn'), ('state', '201930198601008203B0'), ('icon', 'mdi:numeric')]), OrderedDict([('name', 'Landroid MAC'), ('unique_id', 'landroid_mac'), ('state', '98:D8:63:46:1C:36'), ('icon', 'mdi:barcode')]), OrderedDict([('name', 'Landroid Bladetime'), ('unique_id', 'landroid_bladetime'), ('state', "{{ state_attr('sensor.landroi.... (See /config/packages/landroid.yaml, line 66).
With this issue, i cannot see any blade time, id, s/n, tilt, pan and many other informations. But I can see batery level, landroid version, state (idle, mowing, ...) and errors.
I precise that I've the original landroid.yaml file. I haven't change anything in this file.
Landroid repo installed with HACS, on HA core-2021.10.6 on a Docker container on my DS918+ Synology NAS running Python 3.9.7
Do someone have an idea ?
Sorry for the poor english i'm using cause I'm French =)
I have connected - all looks fine, but zones for L1000 are not visible.
Maybe the syntax was changed?
this is from DeskApp:
this from HA:
And - I did't found the time planer - where it is located?
This is also a new one (if I remember right) - here I can define two time windows for every day:
(again from DeskApp):
THANKS!
Hi .
How do I use the new features, which came in the landroid cloud custom component from mtrab?
https://github.com/MTrab/landroid_cloud/releases
it should be possible to do as mentioned here
First of all, thank you for the work done on the update.
how can i get the mower error sensor back, i used it as a trigger with the house alarm.
a thousand thanks
halandroid depends on the work of @MTrab and https://github.com/MTrab/landroid_cloud
according to the change logs an upgrade to landroid_cloud >v2.* breakes the halandroid-plugin:
https://github.com/MTrab/landroid_cloud/releases
this matchees with my expirience, since after the update the plugin no longer works.
Do I need to reinstall the haldriod? or are changes nessessary?
Can you please have a look into this issue?
Thanks!
After updating - nothing works :(
Logger: homeassistant.loader
Source: custom_components/landroid_cloud/init.py:10
Integration: Landroid Cloud (documentation, issues)
First occurred: 12:18:04 (1 occurrences)
Last logged: 12:18:04Unexpected exception importing component custom_components.landroid_cloud
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 599, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_components/landroid_cloud/init.py", line 10, in
from pyworxcloud import WorxCloud, exceptions
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/init.py", line 24, in
from .utils import (
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/init.py", line 7, in
from .location import Location
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/location.py", line 6, in
class Location(LDict):
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/location.py", line 9, in Location
def init(self, latitude: float | None = None, longitude: float | None = None):
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Logger: homeassistant.loader
Source: custom_components/landroid_cloud/init.py:10
Integration: Landroid Cloud (documentation, issues)
First occurred: 12:18:04 (1 occurrences)
Last logged: 12:18:04Unexpected exception importing component custom_components.landroid_cloud
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 599, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_components/landroid_cloud/init.py", line 10, in
from pyworxcloud import WorxCloud, exceptions
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/init.py", line 24, in
from .utils import (
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/init.py", line 7, in
from .location import Location
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/location.py", line 6, in
class Location(LDict):
File "/usr/local/lib/python3.9/site-packages/pyworxcloud/utils/location.py", line 9, in Location
def init(self, latitude: float | None = None, longitude: float | None = None):
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Can I ask, please, for solution of this error? I made every step of installation and after checking of configuration I got this error. "Error loading /config/configuration.yaml: mapping values are not allowed here in "/config/packages/landroid.yaml", line 25, column 67"
Thank you.
Hello Barma-lej
at first thanks for your great work!
Every think is working fine without setup from my multizone
If I select a zone number, then I get this script error: script/mower_setzone
can only concatenate str(not "int") to str...
Can you or any other person here help me?
I use Home Assistant 2022.4.0
Originally posted by @infohannes in #39 (comment)
I have the problem that after pasting the lovelace code into the manual card everything is shown (in the edit mode). After leaving the edit mode of the lovelace editor only the picture element is shown. The Part with configuration and multizone... disappears. I hope you can help me...
Hi,
I try to add Landroid Cloud integration
I have this error : "Can't load integration flow: undefined"
Log information is :
...
2022-10-21 18:14:16 INFO (SyncWorker_6) [homeassistant.util.package] Attempting install of pyworxcloud==2.1.23
2022-10-21 18:14:21 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyworxcloud==2.1.23: ERROR: Cannot install pyworxcloud because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
...
My system is:
Version | core-2022.5.5
Type d'installation | Unknown
Développement | false
Supervisor | false
Docker | false
Utilisateur | pi
Environnement virtuel | false
Version de Python | 3.9.2
Famille du système d'exploitation | Linux
Version du système d'exploitation | 5.15.32-v7l+
An idea ?
Thanks
Maybe it's just me but my sensors have disappeared since upgrading to Home Assistant 0.115 (and 0.115.1) Nothing coming up in the regular logs (haven't tried to debug it).
Anyone else having similar issue(s) since upgrading HA this week or maybe its an issue on my side? Thanks!
Hi
Thanks a lot for all your work. I followed your install instructions manualy and via HACS but get always the same errors. Since there are now errors up to the point form MTrab I post this here
Most errors say
int() argument must be a string, a bytes-like object or a number, not 'NoneType'
[548149954208] Error handling message: Unknown error
18:22:07 – (FEHLER) Home Assistant WebSocket API (benutzerdefinierte Integration)
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
18:22:07 – (FEHLER) Worx Landroid Cloud (benutzerdefinierte Integration)
Mower set rain delay and time extension: Error executing script. Unexpected error for call_service at pos 1: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
18:22:07 – (FEHLER) Skript (benutzerdefinierte Integration)
Can you give me a hint?
Really appreceated.
Thanks Chris
On Home Assistant 2022.4.4 (fresh install) - I was/am getting this error when trying to setup this integration for the first time:
File "/config/custom_components/landroid_cloud/__init__.py", line 216, in handle_start
ID = int(call.data["id"])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
All of the images/etc and statuses are correct otherwise.
I have a solution that got me past this error that I am not sure is correct - I will create a pull request shortly.
I wanted to know if it was possible to know in which area it is cutting, the status only tells me that it is in mowing, while in the app it tells me in which area it is cutting
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.