add new endpoints for app v2 #116
No reviewers
Labels
No labels
bug
dependencies
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting for fix validation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mia/bumper#116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ecovacs-home"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adding the new endpoints for app version 2
Fixes https://github.com/bmartin5692/bumper/issues/114
Fixes https://github.com/bmartin5692/bumper/issues/107
Feel free to test it :). For testing purpose I have also created a new docker image
edenhaus/bumper, which will be always up to date with this PR.Testing instructions
The easiest ways to test is using the docker-compose example below. Please adjust it for your needs
Note: You need to recreate the certs as some new sub domains have been added. I have only tested the manual ways (see updated docs)
Currently only domains/urls for europe are included. Please comment if your app uses different ones
A docker-compose example can be found in the folder
exampleThe docker-compose example has an nginx proxy, which redirects mqtt traffic on port
443to port8883The redirection is required as the app v2+ and robots with a newer firmware are connecting to the mqtt server on port 433.
Good news I was able to connect successfully with the app v2 to bumper with mitmproxy in between.
I was able to run some basic commands (auto clean, locate,...) but until bumper supports the whole app it will take some time.
Still some endpoints doesn't exist.
As the new version expects the MQTT server also on port 443, I have placed a nginx in the front.
See #103 and #102
Here the relevant part of the nginx config (Thanks @puddly):
I will create a complete docker-compose example in the next days.
Ecovacs uses now a lot of sub sub domains and for them the current certs are not valid. We need to find a way to generate them dynamically or find out all used subdomains
@ -7,0 +7,4 @@*.ww.ecouser.net*.dc-eu.ww.ecouser.net*.dc.ww.ecouser.net*.area.ww.ecouser.net@bmartin5692 Can you please verify, which domains the app is using in the us? :)
Unfortunately I didn't get this working after following your instructions. But I have to admit, I'm not into docker at all. Previously I did setup bumper manually.
Now I always get this error, as far as I can tell, it may be related to the architecture? Is it correct, that the image was not build for ARM? I'm trying to use it on a raspi. So maybe that's the problem?!
I also had to change the nginx path to get rid of the following error.
from
to
Don't quite understand this either, as I would have expect it to use exactly the same path for inside the container, no matter how my system is set up in the end... Isn't this the idea of docker?!
However, my "current issue" is the first error.
Please get familiar with docker and docker compose. You need to mount the folder containing the certs to the container. I also have provided only a image for x64, but you can create a image for the raspi yourself with the source code or run it manually without docker
When you certs are found, bumper will call a go program to generate it. As I‘m not familiar with go, I can‘t change the go code. Also a bug there exists #117. I only tested the manual way, which is described in the docs.
For your second issue I will update the docs above, but you should get familiar with docker first.
In the folder, where you have created the docker-compose.yaml, create a new folder named „nginx“ and within create a file nginx.conf and place there the whole Nginx configuration from above.
You don‘t docker to run bumper. You can still download the code of this pr and run it manually. Be aware that you need probably configure nginx manually as at least my deebot 950 is connecting on port 443 instead of 8883
@ -41,4 +41,14 @@ Optionally you can map existing directories for logs, data, and certs.If you add
resolver 127.0.0.11;line in each server block you can also use container names and don't need to fix the IP of the container (if you use docker-compose).Is the
edenhaus/bumperimage rpi compatible? The container instantly dies withstandard_init_linux.go:219: exec user process caused: exec format error.I guess the go code was not compiled for ARM.
I have tested it only on my linux x64 server.
I have no idea about the go program... But if you create the certs manually and map it as volume inside the container the go program will not be executed. I would recommend it to create it manually as a bug in the go program exists #117
@ -41,4 +41,14 @@ Optionally you can map existing directories for logs, data, and certs.Thanks :) is now updated
Does not seem to be an issue with the go code in bumper but rather docker itself. I tried to build the image on my rpi4 and the build failed with the same error:
I tried different FROM_ARCH values and --platform options but I cannot build the image. Ill try again tomorrow on my laptop.
Please give a look at
9b1ae262a8/hooks/buildI used the hook scripts to push the image for the same arch as the official one. So probably you should be able to use it on the rpi
Thank you for the hint! I managed to get it running for the rpi4 by running this on my laptop:
docker build --build-arg FROM_ARCH=arm32v7 . --tag bumper-arm32and the using
docker saveanddocker image loadto get the image onto the rpi.However, after recreating the bumper.crt the app now shows an empty screen.
Do I need to update the CA cert as well? I had already reduced the validity before.
I don't think so but I have recreate it also as I was not sure what the go program does.
Also I have tested only the iOS App version. Maybe the android one uses different endpoints. As I don't have a rooted phone I couldn't test it
I checked the logs via
adband the app throwsRobotUI Errors for the following endpoints:If I try them out manually they all return 404. Are those different in the iOS app?
The endpoints exists and return also some data when called correctly. Be aware that you need to call them correctly.
For example: https://api-app.dc-eu.ww.ecouser.net/api/pim/product/software/config/batch
must be called as post request with some
pidin the body.A GET request on https://api-app.dc-eu.ww.ecouser.net/api/rapp/sds/user/data/map/get?key=EcovacsHome&subKeys=name returns
Probably you don't have setup bumper correctly or you don't use the version with the code of this PR....
Just had the same realization and noticed that I build the main branch instead of the PR branch of your repo. Sorry for wasting your time on this 🙈
Also the manual build was not necessary. I just had to run docker pull with the correct platform on the rpi:
docker pull edenhaus/bumper --platform linux/arm/v7. I naively assumed that docker is able to figure out which platform it is running on...Now the Deebot is shown in the app but marked as offline. Bumper status shows that the client did not connect to MQTT, but I dont see any errorsAfter restarting the app a couple times I just had my first successful cleaning run 🎉After pulling the docker image like @Bustel suggested, and after fixing https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-735236388, I finally got the docker containers running on my rpi using
docker-compose up.ports unreachable
Unfortunately the services are not reachable on their ports (either not running, or not exposed, or otherwise "blocked"?).
While
docker-compose psshows the containers running and the ports:They won't appear in
netstat, e.g.:And of course everything else cannot reach them as well (e.g. curl):
The domain is resolved correctly by pi-hole:
Stopping docker and starting up the old "bumper.service" works just fine.
Note: I don't want to keep using the "old service" approach, as I would have to setup nginx etc. manually and actually therefore prefer the docker-way.
iptables
Since docker seems to add a lot of
iptablesrules to the system and therefore broke my piVCCU installation, I had to modify the rules like here: https://github.com/alexreinert/piVCCU/issues/264#issuecomment-753907782But I already reverted all those changes and still none of the ports is reachable for me :/
Did anyone else face a similar issue? Or does anyone have an idea what might go wrong here? Any help is highly appreciated!
Thx in advance.
@d4rkd3v1l I have updated the docker-compose example. The problem was that I only exposed the ports in my example as I use in my setup macvlan.
A working example can be found here
@ -7,0 +7,4 @@*.ww.ecouser.net*.dc-eu.ww.ecouser.net*.dc.ww.ecouser.net*.area.ww.ecouser.netIf it's of any help, here are all of the DNS queries and TLS server names for requests the app makes when communicating with my older Deebot 901:
@ -7,0 +7,4 @@*.ww.ecouser.net*.dc-eu.ww.ecouser.net*.dc.ww.ecouser.net*.area.ww.ecouser.net@puddly your urls are already covered by the wildcards domain above
@ -7,0 +7,4 @@*.ww.ecouser.net*.dc-eu.ww.ecouser.net*.dc.ww.ecouser.net*.area.ww.ecouser.netIndeed they are. I'm located in the USA and and your v2 changes work fine with the latest version of the app on Android (thank you!), so either the app "upgrades" to different domains when communicating with newer-generation bots, or these existing domains in your PR are enough.
Thx @edenhaus
I got it working now as well, after using
portsinstead ofexpose. Also be aware that the exampledocker-compose.yamluses the original docker image from bmartin5692, and not the one you provided on docker hub, so this must also be changed toedenhaus/bumperin order to make it work (for the moment, until everything got merged, I guess).@d4rkd3v1l I know that, put I don't want to change it as my images are only test images, which can be updated and also be broken anytime
@bmartin5692 Have you time for a review? I think some people are waiting for this PR
I'll try to get this tested and reviewed this weekend.
@edenhaus
system: rpi 4 @arm32 with deebot 901 and adguard for dns rewrites
I had to add 'privileged: true' to start bumper from composer.
The iobroker plugin worked and i see the login in the logs.
But the IOS app didnt not work, timeout -> no login attempt in the logs.
Do u have any suggestions?
I use the docker-compose setup described in https://github.com/bmartin5692/bumper/tree/master/example/docker-compose
I have no idea what is wrong with your setup, but it can be a lot.... Wrong certs, wrong dns config, endpoints not reachable,....
Also I don't have your model and as I can remember it correctly your robot uses the protocol
MQTT/xmland my 950 usesMQTT/json. So it can also be that there are missing endpoints...Also you need to trust the certificate on your apple device.
As you can see there can be a lot and sorry but I currently don't have time to give you support.