mrbungle64 / ecovacs-deebot.js Goto Github PK
View Code? Open in Web Editor NEWA Node.js library for running Ecovacs Deebot and yeedi vacuum cleaner robots
License: GNU General Public License v3.0
A Node.js library for running Ecovacs Deebot and yeedi vacuum cleaner robots
License: GNU General Public License v3.0
See here
Leider bekomme ich es nicht hin, den Ozmo 950 mit dem SpotArea zu starten.
vacbot.run("SpotArea", "spot_area", "start", "3");
ist doch so Richtig geschrieben?
Kann mir bitte Jemand ein Beispiel Geben?
Danke :)
Hi,
Wie finde ich den genauen Standort für
Eine bereichs Reinigung
Also die 4 Variablen in dem. Bereich wo er reinigen soll.
Kann ich den deebot einfach in alle 4 Ecken stellen und die Koordinaten abrufen, wahrscheinlich denke ich da zu einfach
In der Datei library/ecovacsConstants.js
hatte ich begonnen die 'SupportedDevices' und 'KnownDevices' zu registrieren.
Kriterium für 'SupportedDevices' war für mich, dass Entwickler Zugriff auf diese Modelle haben und diese direkt supporten können (bis vor ein paar Tagen war ich das ja alleine mit meinen 2 Geräten).
Bei 'KnownDevices' hatte ich die Modelle aufgenommen, deren Eigenschaften ich kannte.
Der Aufbau ist aktuell ja folgender (trifft auf beides zu):
deviceClass: {
"name": string,
"main_brush": boolean,
"spot_area": boolean,
"custom_area": boolean,
"mopping_system": boolean,
"voice_report": boolean,
'single_room': boolean
}
Hintergrund war, dass ich die Objekte im ioBroker Adapter (falls sinnvoll) abhängig vom Modell erstellen möchte.
Fragen:
Software version (please complete the following information):
Deebot model (please complete the following information):
Describe the bug
A clear and concise description of what the bug is.
control problem with deebot 900
vor 3-6 wochen oder so ging alles über den adapter wunderbar mittlerweile oft probleme
Additional context
Add any other context about the problem here.
kann starten aber nicht stoppen, mehrfach den adapter neu gestartet, und auch neu angemeldet
Hi team,
is it possible to set the number of cleanings for a custom area to 2 instead of a single cleaning in the config?
so far I have:
"publishCustomAreaSwitches": [ "1600,6700,4500,10400" ]
Thx for this awesome plugin!!! @ #
Is there a way to change the Deebot's region conf?
I have a Chinese bot that I prefer to change to EU since moving. Thinking either need to flash with EU firmware or simply change a line from CN to EU on the bot.
GetCleanLogs gibt die letzten 20 Protokolle, so wie sie auch in der App zu finden sind.
GetLastCleanLog gibt (mittlerweile zumindest, das war vor eingier Zeit definitiv auch noch nicht so) die Infos, die in der Hauptansicht zu sehen sind.
Das Protokoll zeigt bei mir eine unvollständige Karte, die auch derzeit an den iobroker gesendet wird. GetLastCleanLog zeigt die vollständige Sicht, wird aber derzeit nicht an iobroker übertragen... Achja... die Funktion scheint denen echt große Probleme zu bereiten.
ToDo:
Quick note upfront
I just want to say that it is awesome work you are doing here for the community, thanks a lot and well done!
Describe the solution you'd like
I would like to be able to set advanced parameters like "auto empty" to "on/off". I want to do so that I can create HomeKit rules which turn "auto empty" off after 8pm and on again after 8am. It is very noisy but also sometimes in the evening I need the support of my Ozmo to help me clean the kitchen after cooking. Being able to set this function would allow me to both call for a cleanup and keep peace with they neighbours.
I sniffed the communication the of my Ozmo to learn all my map coordinates for my custom areas. At the same time I found how the advanced parameter are set and read. It looks quite straight forward to me, so my hope is that you may be able to add them to the library so I can lobby for a push towards HomeBridge. Alternatively, maybe there is a way for you to implement a general parameter function. Something where the user can input advanced parameters to be set so that you do not always need to update the library. Something like: set.custom_parameter("setAutoEmpty","enable",1)
As follows the capture I did:
{"toType":"fqxoiu","payloadType":"j","toRes":"1Ar1","payload":{"header":{"pri":1,"tzm":60,"ts":"1613246868815","ver":"0.0.50"},"body":{"data":{"enable":0}}},"td":"q","toId":"42______________","cmdName":"setAutoEmpty","auth":{"token":"3d8_______________5757","resource":"IOS842F8B0G9","userid":"_____________","with":"users","realm":"ecouser.net"}}
As I can see, once you toggle it obviously just flips the "enable" bit.
If you want I can do captures for all the advanced settings my Ozmo T8+ exposes.
I am also happy to help implementing them. I don't lack the programming skills but sadly mostly the time and focus needed. I am very happy to donate here for this library and support the work happening. It would be great if you could enable the sponsor/donate function for your project on GitHub. It would be a great way to give back for the work and effort you put in.
Deebot model (please complete the following information):
With many greetings from Berlin,
Robert
Ich vermutete mal stark, dass von den Infos aktuell beim Ozmo 950 nur 'batteryinfo' und 'cleanreport' funktionieren, weil das noch über die _body_data_to_command
Methode behandelt wird.
Eigentlich sollte die separate Behandlung für den 950 in der _dict_to_command
Methode überflüssig sein.
if (json.hasOwnProperty('body')) {
return this._body_data_to_command(json['body']['data']);
}
Mein Vorschlag wäre, dass wir das erst mal umkehren in der dict_to_command
Methode:
_dict_to_command(json) {
// Das hier sollte eigentlich inzwischen immer funktionieren
if (json['event']) {
return json['event'];
}
// Ggf. notwendig ein paar andere Modelle, die wir beide nicht besitzen
if (json.hasOwnProperty('ctl')) {
return json['ctl'];
}
// Fallback für den Ozmo 950. Sollte aber eigentlich nicht mehr notwendig sein
if (json.hasOwnProperty('body')) {
return this._body_data_to_command(json['body']['data']);
}
}
Falls das (besser) funktioniert können wir den Fallback und damit auch die _body_data_to_command
rauswerfen. Du hattest das ja auch schon mal kurz angemerkt meine ich mich zu erinnern ;)
Just wondering if anyone can outline how to impliment this after installing. Only used to npm and using the config ui.
Cheers
MQTT based models (non 950) throw failure code: 500
when press "pause" button using mobile app.
[EcovacsMQTT] call failed with {"ret":"fail","errno":500,"debug":"wait for response timed out"}
[EcovacsMQTT] failure code: 500
[EcovacsMQTT] error send_command: failure code: 500
Hi,
I got I think wrong feature report for OZMO slim 10 with latest beta
[2021-4-20 11:28:40] [DeebotEcovacs] INFO - Edge Cleaning for Alfred : false
[2021-4-20 11:28:40] [DeebotEcovacs] INFO - Spot Cleaning for Alfred : false
[2021-4-20 11:28:40] [DeebotEcovacs] INFO - SpotArea Cleaning for Alfred : true
[2021-4-20 11:28:40] [DeebotEcovacs] INFO - CustomArea Cleaning for Alfred : false
instead of
[4/20/2021, 10:14:46 AM] [homebridge-deebotecovacs] INFO - Edge Cleaning for Alfred : true
[4/20/2021, 10:14:46 AM] [homebridge-deebotecovacs] INFO - Spot Cleaning for Alfred : true
[4/20/2021, 10:14:46 AM] [homebridge-deebotecovacs] INFO - SpotArea Cleaning for Alfred : false
[4/20/2021, 10:14:46 AM] [homebridge-deebotecovacs] INFO - CustomArea Cleaning for Alfred : false
Some use cases don‘t use a visible map. For example Homebridge Integration or your example files.
I would suggest to remove canvas from the dependencies and change the code that the rendering is only done if canvas is installed manually.
Ich hab mal die Tabelle der Sounds im Wiki für den T8 mit den neuen Meldungen upgedated. Leider kann ich das Wiki nicht direkt bearbeiten.
Software version (please complete the following information):
Deebot model (please complete the following information):
Describe the bug
Pause command is not working (returning 500: timeout)
I have a solution that works specifically for slim 11 as described below but I don't know if it would break other non 950 models.
I also don't know if this is specific to slim 11 (not affecting slim 10), so it is good if any slim 10 owner can confirm.
Any reference I could found says that slim 11 is just white version of slim 10 so technically they are the same.
Additional context
It works if I make modification in vacBotCommand_non950type.js
from:
class Pause extends Clean {
constructor() {
super('pause', 'pause');
}
}
to:
class Pause extends Clean {
constructor() {
super('auto', 'pause');
}
}
Additional info
GetCleanLogs returns empty result. I am aware this is listed as known issues for T9 series but want to add that it is also true for slim 11 (and probably slim 10 as well).
All other functionalities that I tried works, including Resume that already uses super('auto', 'resume'). Great work!
I would like to make it working under home assistant for deebot 605.
'0': {"en": "Default (A, B, C...)", "de": "Standard (A, B, C...)"},
'1': {"en": "Living room", "de": "Wohnzimmer"},
'2': {"en": "Dining room", "de": "Esszimmer"},
'3': {"en": "Bedroom", "de": "Schlafzimmer"},
'4': {"en": "Study", "de": "Büro"},
'5': {"en": "Kitchen", "de": "Küche"},
'6': {"en": "Bathroom", "de": "Badezimmer"},
'7': {"en": "Laundry", "de": "Waschküche"},
'8': {"en": "Lounge", "de": "Lounge"},
'9': {"en": "Storeroom", "de": "Lagerraum"},
'10': {"en": "Kids room", "de": "Kinderzimmer"},
'11': {"en": "Sunroom", "de": "Wintergarten"},
'12': {"en": "Corridor", "de": "Flur"},
'13': {"en": "Balcony", "de": "Balkon"},
'14': {"en": "Gym", "de": "Fitnessstudio"}
Hi,
I tried the current version of app2.js today and got following error in console:
`[EcovacsMQTT_JSON] callEcovacsDeviceAPI failed for cmd getMapSubSet: Error: Cannot find module '../build/Release/canvas.node'
Require stack:
Not tested all features but so far I'm able to get status info and send some commands for Deebot 600.
I like the new "MoppingSystemInfo" and wanted to remove the event listeners for the node-red node for single events. Does the key "enabled" the value from "WaterBoxInfo" (Integer) as bool?
Software version
Deebot model
Describe the bug
When there is a server issue on Ecovac's side, JSON.parse()
will fail with a SyntaxError since the returned data is HTML.
That causes an unhandled exception, that can't easily be caught by the client.
I'd suggest adding a try-catch block around the parse and rejecting with a specific error.
Additional context
https://github.com/mrbungle64/ecovacs-deebot.js/blob/master/library/ecovacsMQTT.js#L103
Hi @mrbungle64,
the latest iteration of the lib has broken my code, since I was watching for MoppingSystemInfo to get the status, even when not mopping.
So, I'm proposing something similar to this to send a complete report of the most used variables related to status:
emitMoppingSystemReport() {
var r = {
'cleanStatus': this.bot.cleanReport,
'cleanInfo': {
'speed': (this.bot.cleanSpeed || 0)
}
};
if (this.bot.hasMoppingSystem())
r['waterInfo'] = {
'enabled': Boolean(Number(this.bot.waterboxInfo || 0)),
'level': this.bot.waterLevel || 0
}
this.emit("MoppingSystemInfo", r);
}
The idea behind it is to carry both water info (if present) and clean info (I'm calling it from cleanspeed as well and maybe the function name is not fitting anymore). What do you think?
GetSpotAreaInfo does not return german translated name. The country code is set to DE.
Describe the solution you'd like
It would be great, if the cleaning status of the OZMO Slim 10 would be parsed in the script.
Example log:
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0080' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0080" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='096'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="096"/></ctl>
[VacBot] *** batteryInfo = 96%
Battery level: 9600%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0090' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0090" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0100' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0100" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0110' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0110" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0120' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0120" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0130' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0130" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0140' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0140" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='095'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="095"/></ctl>
[VacBot] *** batteryInfo = 95%
Battery level: 9500%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0150' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0150" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0160' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0160" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0170' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0170" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0180' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0180" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0190' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0190" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0200' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0200" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0210' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0210" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0220' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0220" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0230' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0230" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0240' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0240" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0250' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0250" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0260' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0260" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='094'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="094"/></ctl>
[VacBot] *** batteryInfo = 94%
Battery level: 9400%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0270' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0270" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0280' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0280" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0290' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0290" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0300' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0300" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0310' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0310" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0320' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0320" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='093'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="093"/></ctl>
[VacBot] *** batteryInfo = 93%
Battery level: 9300%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0330' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0330" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0340' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0340" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0350' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0350" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0360' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0360" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0370' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0370" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0380' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0380" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='091'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="091"/></ctl>
[VacBot] *** batteryInfo = 91%
Battery level: 9100%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0390' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0390" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0400' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0400" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0410' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0410" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='ChargeState'><charge type='Going' h='0' r='a'/></ctl>
[EcovacsMQTT] xml received: <ctl td="ChargeState"><charge type="Going" h="0" r="a"/></ctl>
[VacBot] *** chargeStatus = returning
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0420' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0420" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0430' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0430" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0440' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0440" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='BatteryInfo'><battery power='090'/></ctl>
[EcovacsMQTT] xml received: <ctl td="BatteryInfo"><battery power="090"/></ctl>
[VacBot] *** batteryInfo = 90%
Battery level: 9000%
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0450' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0450" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0460' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0460" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0470' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0470" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='009' s='2' l='0480' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="009" s="2" l="0480" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='error' errs='100'/>
[EcovacsMQTT] xml received: <ctl td="error" errs="100"/>
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0000' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0000" t="a"/>
[tools] Unknown command name: cleanst str: CleanSt
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='GoChargeBgdata' ts='1616941160' Battery='090' GoChargeId='3771336001' CleanId='1013372899' PreWorkMode='stop' WorkMode='Going' CmdSrc='a' MapId='' OnCharger='0'/>
[EcovacsMQTT] xml received: <ctl td="GoChargeBgdata" ts="1616941160" Battery="090" GoChargeId="3771336001" CleanId="1013372899" PreWorkMode="stop" WorkMode="Going" CmdSrc="a" MapId="" OnCharger="0"/>
[tools] Unknown command name: gochargebgdata str: GoChargeBgdata
[EcovacsMQTT] Unknown command received: GoChargeBgdata
[EcovacsMQTT] message.toString(): <ctl td='ChargeState'><charge type='SlotCharging'/></ctl>
[EcovacsMQTT] xml received: <ctl td="ChargeState"><charge type="SlotCharging"/></ctl>
[VacBot] *** chargeStatus = charging
[EcovacsMQTT] message.toString(): <ctl td='CleanReport'><clean type='auto' speed='strong' st='h' rsn='a'/></ctl>
[EcovacsMQTT] xml received: <ctl td="CleanReport"><clean type="auto" speed="strong" st="h" rsn="a"/></ctl>
[VacBot] *** cleanStatus = stop
[EcovacsMQTT] message.toString(): <ctl td='evt' e='7'/>
[EcovacsMQTT] xml received: <ctl td="evt" e="7"/>
[tools] Unknown command name: evt str: evt
[EcovacsMQTT] Unknown command received: evt
[EcovacsMQTT] message.toString(): <ctl td='GoChargeBgdata' ts='1616941191' Battery='090' GoChargeId='1690986878' CleanId='1013372899' PreWorkMode='stop' WorkMode='Idle' CmdSrc='a' MapId='' OnCharger='1'/>
[EcovacsMQTT] xml received: <ctl td="GoChargeBgdata" ts="1616941191" Battery="090" GoChargeId="1690986878" CleanId="1013372899" PreWorkMode="stop" WorkMode="Idle" CmdSrc="a" MapId="" OnCharger="1"/>
[tools] Unknown command name: gochargebgdata str: GoChargeBgdata
[EcovacsMQTT] Unknown command received: GoChargeBgdata
Deebot model (please complete the following information):
Hi,
I am evelopping an homebridge plugin for deebots and there is an issue when you try to connect to the API twice from the same device, with consecutive attemps : I often get this error code on connection.
I have fixed this in the original sucks.js and did a pull request, but the maintainer is not there anymore and I would like to switch to your package but can't do any pull request on it since it is a fork also.
Here is the original pull request : jeremy-green/sucks.js#1
I use uniqid dependency, and changed the following line :
params['requestId'] = EcoVacsAPI.md5(Number.parseFloat(Date.now() / 1000).toFixed(0));
to
params['requestId'] = EcoVacsAPI.md5(uniqid());
And then everything is good.
Currently i have a issue in the pimatic-deebot plugin, using your libary.
do you have any idee if this is a bug or just not yet supported?
Hey everybody,
does someone know "how much" does a move left or right actually turn the device?
My Deebot Slim 2 turns like 400° when i trigger a onetime "moveleft".
I also tried to find out something through the code or documentation but it seems we only send a XML with the option "left" or "right" to move. Is that true? Wireshark doesnt work for me as the app sends all requests encrypted (or im doing something wrong....)
Is there any debug mode with which i can enable the envLog messages ?
Thanks!
PS: That's actually not an issue and might be wrong here, feel free to close it
Installing ecovacs-deebot.js package in npm I get following deprecation warnings:
npm WARN deprecated [email protected]: this package is deprecated please use https://www.npmjs.com/package/@xmpp/client
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this package is deprecated please use https://github.com/xmppjs/xmpp.js
npm WARN deprecated [email protected]: this package is deprecated please use https://github.com/xmppjs/xmpp.js
npm WARN deprecated [email protected]: this library is no longer supported
Just a question: why are you pushing so many different events, instead of just one with an object inside?
I'm working on a MQTT bridge, and I've successfully modified the ecovacsMQTT_json.js to handle one event, instead of multiple (ie, in case of a clean log):
var lastCleanLogs = {
timestamp: this.bot.cleanLog_lastTimestamp,
squareMeters: this.bot.cleanLog_lastSquareMeters,
lastTime: this.bot.cleanLog_lastTotalTimeString,
imageUrl: this.bot.cleanLog_lastImageUrl
// type
// stopReason
};
this.emit("LastCleanLogs", lastCleanLogs);
I've not extensively looked at the library and I don't know if this sounds too crazy to you, but I could contribute with a pull request if you want help.
PS: love your library, I was able to completely map every commands/event to my mqtt broker!
see here
I have strange behaviour with my 2 Deebot (905, 605), after these lines, it hangs.
$ node app.js Device ID: xxxxxx Account ID: xxxxxx Encrypted account ID: xxxxxx Password hash: xxxxx Encrypted password hash: xxxxxxx Country: IT Continent: EU Connected! Vacbot ready Clean status: undefined Clean status: auto Battery level: NaN% Charge status: idle Clean status: auto Charge status: returning Clean status: undefined Clean status: stop
Implemetation finished for non 950 type
SetLifeSpan(component,val)
SetLifeSpan('side_bush',100);
SetLifeSpan('main_brush',100);
SetLifeSpan('filter',100);
ResetLifeSpan(component)
ResetLifeSpan('side_bush');
ResetLifeSpan('main_brush');
ResetLifeSpan('filter');
When receiving those two events the return value contains a comma seperated triple - what are these values standing for? X, Y and Z? According to the MapData I receive the first two really seem to be X and Y but I do not understand the third value.
I get for example DeebotPosition (521,24,2) and ChargePosition (523,23,-177)
Hey @mrbungle64 I've added a new Deebot 920 to my collection and I was trying to adapt my library to multi-bots and finally released it.
I'm not sure if it's me, but I've found that the library is updating only device at a given time. So, if I'm running two devices at the same time, I'm only getting notifications for one (the first one is loading, to be precise). If I ask for updates, it's working.
I'm using the same client instance.
Before giving up and finding a new route, I'm just double check-in with you. Thanks!
Software version (please complete the following information):
Deebot model (please complete the following information):
Describe the bug
An error is thrown in the lib with xml parsing . Should be nice to handle them in order to prevent sigterm
[xmldom warning] attribute space is required"td"!!
@#[line:1,col:1]
[xmldom warning] attribute value must after "="
@#[line:1,col:1]
[xmldom error] element parse error: Error: attribute value no end ''' match
@#[line:1,col:1]
[1/28/2021, 11:48:04 AM] TypeError: Cannot read property 'attributes' of undefined
at EcovacsMQTT_XML._command_to_dict (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT_XML.js:184:28)
at EcovacsMQTT_XML._handle_message (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT_XML.js:168:27)
at MqttClient. (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT.js:42:18)
at MqttClient.emit (events.js:315:20)
at MqttClient._handlePublish (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:1277:12)
at MqttClient._handlePacket (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:410:12)
at work (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:321:12)
at Writable.writable._write (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:335:5)
at doWrite (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5)
[1/28/2021, 11:48:04 AM] Got SIGTERM, shutting down Homebridge...
Additional context
User in homebridge plugin
Since the commit 'added modelName and imageURL' on 6 may, devices not listed in ecovacsConstants.js cause an error. Until that update the r95mk2 worked with the lib.
Is it possible to add the DEEBOT R95MK2. The device info is:
class: 113
company: eco-legacy
I have one user in AU that have a problem (nicoduj/homebridge-deebotEcovacs#20) : I think there is no server for this continent (https://portal-oc.ecouser.net) . I am thinking about defaulting automatically in such case to ww server, but could be handled in my lib or in yours, what do you think ?
A simple way to do this woud be to put WW in country.js for such cases ...
I think we should stick to this :
CH: msg.ecouser.net
TW, MY, JP, SG, TH, HK, IN, KR: msg-as.ecouser.net
US: msg-na.ecouser.net
FR, ES, UK, NO, MX, DE, PT, CH, AU, IT, NL, SE, BE, DK: msg-eu.ecouser.net
Any other country: msg-ww.ecouser.net
Hey
erstmal vielen vielen Dank für eure Mühen. Beim herumprobieren ist mir folgendes augefallen.
warum erwartet der einen string und keine number? sind ja schließlich nur nummerische werte drin.
by the way, es wäre toll überall standardwerte drin zu haben damit man besser skripte schreiben kann zB error - ist leer wenn es keinen fehler gibt vl kann man einfach null oder so als standardwert nehmen.
danke
@boriswerner Issue aus ioBroker Adapter
In der ecovacsMQTT_JSON
wird der Eventname CleanState
ansatt CleanReport
verwendet:
case "cleaninfo":
this.bot._handle_clean_info(event);
this.emit("CleanState", this.bot.clean_status);
break;
Hi @mrbungle64
Ben here, the dev of homebridge-deebot.
Any way that I can get in contact with you?
My email is [email protected], or if you have discord my username is bwp91#2158
Thanks!
Describe the solution you want.
Hello,
thank you very much for the time and effort you put into this project!
Everything you can do in the official ecovacs application (and more) can be done with this project,
with the exception of enabling/disabling the "advanced mode". I disable this mode before moving the deebot by hand to clean
an area that is not accessible from the charging station so that the map is not reset.
Maybe this feature is already implemented, but I couldn't find it.
Deebot Model (please complete the following information):
With the hint given in bmartin5692/bumper#58
I was able to successfully retrieve the cleaning logs for the Ozmo 950:
Method: POST
Path: /api/lg/log.do?u=tmpuser&av=1.2.1&cv=1.94.28&td=GetCleanLogs&t=i
Body: {'did': 'test_did', 'country': 'US', 'td': 'GetCleanLogs', 'auth': {'token': 'test_token', 'resource': 'app_resource', 'userid': 'tmpuser', 'with': 'users', 'realm': 'ecouser.net'}, 'resource': 'bot_resource'}
This also includes the imageURL to the map in the clean log.
Other function is GetLastCleanLog which only delivers the last log entry.
GetOfflineMap command returns only {"ret":"ok"} for the 950
I will further analyse the topic and include it in the library for the Ozmo 950.
For other bots this comment might be helpful:
wpietri/sucks#78 (comment)
In a bumper issue (wpietri/sucks#78) there are details on the Map messages included:
Using the right base64 text, which in turn produces a well-formed lzma compressed stream, I understood that the map piece binary data is a list of pixels encoded as following:
0x00 is used for empty (undiscovered) pixels
0x01 is used for floor pixels
0x02 is used for wall pixels
Following the python script described there to decode that stream
# Decode Base64
data = base64.b64decode(b64)
# Get lzma output size (as done by the Android app)
len_array = data[5:5+4]
len_value = ((len_array[0] & 0xFF) | (len_array[1] << 8 & 0xFF00) | (len_array[2] << 16 & 0xFF0000) | (len_array[3] << 24 & 0xFF000000))
# Init the LZMA decompressor using the lzma header
dec = lzma.LZMADecompressor(lzma.FORMAT_RAW, None, [lzma._decode_filter_properties(lzma.FILTER_LZMA1, data[0:5])])
# Decompress the lzma stream to get raw data
return dec.decompress(data[9:], len_value)
During cleaning the Ozmo 950 sends continuosly infos about the maps that could be processed and drawn.
I will do some more analysis on the topic.
Maybe also parts of the project valetudo-mapper for Xiaomi/Roborock vacs (https://github.com/rand256/valetudo-mapper) can be reused/transferred
Created from Issue #69
[EcovacsMQTT] Unknown command received: CleanSt
[EcovacsMQTT] message.toString(): <ctl td='CleanSt' a='000' s='2' l='0080' t='a'/>
[EcovacsMQTT] xml received: <ctl td="CleanSt" a="000" s="2" l="0080" t="a"/>
However, it would be great if the MQTT messages would trigger events as well.
I am able to interpret the parameters at least partly:
l="0100" is the time since starting the cleaning job in seconds
a="000" is the cleaned space of the current job in square meters
mrbungle64/ioBroker.ecovacs-deebot#25 (comment)
für waterLevel diesen Wert numerisch ganzzahlig rundet und auf den gewünschten Wert "low(1")
für cleanSpeed den Wert nicht auf "silent(1) sondern auf "high(3)" setzt
Für die nicht-950 Geräte hatte ich Strings für die WaterLevel Werte verwendet:
exports.WATER_LEVEL_TO_ECOVACS = {
'low': '1',
'medium': '2',
'high': '3',
'max': '4'
};
exports.WATER_LEVEL_FROM_ECOVACS = {
'1': 'low',
'2': 'medium',
'3': 'high',
'4': 'max'
};
Beim 950 ist es gemischt:
exports.FAN_SPEED_TO_ECOVACS = {
1: 1000, //silent
2: 0, //normal
3: 1, //high
4: 2 //veryhigh
};
exports.FAN_SPEED_FROM_ECOVACS = {
1000: 1, //silent
0: 2, //normal
1: 3, //high
2: 4 //veryhigh
};
exports.WATER_LEVEL_TO_ECOVACS = {
'low': 1,
'medium': 2,
'high': 3,
'max': 4
};
exports.WATER_LEVEL_FROM_ECOVACS = {
'1': 'low',
'2': 'medium',
'3': 'high',
'4': 'max'
};
Das sollten wir einheitlich gestalten.
When running "GetSpotAreaInfo" agains T9+ I receive some cryptical string like XQAABADVAAAAAByMgwBkPYS7zQalrYrx1hSCG6giOMQsI8RjfOqNPi/yv49O7npECj9XhQHcda+Bs+xFFuP2O4kWhbncYiQYD5rxILTROXPRdDfURxZJVwG66EoA
for mapSpotAreaBoundaries
. Similar output in app2.js but followed by error callEcovacsDeviceAPI failed for cmd getMapSubSet: TypeError: Cannot read property 'find' of null
.
Expected value would be something similar to the value shown in Wiki page of "Map Data"
ErrorCode 3 - RequestOAuthError: Authentication error
is occuring sometimes during normal operation. It seems to be related to several instances of the library (e.g. different machines or same machine, different devices) running at the same time.
This issue is to track the occurences and describe them as detailed as possible
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.