Update to new Worx-API #88
Comments
|
Hi, |
|
The guy who wrote the initial adapter (NPM package Since I recently moved my Landroid-S from my shed to its base station I wanted to re-integrate it into my Home Assistant configuration. But I ran across several errors and now I'm in knee-deep. I hopefully can make it work again and will post my findings here, maybe even create a PR for it. |
|
But there seems to be a difference as this bridge from virtualzone is based on iobroker code, but different. this bridge is not iobroker and no iobroker is required while this bridge is between OpenHab and Landroid. Same issue was last year and a swift update solved the issue. looking forward that Heiner is still active. |
|
Yes, I have come to the same conclusion. While some portions of the code is similar, the new NPM package seems to have a much tighter integration with ioBroker. I think it would be a good start to write a generic package that can connect to the landroid worx cloud. However, my time for this is rather limited. I'm facing the same connection issues, though, so this ticket is still valid and any solution would be highly appreciated. |
|
here is my setup: # file: docker-compose.yml
version: '3'
services:
landroid:
image: virtualzone/landroid-bridge
container_name: landroid
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./config.json:/usr/src/app/config.jsonFile {
"http": {
"port": 3000
},
"landroid-s": {
"enable": true,
"email": "[REDACTED]",
"pwd": "[REDACTED]",
"dev_sel": 0
},
"mqtt": {
"enable": true,
"url": "mqtt://10.0.0.55",
"topic": "landroid"
},
"scheduler": {
"enable": false,
"cron": false,
"weather": {
"provider": "wunderground",
"apiKey": "YOUR_API_KEY",
"latitude": 50.00,
"longitude": 8.00
},
"db": "./scheduler.db",
"earliestStart": 10,
"latestStop": 15,
"startEarly": true,
"offDays": 2,
"squareMeters": 200,
"perHour": 50,
"mowTime": 60,
"chargeTime": 60,
"daysForTotalCut": 4,
"rainDelay": 90,
"threshold": 30
}
}These messages appear in the container log: I have found out that the |
Yes, also from my end It looks like only link to AWS has changed, but no idea how to change this in the distribution :-/ |
|
Do you know which link has changed? If so, a simple search and replace could make it work again. I have a little bit experience with programming in TypeScript and Docker. |
|
That's what I've got from the desktop App to manage Landroid I made a brief check to the files from this bridge and found ASW links pointing to east-x.amazonaws.com, so this might be the one. As I'm not experienced enough, I left it ;-) |
|
Sorry, but where did you find links to |
|
This is e.g. from aws4.js |
|
Did you grep your local files with Total Commander? If so, did you include your |
|
Hi guys, bridge is using "old" api or better: old iobroker.library for worx (https://github.com/MeisterTR/ioBroker.landroid-s) and tries to get some parameters which aren't there, so it's logging "board undefined selected": https://github.com/MeisterTR/ioBroker.landroid-s/blob/master/lib/mqttCloud.js https://github.com/iobroker-community-adapters/ioBroker.worx/blob/master/lib/api.js So this has to be taken and implemented in an own running bridge (which i prefer because it's open to all apps, like openhab, other mqtt handling app). Done for today. |
|
This is a good sum up of my own findings. Thank you for putting them into words, @KaaNee . I did a quick compare of the two files mentioned ( [EDIT] |
Hi, sorry was busy over past day(s) :-/ Here is result from my TotalCommander Regards |
|
should be fixed now |
|
So I've tried to use the docker image... Thanks in advance. |
|
i think you have to reinstall to get the changes |
Thanks for you effort and support on this. I just ask as I don't see any files updated when I'm on main page of this distr. Regards |
Hi, thanks @MeisterTR for applying these changes (nearly the same i did locally) :-) It should be compatible with 2.5.5 (i'm not sure how to flag this in npm), as the dependency in landroid-bridge is "^2.5.5" (^= compatible with ). Thanks in advance. If i can help or take some work, just let us know. Regards, |
|
Until these changes are published as an individual NPM package you can use the following FROM node:11-alpine AS prod
WORKDIR /usr/src/app
# Add package.json
COPY package*.json .
RUN apk add --no-cache git
# Restore node modules
RUN npm install --production
## BUILD STEP
FROM prod AS build
# Add everything else not excluded by .dockerignore
COPY . .
# Build it
RUN npm install && \
npm run build-prod
## FINAL STEP
FROM prod as final
RUN apk del git
COPY --from=build /usr/src/app/dist ./dist
EXPOSE 3000
CMD [ "node", "dist/server.js" ] |
|
I have created PR #89 that contains the multi-staged builds from the above Dockerfile. I will wait on @MeisterTR and see if he creates a new NPM package in the next few days. If not, above file will probably make it into another PR. 🙂 |
Hi Riker, but, it's still not working :-/ Probably I made something wrong? Happy for any advise/help Regards |
|
Yes i also can't get it to work. What i've done:
Looked at the docker logs... Maybe i'm doing something wrong? mfg |
|
Sorry, yeah. Actually I forgot to add my modified These are the steps required:
@@ -34,7 +34,7 @@
"cache": "^2.1.0",
"cron": "^1.7.1",
"express": "^4.17.0",
- "iobroker.landroid-s": "^2.5.5",
+ "iobroker.landroid-s": "github:MeisterTR/ioBroker.landroid-s#bc5bda3a495a87105bb4723b472c15846aec8e4e",
"log4js": "^4.3.0",
"moment": "^2.24.0",
"mqtt": "^2.18.8",
This is the reason why the Dockerfile above has |
|
So I have this too. npm ERR! A complete log of this run can be found in: |
|
And I've never used Docker before, was happy to have it installed with NPM :-/ |
|
Hi, Did someone successfully run it without docker or can me help with this error? regards Saboti |
|
We all have very different backgrounds and I tend to forget that. Sorry for that! 😅 So, bear with me, be patient, and I believe we can pull it off together. Regarding the question from @int5749 here's the command to build a Docker container: docker build --tag virtualzone/landroid-bridge:YOURTAG .This command must be issued inside the folder where the docker run \
-p 3000:3000 \
--name landroid_bridge \
--link mqtt:mqtt \
-v /tmp/config.json:/usr/src/app/config.json \
virtualzone/landroid-bridge:YOURTAGThis command is taken from the README.md of this repository. I have only added the |
|
@Saboti Yes, landroid-bridge is working for me. Are you running the code locally (with |
|
The Dockerfile was updated two hours ago. Maybe a wrong COPY. From my point of view it should be without *. But be carefull, the package.json includes a old ioBroker-Landroid-s package. Pull this docker kaareseras/landroid-bridge and everything works. |
|
Hi all, just bought a Landroid so am new to this thread! It looks like a lot of progress has been made but is this specifically Docker (manually HA installation) rather than Hassio at this stage? |
|
@simikuen Could you point me to the repo - I would like to try the new docker image, as I also encountered the reconnection issues with the current update (as mentioned by youreself). Thx |
|
For me it runs with this docker kaareseras/landroid-bridge. |
|
I have updated to the latest version of @stefanlaheij but unfortunately still no connection: [2020-04-09T15:13:19.508] [DEBUG] IoBrokerAdapter - Worxcloud MQTT offline |
|
@hirschy81 Same here. 👎 |
|
I reconfigured the WiFi from the mower. After that I got a connection. |
|
Mower is connected to the WiFi and is online. Means reachable via Worx app. |
|
Same for me - i noticed that after reconnecting the mower the App also asked for a new Login. After that i can confirm that now the Connection ist working |
|
One thing I mentioned: I now can connect and also read all values (coming in, are consumed and published via MQTT) - but I cannot write back (e.g. changes of schedules, starting the mower etc.) |
|
@hirschy81 Yeah, same here. I never got the bridge to the point where I could send commands to the mower and figured its not worth my investigation time since I'm quite happy with the schedule I've setup in the Landroid App on my Android. @freekeys This "thread" is a collection of my findings (and those of others) about how to make the [EDIT] |
|
It seems there is an problem with the worx cloud. It’s also not possible to control the mower via app. Just get status information. |
|
Should be fixed with the commit of @theWaldschrat |
|
Thanks for the PR @theWaldschrat this helps a lot of people. And maybe there was a fix in the repository by MeisterTR (see here) that re-enables sending commands to the mower. I will have to make some tests, but that will take a while due to the current worldwide pandemic situation. |
|
Yes, I can confirm commands work with the latest iobroker |
|
It might also be a good idea to remove all the old images from Docker Hub, because they won't help people in the slightest but might get them banned. |
|
This would have to be done by the owner of the Docker Hub account. My guess is @virtualzone ? |
|
Thanks to everyone who contributed above. Like many of you, this was working perfect last season. After much piecing of information together, I've managed to build my container through Portainer on a Synology (x64 hardware). Still running into an issue, hoping someone can point me in the right direction. Attached are my log files:
Any suggestions greatly appreciated :-) |
|
You can try to reconfigure the WiFi from the mower. |
|
Can you control (start, stop...) the mower from the official app? |
Thanks for the tips @theWaldschrat @simikuen . When using the app, I'm getting notifications and status but not able to start the mower from the app.... hmm... |
|
@rosscullen: same issue on me. The successful solution for me was to create a new account here https://account.worxlandroid.com/. Change the owner from your mower to the new account and use this new account in your app and Landroid bridge. In the old account is a function to change the owner to the new account. Very simple. |
|
Maybe it's possible to get banned for life, I don't know. For me it was enough to shut-down the bridge and wait 24 hours. After that time I was again able to control the mower via the app. After verifying that I started the bridge again and things are working fine since then. |
|
24 h didn't work for me at first and is the minimum. I had to wait 48h without opening the app or starting the bridge. |
|
I didn’t use the bridge for more then 48h. But not the app. From time to time I use the app for checking. Maybe the important thing is to don’t use BOTH for more the 24h. |
|
@rosscullen Edit: tested and now I can push via the Android app, thx a lot. |
|
@KoKia13 What did you do in the end? Make a new account? It's good to know that the ban can also be longer then 24 hours. But at least for me trying the app every couple of hours didn't make things worse and I was still unbanned after 24 hours. In the end it's the same as for all bans everywhere: They intentionally don't give you enough information to increase the fear-factor. You never know what might happen if you get to the wrong end of the stick. |
|
Yes banned since the change of the auth ~1 month. I've created a new worx account, and changed the mower to the new. And I was able to push planning, raidelay... from the Android app. I've completely disabled the bridge. |
Hello would this become updated for the new api from worx!?
I've had the docker running for a day and I have been banned for 24h.
Mfg
Chris
The text was updated successfully, but these errors were encountered: