Worx Landroid package for Home Assistant based on Landroid Bridge by Heiner virtualzone
For the package to work, you need to install Landroid Bridge: https://github.com/virtualzone/landroid-bridge
I have a Raspberry Pi 3 Model B with Raspbain Stretch and Home Assistant in folder ~/pi/.homeassistant
cd ~
sudo apt update
sudo apt upgrade
sudo npm cache clean -f
sudo npm install -g n
sudo n stableThen i build Landroid Bridge
git clone https://github.com/virtualzone/landroid-bridge.git
cd landroid-bridge
npm installI got a sqlite3 error here :( and need to install it
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr
npm run gruntTo connect to an MQTT broker without any authentication, please modify your ~/landroid-bridge/config.json
My config.json file without personal info is here:
{
"http": {
"port": 3000
},
"landroid-s": {
"enable": true,
"email": "EMAIL_FOR_MYWORX",
"pwd": "PASSWORD_FOR_MYWORX",
"dev_sel": 0
},
"mqtt": {
"enable": true,
"url": "mqtt://MQTT_USER:MQTT_PASSWORD@localhost",
"topic": "landroid",
"//clientId": "optional",
"//caFile": "./optional_path_to_ca_file.crt",
"//keyFile": "./optional_path_to_key_file.key",
"//certFile": "./optional_path_to_cert_file.crt",
"//allowSelfSigned": true
},
"logLevel": "info",
"scheduler": {
"enable": true,
"cron": false,
"weather": {
"provider": "darksky",
"apiKey": "DARKSKY_API_KEY",
"latitude": 0.481478,
"longitude": 0.742742
},
"db": "./scheduler.db",
"earliestStart": 9,
"latestStop": 21,
"startEarly": false,
"offDays": 0,
"squareMeters": 200,
"perHour": 100,
"mowTime": 90,
"chargeTime": 75,
"daysForTotalCut": 0,
"rainDelay": 240,
"threshold": 30
}
}See here for details: https://github.com/virtualzone/landroid-bridge#setting-up-mqtt
Adjust the username and paths (path to current node too!!!) in the file ~/landroid-bridge/systemctl-script/landroid-bridge.service, and copy it to /lib/systemd/system/
[Unit]
Description=Landroid Bridge
Documentation=https://github.com/weweave/landroid-bridge
After=network.target
[Service]
ExecStart=/usr/local/bin/node /home/pi/landroid-bridge/dist/server.js
WorkingDirectory=/home/pi/landroid-bridge
Restart=on-failure
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=landroid-bridge
User=pi
Group=pi
Environment=NODE_ENV=production PORT=3000
[Install]
WantedBy=multi-user.target
sudo cp systemctl-script/landroid-bridge.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable landroid-bridge.service
sudo systemctl start landroid-bridge.service- Copy folders www and packages with all content in your homeassistant folder
- In configuration.yaml add string packages: !include_dir_named packages:
homeassistant:
packages: !include_dir_named packages- Add to your Lovelace config content from file add_to_lovelace.yaml (How? See here)
- If you need, translate strings in files worx_landroid.yaml section customize and add_to_lovelace.yaml from German and Russian
- If you use a Google Assistant, then use switch landroid_mowing:
switch.landroid_mowing:
name: Mähroboter
room: Garten
expose: true


