Comments (15)
09.05.2020
11:30 Stopped instance on RPi
11:35:07 - 11:44:55 testing with VSCode and second iobroker installation (Windwos) , then stopped both
11:55:25 started instance on RPi
12:52:25 state change info.error => RequestOAuthError: Authentication error
Instance Reboot 13:04:09 --> ok
from ecovacs-deebot.js.
Deebot 901 / ioBroker Adapter:
2020-05-09 13:07:01.776 | Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason
2020-05-09 13:07:01.775 | terminating
2020-05-09 13:07:01.279 | Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason
2020-05-09 13:07:01.278 | terminating
2020-05-09 13:07:01.277 | cleaned everything up...
2020-05-09 13:07:01.276 | Got terminate signal TERMINATE_YOURSELF
2020-05-09 13:07:01.273 | Got terminate signal TERMINATE_YOURSELF
...
2020-05-09 12:53:03.340 | cleaned everything up...
from ecovacs-deebot.js.
This is hopefully fixed now.
Please use getDeviceId()
for getting a unique device id and a device number if running multiple devices.
const deviceNumber = 0;
const deviceId = EcoVacsAPI.getDeviceId(nodeMachineId.machineIdSync(), deviceNumber)
from ecovacs-deebot.js.
Starting with version 0.5.0 you can run multiple devices at once without having this issue.
You must use the getDeviceId()
method mentioned above and pass a unique device number (or name) in addition to the machineId.
cc: @boriswerner
from ecovacs-deebot.js.
Starting with version 0.5.0 you can run multiple devices at once without having this issue.
You must use thegetDeviceId()
method mentioned above and pass a unique device number (or name) in addition to the machineId.cc: @boriswerner
Unfortunately the Ecovacs API seems to require the deviceId
to login.
I tried to detach the device instance from the login, but so far I did not succeed.
If I get it right HomeBridge doesn't allow multiple instances for a plugin anymore so maybe this is not an instant solution for you...
You can nonetheless run multiple devices, but there will still be some issues.
from ecovacs-deebot.js.
Unfortunately the Ecovacs API seems to require the deviceId to login.
I tried to detach the device instance from the login, but so far I did not succeed.
Maybe I'm wrong, because I suspect now that they mean the deviceId
of the mobile device the app is running on.
this.meta = {
'country': country,
'lang': 'en',
'deviceId': device_id,
'appCode': 'i_eco_e',
'appVersion': '1.3.5',
'channel': 'c_googleplay',
'deviceType': '1'
};
I'm still not sure if it is possible to run multiple devices without having to log in for each deebot device individually, but I will try to find a solution.
from ecovacs-deebot.js.
Hi, might be the case for deviceId, maybe they use it for notifications . Let me know if I can help in any way, will integrate your changes afterwards
from ecovacs-deebot.js.
The problem is that this deviceId
is also used for authorization when sending a command like Clean
or GetWaterLevel
.
In this case it's used for the resource
, and this.resource
is equal to the deviceId
that is used during the login process.
const auth = {
'realm': constants.REALM,
'resource': this.resource,
'token': this.secret,
'userid': this.user,
'with': 'users',
}
My tests connecting/running 2 devices of different models simultaneously if using the same deviceId
:
Model | Slim 2 (XMPP) | Ozmo 930 (XMPP) | Deebot 901 (MQTT/XML) | Ozmo 920 (MQTT/JSON) |
---|---|---|---|---|
Slim 2 (XMPP) | / | works | works partially * | works partially * |
Ozmo 930 (XMPP) | works | / | works partially * | works partially * |
Deebot 901 (MQTT/XML) | works partially * | works partially * | / | doesn't work |
Ozmo 920 (MQTT/JSON) | works partially * | works partially * | doesn't work | / |
*) Works if the XMPP based device is already successfully connected
Btw.: the problem is not caused by using MQTT. It happens while sending POST requests for sending the commands.
from ecovacs-deebot.js.
Myabe we are talking about 2 differents things ? Resource -> deviceId -> the unique identifier of the device for post commands, , and deviceId in the login function that is the mobile phone ? Do you get any resource id on each vaccum after login ?
(did not look deeper into api, so maybe what I am saying is dumb, sorry if it is the case)
from ecovacs-deebot.js.
(did not look deeper into api, so maybe what I am saying is dumb, sorry if it is the case)
No, it's not "dumb" ... I think you are right when it comes to what we would expect, how it works :)
But the deviceId
that is used for login (mobile app and ecovacs-deebot library) is equal to the resource
that is used for sending post requests.
Do you get any resource id on each vaccum after login ?
Yes, but it seams that you cannot use it for authorization in the case of sending the post requests.
For each vacuum we get:
did
(which maybe means "device id")name
(which starts with "E0" and in the case of the XMPP devices it seams to be equal with thedid
)resource
(a string like 'atom' in the case of the XMPP or for example "36OA" in the case of Ozmo 920)
from ecovacs-deebot.js.
okay, so maybe they are expecting some kind of string concat there Did you run the app with some reverse proxy to see the post bidy from the app ? (like charles) ?
from ecovacs-deebot.js.
Did you run the app with some reverse proxy to see the post bidy from the app ? (like charles) ?
Not yet
from ecovacs-deebot.js.
The library actually performs proper authorization. However, to run multiple MQTT-based devices, you need a separate login procedure for each device, each with a unique device id.
With the mobile app you cannot control multiple devices at once. You have to choose one device first before you're able to send commands.
In the ioBroker adapter and the Node-Red node you have seperate instances for each device. So if you use a unique device id for each device it's working fine now.
It is a real pity that this is not possible in Homebridge.
from ecovacs-deebot.js.
Ok, seems indeed plausible . will think of it, but it seems that there would be not way to support this without 2 homebridge instances
from ecovacs-deebot.js.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from ecovacs-deebot.js.
Related Issues (20)
- Implementation of the ability to also use the yeedi API HOT 16
- Crash while trying to read undefined data HOT 9
- Are there anyway to connect to the Ecovacs Robot without login? HOT 1
- No "ready" event received HOT 2
- Waterbox info HOT 4
- CleanReport and CleanSum HOT 12
- Move Left Right MoveTurnAround ? HOT 18
- ioBroker Warn Message HOT 1
- GetCleanLog serving old logs HOT 10
- Custom logging function HOT 1
- vacbot.disconnect(); HOT 27
- AirFreshening / aromamode not working HOT 20
- Request failed with status code 502/504 HOT 3
- No error event fired for "Charging dock not found" HOT 7
- Shortcut Command to remove current Map or Restore Map Backup ??? HOT 1
- Map get lost working on backup image HOT 1
- GB/WW api endpoint not found HOT 1
- Retrieve values for air quality returns code 500 HOT 10
- Some feedback on testing with the X2 Omni. HOT 4
- is it support R96? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecovacs-deebot.js.