-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new endpoints for app v2 #116
Conversation
- new attribute model
Good news I was able to connect successfully with the app v2 to bumper with mitmproxy in between. As the new version expects the MQTT server also on port 443, I have placed a nginx in the front.
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 |
*.ecovacs.net | ||
*.ww.ecouser.net | ||
*.dc-eu.ww.ecouser.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmartin5692 Can you please verify, which domains the app is using in the us? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If 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:
bigdata-international.ecovacs.com
recommender.ecovacs.com
gl-us-api.ecovacs.com
api-app.ecouser.net
mq-ww.ecouser.net
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@puddly your urls are already covered by the wildcards domain above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed 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.
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. 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 |
Is the 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 |
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 https://github.com/bmartin5692/bumper/blob/9b1ae262a807ad9fe09b33841ba7054b23c91453/hooks/build I 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: and the using 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
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. A GET request on https://api-app.dc-eu.ww.ecouser.net/api/rapp/sds/user/data/map/get?key=EcovacsHome&subKeys=name returns {"code": 0, "data": {"data": {"name": "My Home"}, "tag": null}, "message": "success"} 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:
|
After pulling the docker image like @Bustel suggested, and after fixing linuxserver/docker-papermerge#4 (comment), I finally got the docker containers running on my rpi using ports unreachableUnfortunately the services are not reachable on their ports (either not running, or not exposed, or otherwise "blocked"?). While
They won't appear in
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. iptablesSince docker seems to add a lot of Did anyone else face a similar issue? Or does anyone have an idea what might go wrong here? Any help is highly appreciated! |
@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 |
Thx @edenhaus |
@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. |
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,.... |
Adding the new endpoints for app version 2
Fixes #114
Fixes #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
example
The docker-compose example has an nginx proxy, which redirects mqtt traffic on port
443
to port8883
The redirection is required as the app v2+ and robots with a newer firmware are connecting to the mqtt server on port 433.