m8schmit / ecovacs-stack

A complete stack including backend server and frontend interface, to manage a Deebot T9.
GNU General Public License v3.0
24 stars 6 forks source link

I've got an ecovacs debook 900, and some messages are XML! #5

Open Dracks opened 8 months ago

Dracks commented 8 months ago

Hey,

I just get my ecovacs connected and everything crashed, because the messsages are XML, in my case...

Since I don't know a lot of the source code, some questions, did you have times of what you are expecting? Since I don't have any other robot, I don't wish to brake your code, and is hard to know what was needed, at any moment.

Second, for the moment I added console logs, but your code was also super verbose with the logs, did you have a nice way to save this messages in raw, that way are easy to check and reverse-engineer?

For the moment, I was able to copy the followings from the console: <ctl td='MapP' i='1650241950' pid='29' p='XQAABAAQJwAAAADn/OAfO+lEkiRB6RjLelaXqNqvzCDRJ7SOSUo1Sg/kLiovPy6+KAU4JUiqdVas9YaIG3tnsb9XKSXkagL45wO9qNgINRGf5SNaWUQUaAlImWEDyGSIoEt3e1y5lgVjyaY6PSQA'/>

<ctl ts='1705245222806' td='BatteryInfo'><battery power='100'/></ctl>

I also saw the message with the boot coordinates, but I didn't copy it, and don't see it right now.

Thanks!

P.D.: yes currently my frontend only shows a point,

m8schmit commented 8 months ago

Hi, from what I know, prior to the T8 every ecovacs robot use the XMPP protocols to communicate with the server. Unfortunately, like I said in the description, I have a T9, which use MQTT protocols and send JSON.

I don't think I'll have the time to add an XMPP server and adapt the application to also communicate with XML. :-/

Dracks commented 8 months ago

yeah, I don't wish you added it, I only wished a little bit of support/help to handle it by myself.

m8schmit commented 8 months ago

Ok, if you want to try yourself, a good start is the project Ecovacs Deebot from @mrbungle64. Since it is compatible with a lot of robots and it connect to the real XMPP/MQTT server. You can catch some responses from the server and try to understand how it works.

There is also the repo Vacuum Clean from Michael Becker. There is a lot of readme in the repo, and even if it's Java, it will be useful since the calls where made with an XMPP server.

With all this first steps should be to:

mrbungle64 commented 8 months ago

@m8schmit @Dracks

The Deebot 900/901 uses a MQTT server, but XML for the data. You can also have a look at this documentation for the commands and messages, but it is far from complete.

Dracks commented 8 months ago

yeah, tecnically I get the messages crashing the backend because the bot was sending them to the mqtt, I needed to do some changes to get the server alive, and see the messages.

m8schmit commented 8 months ago

So xml on MQTT. I was sure than the j at the end of the topic was for json. But maybe not.

Dracks commented 8 months ago

I was looking the library client in node, and seems deboot they have 3 modes of work, one is the xmpp, then they switched to mqtt but with the same mesages (I think) or similars of xmpp, and then the json over the mqtt... It's a little bit crazy.

mrbungle64 commented 8 months ago

@Dracks

I was looking the library client in node, and seems deboot they have 3 modes of work, one is the xmpp, then they switched to mqtt but with the same mesages (I think) or similars of xmpp, and then the json over the mqtt... It's a little bit crazy.

Yes, that is basically correct

https://github.com/mrbungle64/ecovacs-deebot.js/wiki/Model-overview