run prettier

This commit is contained in:
Robert Resch 2022-03-03 14:10:50 +01:00
parent 1e2d87efda
commit 2f7c7e1aa8
20 changed files with 227 additions and 218 deletions

View file

@ -1,10 +1,9 @@
--- ---
name: Bug report name: Bug report
about: Create a report to help us improve about: Create a report to help us improve
title: '' title: ""
labels: '' labels: ""
assignees: '' assignees: ""
--- ---
**Describe the bug** **Describe the bug**
@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce** **To Reproduce**
Steps to reproduce the behavior: Steps to reproduce the behavior:
1. Go to '...' 1. Go to '...'
2. Click on '....' 2. Click on '....'
3. Scroll down to '....' 3. Scroll down to '....'
@ -24,14 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):** **Desktop (please complete the following information):**
- OS: [e.g. Linux/Mac/Windows]
- OS: [e.g. Linux/Mac/Windows]
**Smartphone (please complete the following information):** **Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1] - Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
**Vacuum (please complete the following information):** **Vacuum (please complete the following information):**
- Model: [e.g. Deebot 901]
- Model: [e.g. Deebot 901]
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

View file

@ -1,10 +1,9 @@
--- ---
name: Feature request name: Feature request
about: Suggest an idea for this project about: Suggest an idea for this project
title: '' title: ""
labels: '' labels: ""
assignees: '' assignees: ""
--- ---
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**

View file

@ -33,7 +33,6 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Login to docker hub - name: Login to docker hub
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

View file

@ -86,4 +86,3 @@ repos:
types: [python] types: [python]
require_serial: true require_serial: true
<<: *python-files <<: *python-files

View file

@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment Examples of behavior that contributes to creating a positive environment
include: include:
* Using welcoming and inclusive language - Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences - Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism - Gracefully accepting constructive criticism
* Focusing on what is best for the community - Focusing on what is best for the community
* Showing empathy towards other community members - Showing empathy towards other community members
Examples of unacceptable behavior by participants include: Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or - The use of sexualized language or imagery and unwelcome sexual attention or
advances advances
* Trolling, insulting/derogatory comments, and personal or political attacks - Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment - Public or private harassment
* Publishing others' private information, such as a physical or electronic - Publishing others' private information, such as a physical or electronic
address, without explicit permission address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a - Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Our Responsibilities ## Our Responsibilities

View file

@ -11,22 +11,20 @@ Bumper is a standalone and self-hosted implementation of the central server used
## Build Status ## Build Status
| Master Branch | Status | | Master Branch | Status |
| ------------------- | ---------------------------------------------------------------------- | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| AppVeyor (Win32) | [![AppVeyor branch](https://img.shields.io/appveyor/ci/bmartin5692/bumper/master?logo=appveyor)](https://ci.appveyor.com/project/bmartin5692/bumper/branch/master) | | AppVeyor (Win32) | [![AppVeyor branch](https://img.shields.io/appveyor/ci/bmartin5692/bumper/master?logo=appveyor)](https://ci.appveyor.com/project/bmartin5692/bumper/branch/master) |
| TravisCI (Linux) | [![Travis (.org) branch](https://img.shields.io/travis/bmartin5692/bumper/master?logo=travis)](https://travis-ci.com/bmartin5692/bumper/branch/master) | | TravisCI (Linux) | [![Travis (.org) branch](https://img.shields.io/travis/bmartin5692/bumper/master?logo=travis)](https://travis-ci.com/bmartin5692/bumper/branch/master) |
| Docker Hub | [![Docker Build](https://img.shields.io/docker/cloud/build/bmartin5692/bumper?logo=docker)](https://hub.docker.com/r/bmartin5692/bumper/branch/master) | | Docker Hub | [![Docker Build](https://img.shields.io/docker/cloud/build/bmartin5692/bumper?logo=docker)](https://hub.docker.com/r/bmartin5692/bumper/branch/master) |
| CodeCov Coverage | [![Codecov branch](https://img.shields.io/codecov/c/github/bmartin5692/bumper/master?logo=codecov)](https://codecov.io/gh/bmartin5692/bumper/branch/master) | | CodeCov Coverage | [![Codecov branch](https://img.shields.io/codecov/c/github/bmartin5692/bumper/master?logo=codecov)](https://codecov.io/gh/bmartin5692/bumper/branch/master) |
**Community**: **Community**:
A Gitter community has been created for Bumper so users can chat and dig into issues outside of Github, join us here: A Gitter community has been created for Bumper so users can chat and dig into issues outside of Github, join us here:
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ecovacs-bumper/community) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ecovacs-bumper/community)
**_Testing needed_**
***Testing needed***
Bumper needs users to assist with testing in order to ensure compatibility as bumper moves forward! If you've tested Bumper with your bot, please open an issue with details on success or issues. Bumper needs users to assist with testing in order to ensure compatibility as bumper moves forward! If you've tested Bumper with your bot, please open an issue with details on success or issues.
***Please note**: this software is experimental and not ready for production use. Use at your own risk.* **\*Please note**: this software is experimental and not ready for production use. Use at your own risk.\*
## Why? ## Why?
@ -56,7 +54,9 @@ As work to reverse the protocols and provide a self-hosted central server is sti
See the documentation on [Read the Docs](https://bumper.readthedocs.io) See the documentation on [Read the Docs](https://bumper.readthedocs.io)
--- ---
### Thanks ### Thanks
A big thanks to the original project creator @torbjornaxelsson, without his work this project would have taken much longer to build. A big thanks to the original project creator @torbjornaxelsson, without his work this project would have taken much longer to build.
Bumper wouldn't exist without [Sucks](https://github.com/wpietri/sucks), an open source client for Ecovacs robots. Thanks to @wpietri and contributors! Bumper wouldn't exist without [Sucks](https://github.com/wpietri/sucks), an open source client for Ecovacs robots. Thanks to @wpietri and contributors!

View file

@ -2,7 +2,7 @@
Bumper has a number of available command-line arguments that can be viewed by adding the `-h` flag. Bumper has a number of available command-line arguments that can be viewed by adding the `-h` flag.
```` ```
usage: bumper [-h] [--listen LISTEN] [--announce ANNOUNCE] [--debug] usage: bumper [-h] [--listen LISTEN] [--announce ANNOUNCE] [--debug]
optional arguments: optional arguments:
@ -10,4 +10,4 @@ optional arguments:
--listen LISTEN start serving on address --listen LISTEN start serving on address
--announce ANNOUNCE announce address to bots on checkin --announce ANNOUNCE announce address to bots on checkin
--debug enable debug logs --debug enable debug logs
```` ```

View file

@ -7,14 +7,14 @@ Certificates should be placed in the `{bumper_home}/certs` directory. If certif
Users can generate certificates in the following ways: Users can generate certificates in the following ways:
| Method | Description | | Method | Description |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | ---------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [OpenSSL](#manually-create-certs-with-openssl) | Users can manually create the same certificates as Create_Certs by utilizing OpenSSL. | | [OpenSSL](#manually-create-certs-with-openssl) | Users can manually create the same certificates as Create_Certs by utilizing OpenSSL. |
| [Custom CA/Self](#using-a-custom-caself) | If a user has their own CA the certificates can be generated there and used within Bumper. | | [Custom CA/Self](#using-a-custom-caself) | If a user has their own CA the certificates can be generated there and used within Bumper. |
**Certificate Requirements:** **Certificate Requirements:**
* A CA Cert must be provided that can be imported into devices (phones, browsers, etc). - A CA Cert must be provided that can be imported into devices (phones, browsers, etc).
* Server certificate should include [SANs (Subject Alternate Names)](#subject-alternative-name) for all of the *.ecovacs, etc domains. - Server certificate should include [SANs (Subject Alternate Names)](#subject-alternative-name) for all of the \*.ecovacs, etc domains.
## Manually create certs with OpenSSL ## Manually create certs with OpenSSL
@ -24,8 +24,9 @@ The easiest way to create the required certs is at https://certificatetools.com/
1. Create csrconfig_ca.txt for use in later commands 1. Create csrconfig_ca.txt for use in later commands
***csrconfig_ca.txt*** **_csrconfig_ca.txt_**
````
```
[ req ] [ req ]
default_md = sha256 default_md = sha256
prompt = no prompt = no
@ -37,12 +38,13 @@ organizationName = Bumper
[ req_ext ] [ req_ext ]
keyUsage=critical,keyCertSign,cRLSign keyUsage=critical,keyCertSign,cRLSign
basicConstraints=critical,CA:true,pathlen:1 basicConstraints=critical,CA:true,pathlen:1
```` ```
1. Create certconfig_ca.txt for use in later commands 1. Create certconfig_ca.txt for use in later commands
***certconfig_ca.txt*** **_certconfig_ca.txt_**
````
```
[ req ] [ req ]
default_md = sha256 default_md = sha256
prompt = no prompt = no
@ -56,7 +58,7 @@ subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer authorityKeyIdentifier = keyid:always,issuer
keyUsage=critical,keyCertSign,cRLSign keyUsage=critical,keyCertSign,cRLSign
basicConstraints=critical,CA:true,pathlen:1 basicConstraints=critical,CA:true,pathlen:1
```` ```
1. Generate the RSA private key 1. Generate the RSA private key
@ -74,8 +76,9 @@ basicConstraints=critical,CA:true,pathlen:1
1. Create csrconfig_bumper.txt for use in later commands 1. Create csrconfig_bumper.txt for use in later commands
***csrconfig_bumper.txt*** **_csrconfig_bumper.txt_**
````
```
[ req ] [ req ]
default_md = sha256 default_md = sha256
prompt = no prompt = no
@ -100,12 +103,13 @@ DNS.6 = *.ww.ecouser.net
DNS.7 = *.dc-eu.ww.ecouser.net DNS.7 = *.dc-eu.ww.ecouser.net
DNS.8 = *.dc.ww.ecouser.net DNS.8 = *.dc.ww.ecouser.net
DNS.9 = *.area.ww.ecouser.net DNS.9 = *.area.ww.ecouser.net
```` ```
1. Create certconfig_bumper.txt for use in later commands 1. Create certconfig_bumper.txt for use in later commands
***certconfig_bumper.txt*** **_certconfig_bumper.txt_**
````
```
[ req ] [ req ]
default_md = sha256 default_md = sha256
prompt = no prompt = no
@ -132,7 +136,7 @@ DNS.6 = *.ww.ecouser.net
DNS.7 = *.dc-eu.ww.ecouser.net DNS.7 = *.dc-eu.ww.ecouser.net
DNS.8 = *.dc.ww.ecouser.net DNS.8 = *.dc.ww.ecouser.net
DNS.9 = *.area.ww.ecouser.net DNS.9 = *.area.ww.ecouser.net
```` ```
1. Generate the RSA private key 1. Generate the RSA private key

View file

@ -1,23 +1,27 @@
# DNS # DNS
You need to configure your router to point DNS locally to where Bumper is running. You need to configure your router to point DNS locally to where Bumper is running.
The easiest way is overriding the main domains used by EcoVacs using DNSMasq/PiHole, by adding address entries in a custom config. The easiest way is overriding the main domains used by EcoVacs using DNSMasq/PiHole, by adding address entries in a custom config.
## Custom DNSMasq Config ## Custom DNSMasq Config
Typically written at /etc/dnsmasq.d/{##}-{name}.conf Typically written at /etc/dnsmasq.d/{##}-{name}.conf
- Ex: `/etc/dnsmasq.d/02-custom.conf`
- Ex: `/etc/dnsmasq.d/02-custom.conf`
**File Contents:** **File Contents:**
````
```
address=/ecouser.net/{bumper server ip} address=/ecouser.net/{bumper server ip}
address=/ecovacs.com/{bumper server ip} address=/ecovacs.com/{bumper server ip}
address=/ecovacs.net/{bumper server ip} address=/ecovacs.net/{bumper server ip}
```` ```
**Note:** *Replace `{bumper server ip}` with your server's IP*
**Note:** _Replace `{bumper server ip}` with your server's IP_
If using PiHole, reload FTL to apply changes: If using PiHole, reload FTL to apply changes:
`sudo service pihole-FTL reload` `sudo service pihole-FTL reload`
## Manual Override ## Manual Override
@ -30,16 +34,15 @@ Not all domains have been documented at this point, and this list will be update
Replacement Examples: Replacement Examples:
- {countrycode} - {countrycode}
- If you see `eco-{countrycode}-api.ecovacs.com` and you live in the US/North America you would use: `eco-us-api.ecovacs.com` - If you see `eco-{countrycode}-api.ecovacs.com` and you live in the US/North America you would use: `eco-us-api.ecovacs.com`
- **Note**: {countrycode} may also be generalized regions such as "EU". - **Note**: {countrycode} may also be generalized regions such as "EU".
- {region} - {region}
- If you see `portal-{region}.ecouser.net` and you live in the US/North America you would use: `portal-na.ecouser.net` - If you see `portal-{region}.ecouser.net` and you live in the US/North America you would use: `portal-na.ecouser.net`
- **Note**: {region} may also be generalized regions such as "EU". - **Note**: {region} may also be generalized regions such as "EU".
| Address | Description | | Address | Description |
| --------------------------------------- | ---------------------------------------------- | | ---------------------------------------- | ---------------------------------------------- |
| `lb-{countrycode}.ecovacs.net` | Load-balancer that is checked by the app/robot | | `lb-{countrycode}.ecovacs.net` | Load-balancer that is checked by the app/robot |
| `lb-{countrycode}.ecouser.net` | Load-balancer that is checked by the app/robot | | `lb-{countrycode}.ecouser.net` | Load-balancer that is checked by the app/robot |
| `lbus.ecouser.net` | Load-balancer that is checked by the app/robot | | `lbus.ecouser.net` | Load-balancer that is checked by the app/robot |
@ -68,4 +71,4 @@ Replacement Examples:
| `users-base.dc-{region}.ww.ecouser.net` | Accounts for App (v2+) | | `users-base.dc-{region}.ww.ecouser.net` | Accounts for App (v2+) |
| `jmq-ngiot-{region}.dc.ww.ecouser.net` | MQTT for App (v2+) | | `jmq-ngiot-{region}.dc.ww.ecouser.net` | MQTT for App (v2+) |
| `api-rop.dc-{region}.ww.ecouser.net` | App (v2+) | | `api-rop.dc-{region}.ww.ecouser.net` | App (v2+) |
| `jmq-ngiot-{region}.area.ww.ecouser.net`| App (v2+) | | `jmq-ngiot-{region}.area.ww.ecouser.net` | App (v2+) |

View file

@ -1,4 +1,5 @@
# Developing # Developing
To start developing and contributing, install in dev mode. To start developing and contributing, install in dev mode.
`pipenv install --dev` `pipenv install --dev`
@ -8,16 +9,17 @@ Review the [How It Works](How_It_Works.md) doc to understand the basics and then
As features and functions are added, be sure to add tests to keep the test coverage high. As features and functions are added, be sure to add tests to keep the test coverage high.
# Testing # Testing
Bumper uses pytest for the majority of test cases, review current tests in the /tests directory. Bumper uses pytest for the majority of test cases, review current tests in the /tests directory.
### Running tests ### Running tests
Enter pipenv shell `pipenv shell` Enter pipenv shell `pipenv shell`
**Run tests** **Run tests**
- `python -m pytest tests` - `python -m pytest tests`
**Run tests with coverage** **Run tests with coverage**
- `python -m pytest --cov=./ tests` - `python -m pytest --cov=./ tests`

View file

@ -28,7 +28,7 @@ To run the image in docker some environment settings and port mappings are requi
`BUMPER_ANNOUNCE_IP` should be used so the actual host IP is reported to bots that checkin. `BUMPER_ANNOUNCE_IP` should be used so the actual host IP is reported to bots that checkin.
- BUMPER_ANNOUNCE_IP - `-e "BUMPER_ANNOUNCE_IP=X.X.X.X"` - BUMPER_ANNOUNCE_IP - `-e "BUMPER_ANNOUNCE_IP=X.X.X.X"`
**Volume Settings: (-v)** **Volume Settings: (-v)**
@ -39,15 +39,16 @@ Optionally you can map existing directories for logs, data, and certs.
**Full Example:** **Full Example:**
```` ```
docker run -it -e "BUMPER_ANNOUNCE_IP=X.X.X.X" -p 443:443 -p 8007:8007 -p 8883:8883 -p 5223:5223 -v /home/user/bumper/data:/bumper/data --name bumper bmartin5692/bumper docker run -it -e "BUMPER_ANNOUNCE_IP=X.X.X.X" -p 443:443 -p 8007:8007 -p 8883:8883 -p 5223:5223 -v /home/user/bumper/data:/bumper/data --name bumper bmartin5692/bumper
```` ```
# Docker-compose # Docker-compose
A docker-compose example can be found in the ["example" folder](https://github.com/bmartin5692/bumper/tree/master/example/docker-compose). A docker-compose example can be found in the ["example" folder](https://github.com/bmartin5692/bumper/tree/master/example/docker-compose).
The docker-compose starts two services: The docker-compose starts two services:
- bumper itself - bumper itself
- nginx proxy, which redirects MQTT traffic on port `443` to port `8883` - nginx proxy, which redirects MQTT traffic on port `443` to port `8883`

View file

@ -3,7 +3,7 @@
Bumper has a number of environment variables to help with custom deployments and configuration. These should be set prior to executing Bumper. Bumper has a number of environment variables to help with custom deployments and configuration. These should be set prior to executing Bumper.
| Setting | Value | Description | | Setting | Value | Description |
| ------------------ | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | ------------------ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| BUMPER_LISTEN | {ipv4 address} | IP address to start server listeners on | | BUMPER_LISTEN | {ipv4 address} | IP address to start server listeners on |
| BUMPER_ANNOUNCE_IP | {ipv4 address} | IP address to tell bots when they request the server location. May need to be set in cases such as when LISTEN is 0.0.0.0. | | BUMPER_ANNOUNCE_IP | {ipv4 address} | IP address to tell bots when they request the server location. May need to be set in cases such as when LISTEN is 0.0.0.0. |
| BUMPER_CA | {full path to ca.crt location} | The public CA certificate (ca.crt) to be loaded | | BUMPER_CA | {full path to ca.crt location} | The public CA certificate (ca.crt) to be loaded |

View file

@ -14,17 +14,17 @@ Bumper runs multiple services to re-create what the central EcoVacs servers prov
**App/Authentication** **App/Authentication**
EcoVacs servers provide authentication of accounts and match those up to registered robots. Once authenticated, users can control the robots via the app. ***Bumper*** provides an implementation of the central servers providing authentication and matching. EcoVacs servers provide authentication of accounts and match those up to registered robots. Once authenticated, users can control the robots via the app. **_Bumper_** provides an implementation of the central servers providing authentication and matching.
**Robots** **Robots**
So far two protocols have been identified that various models of EcoVacs robots use: **XMPP** and **MQTT**. These appear to be mutually exclusive and your robot model will use one of these two protocols for communication. ***Bumper*** provides an implementation of both protocols handling communication between the app and robots. So far two protocols have been identified that various models of EcoVacs robots use: **XMPP** and **MQTT**. These appear to be mutually exclusive and your robot model will use one of these two protocols for communication. **_Bumper_** provides an implementation of both protocols handling communication between the app and robots.
---- ---
### Login/Authentication/RestAPI ### Login/Authentication/RestAPI
***Bumper*** provides a fully simulated central server that handles login/authentication for the app/clients. **_Bumper_** provides a fully simulated central server that handles login/authentication for the app/clients.
The EcoVacs app encrypts the username/password with the public key of EcoVacs when authenticating. Since we don't have the private key to decrypt, there is no way to provide true security and authentication. The EcoVacs app encrypts the username/password with the public key of EcoVacs when authenticating. Since we don't have the private key to decrypt, there is no way to provide true security and authentication.
@ -32,25 +32,25 @@ Future versions may add additional options here for security.
Bots have no authentication and once a robot has been configured to access your WiFi it never needs to communicate with EcoVac's servers again. Bots have no authentication and once a robot has been configured to access your WiFi it never needs to communicate with EcoVac's servers again.
---- ---
### XMPP ### XMPP
*Example Model:* Ozmo 601/930 _Example Model:_ Ozmo 601/930
The robot utilizes XMPP for control. When the robot boots up it sends a HTTP request to `lbo.ecovacs.net:8007` asking for the IP address and port of the XMPP server. Because of our DNS override, this request will be received by Bumper. We tell the robot to connect over XMPP to our local machine. The robot utilizes XMPP for control. When the robot boots up it sends a HTTP request to `lbo.ecovacs.net:8007` asking for the IP address and port of the XMPP server. Because of our DNS override, this request will be received by Bumper. We tell the robot to connect over XMPP to our local machine.
Both the app and robot connect to the central XMPP server, which relays messages between the app and robot. The messages contain commands for the robot to execute or responses and statuses of the robot. Both the app and robot connect to the central XMPP server, which relays messages between the app and robot. The messages contain commands for the robot to execute or responses and statuses of the robot.
***Bumper*** exposes a simulated XMPP server that implements the necessary functions for relaying messages between a robot and a client, acting as the central server. **_Bumper_** exposes a simulated XMPP server that implements the necessary functions for relaying messages between a robot and a client, acting as the central server.
**Note:** It's been observed that the apps will attempt to utilize XMPP regardless of robot model. For models that utilize MQTT, no activity is performed over XMPP just pings. **Note:** It's been observed that the apps will attempt to utilize XMPP regardless of robot model. For models that utilize MQTT, no activity is performed over XMPP just pings.
---- ---
### MQTT ### MQTT
*Example Model:* Deebot 600/900/901 _Example Model:_ Deebot 600/900/901
The robot utilizes MQTT for control. On startup it connects to an MQTT broker (`mq-{countrycode}.ecovacs.com`) and subscribes to a `p2p` topic where commands are issued. The robot utilizes MQTT for control. On startup it connects to an MQTT broker (`mq-{countrycode}.ecovacs.com`) and subscribes to a `p2p` topic where commands are issued.
The app also connects to the MQTT broker and subscribes to a `attr` topic where the robot will periodically post status and location updates. The app also connects to the MQTT broker and subscribes to a `attr` topic where the robot will periodically post status and location updates.
@ -61,4 +61,4 @@ However, commands issued via the app/client are not published directly to the `p
The Rest API provided by `portal-{countrycode}.ecouser.net` receives the command and passes it to a "helper" bot that has permission to publish to the `p2p` topic the robot is subscribed to. The "helper" bot waits for a response to be published by the robot and then passes that response back to the server for the Rest API to send back as a response. The Rest API provided by `portal-{countrycode}.ecouser.net` receives the command and passes it to a "helper" bot that has permission to publish to the `p2p` topic the robot is subscribed to. The "helper" bot waits for a response to be published by the robot and then passes that response back to the server for the Rest API to send back as a response.
***Bumper*** provides a simulated RestAPI and "helper" bot, performing the same function as the central server above. **_Bumper_** provides a simulated RestAPI and "helper" bot, performing the same function as the central server above.

View file

@ -80,13 +80,11 @@ Run Start_Sniff.sh to begin. Ensure the bot and apps connect via the Wifi networ
- For XMPP/MQTT you will need to use WireShark. - For XMPP/MQTT you will need to use WireShark.
- Ensure you point WireShark at the sslmitmkeylog file in order to decrypt any encrypted communications. - Ensure you point WireShark at the sslmitmkeylog file in order to decrypt any encrypted communications.
This documentation won't go into the details of reviewing the logs/traffic. The reader will need to identify how to use WireShark etc for this. This documentation won't go into the details of reviewing the logs/traffic. The reader will need to identify how to use WireShark etc for this.
## XMPPPeek - MITM XMPP traffic between the Android or iOS App and the Ecovacs server ## XMPPPeek - MITM XMPP traffic between the Android or iOS App and the Ecovacs server
###### *Stolen from the [Sucks Documentation](https://github.com/wpietri/sucks/blob/master/developing.md#mitm-xmpp-traffic-between-the-android-or-ios-app-and-the-ecovacs-server)* ###### _Stolen from the [Sucks Documentation](https://github.com/wpietri/sucks/blob/master/developing.md#mitm-xmpp-traffic-between-the-android-or-ios-app-and-the-ecovacs-server)_
XMPPPeek can also be used to man in the middle the traffic between the Android/iOS App and the Ecovacs server. XMPPPeek can also be used to man in the middle the traffic between the Android/iOS App and the Ecovacs server.
@ -100,10 +98,9 @@ XMPPPeek can also be used to man in the middle the traffic between the Android/i
1. Look at the [DNS docs](DNS_Setup.md) for information on which Ecovacs XMPP server is the right one for your Country. For example, a US user will be using `msg-na.ecouser.net`. Find and note the IP address for the server. 1. Look at the [DNS docs](DNS_Setup.md) for information on which Ecovacs XMPP server is the right one for your Country. For example, a US user will be using `msg-na.ecouser.net`. Find and note the IP address for the server.
1. Make sure the mobile App talks to your machine instead of the server. This can be 1. Make sure the mobile App talks to your machine instead of the server. This can be
accomplished modifying your router's DNS configuration to have the Ecovacs domain accomplished modifying your router's DNS configuration to have the Ecovacs domain
name point to your IP. name point to your IP.
1. Run xmppeek as follows. 1. Run xmppeek as follows.
`python ./xmpppeek.py <ECOVACS XMPP SERVER IP> cert.pem key.pem` `python ./xmpppeek.py <ECOVACS XMPP SERVER IP> cert.pem key.pem`

View file

@ -1,6 +1,6 @@
# Using Bumper with the official Android/iOS App # Using Bumper with the official Android/iOS App
Bumper *can* be used with the official "Ecovacs" or "Ecovacs Home" app, but with limitations. Your phone needs to use your DNS server with custom settings, and you ***must*** import Bumper's CA cert and trust it before the app will work. Bumper _can_ be used with the official "Ecovacs" or "Ecovacs Home" app, but with limitations. Your phone needs to use your DNS server with custom settings, and you **_must_** import Bumper's CA cert and trust it before the app will work.
**Steps** **Steps**
@ -20,30 +20,30 @@ Bumper *can* be used with the official "Ecovacs" or "Ecovacs Home" app, but with
- Instructions for [iOS](#importing-the-ca-cert-on-ios) - Instructions for [iOS](#importing-the-ca-cert-on-ios)
- Instruction for [Android](#importing-the-ca-cert-on-android) - Instruction for [Android](#importing-the-ca-cert-on-android)
---- ---
### Importing the CA Cert on iOS ### Importing the CA Cert on iOS
1. Open the e-mail on your iOS device, and click the attached cert 1. Open the e-mail on your iOS device, and click the attached cert
![Example of email on iOS device](images/ios_email_cert.png) ![Example of email on iOS device](images/ios_email_cert.png)
1. Install the profile by clicking "Install", and entering your pass code if prompted 1. Install the profile by clicking "Install", and entering your pass code if prompted
![Example of install profile on iOS device](images/ios_install_profile.png) ![Example of install profile on iOS device](images/ios_install_profile.png)
1. Accept the certificate warning by clicking "Install" again 1. Accept the certificate warning by clicking "Install" again
![Example of cert warning on iOS device](images/ios_cert_warning_install.png) ![Example of cert warning on iOS device](images/ios_cert_warning_install.png)
1. Click "Done" to exit the profile installation 1. Click "Done" to exit the profile installation
1. Go to Settings > General > About 1. Go to Settings > General > About
1. Scroll to the bottom and click "Certificate Trust Settings" 1. Scroll to the bottom and click "Certificate Trust Settings"
1. Enable Full Trust for the Bumper CA Cert, by moving the slider to the right 1. Enable Full Trust for the Bumper CA Cert, by moving the slider to the right
![Example of enable trust cert on iOS device](images/ios_cert_trust.png) ![Example of enable trust cert on iOS device](images/ios_cert_trust.png)
![Example of enable trust cert on iOS device 2](images/ios_cert_trust_continue.png) ![Example of enable trust cert on iOS device 2](images/ios_cert_trust_continue.png)
1. Click continue when prompted 1. Click continue when prompted
1. That's it, you can now [Use the app](#use-the-app) 1. That's it, you can now [Use the app](#use-the-app)
---- ---
### Importing the CA Cert on Android ### Importing the CA Cert on Android
@ -89,11 +89,11 @@ After reboot, verify that the certificate was added by checking `Settings > Secu
Now, start [using the app](#use-the-app). Now, start [using the app](#use-the-app).
---- ---
### Use the app ### Use the app
- Open the app - Open the app
- At this time there is no authentication layer, you can enter any e-mail address and password (as long as it is 6 characters) and you will be authenticated - At this time there is no authentication layer, you can enter any e-mail address and password (as long as it is 6 characters) and you will be authenticated
- If your robot has already checked into Bumper, then it will be available in the list of robots - If your robot has already checked into Bumper, then it will be available in the list of robots
- The app now does a ping to the robot to make sure it is online, and if it is you can now control the robot - The app now does a ping to the robot to make sure it is online, and if it is you can now control the robot

View file

@ -12,17 +12,18 @@
# Quick Start Usage # Quick Start Usage
- Configure your Ecovacs vacuum using the official mobile app (if you haven't done this already) - Configure your Ecovacs vacuum using the official mobile app (if you haven't done this already)
- Configure your DNS server as described in the [DNS Setup](DNS_Setup.md) doc. - Configure your DNS server as described in the [DNS Setup](DNS_Setup.md) doc.
## Choose Installation Type ## Choose Installation Type
- Docker - [See Docker Details](Docker.md) - Docker - [See Docker Details](Docker.md)
- Manual/Python - Manual/Python
- Download bumper then run `pipenv install` to install dependencies - Download bumper then run `pipenv install` to install dependencies
- Start bumper - see the [Starting Bumper](#starting-bumper) section. - Start bumper - see the [Starting Bumper](#starting-bumper) section.
- Control your robots like normal - Control your robots like normal
- [Using Bumper with the official Android/iOS App](Use_With_App.md) - [Using Bumper with the official Android/iOS App](Use_With_App.md)
- [Using Bumper with Sucks](Use_With_Sucks.md) - [Using Bumper with Sucks](Use_With_Sucks.md)
@ -33,6 +34,7 @@ Bumper requires certificates to function. If certificates aren't found it will
For more information on generating certificates manually, see the [Creating Certs](Create_Certs.md) doc For more information on generating certificates manually, see the [Creating Certs](Create_Certs.md) doc
- Start Bumper with `pipenv run python -m bumper` - Start Bumper with `pipenv run python -m bumper`
- If prompted to generate certificates choose yes or no - If prompted to generate certificates choose yes or no
- Reboot your robot - Reboot your robot

View file

@ -6,4 +6,4 @@ Since the original release of Bumper newer bots have been released that use diff
#### Archive #### Archive
The original bumper code base has been branched off as [v0.1.0](https://github.com/bmartin5692/bumper/tree/v0.1.0) and will remain in the original state. This branch *may* work for older models (M81 Pro, N79S, etc.), but the master branch should be tried first as it contains many changes and fixes over the original with active development moving forward. The original bumper code base has been branched off as [v0.1.0](https://github.com/bmartin5692/bumper/tree/v0.1.0) and will remain in the original state. This branch _may_ work for older models (M81 Pro, N79S, etc.), but the master branch should be tried first as it contains many changes and fixes over the original with active development moving forward.