rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

Fork: Valetudo Cloud #101

Open Xento opened 4 years ago

Xento commented 4 years ago

Because of the random reset issue I wanted to try to get the map directly from the Xiaomi Cloud, so I could integrated it into openhabs HABPanel. I decompiled and reverse engineerd the procedur to login, get the connected robots and it's token and get the map data from the cloud.

It's not finished yet. Maybe it would be possible to merge the changes and integrate a detection if valetudo is running on the robot or for example an raspberry pi.

https://github.com/Xento/Valetudo

rand256 commented 4 years ago

All of this looks weird. What exactly are you trying to accomplish?

The main idea of valetudo is to stop using chinese cloud. Random reset issue is probably related to using node.js based software itself. So you want to get the map from the cloud and show it in node.js app? Which "detection" are you talking about? What do you propose to integrate?

Xento commented 4 years ago

Yeah I know its the idea to stop using the cloud. My approach is to use the webinterface from valetudo but with a cloud connected robot. I implemented the login to the cloud and getting the map data from the cloud and send it to the webinterface. Maybe some implementations can be done better as I'm not the JS pro ;-)

As the control of the robot works localy it would be possible to create a version that can run local on the robot and one that works with the cloud as the only difference is from where to get the map data.

pidator commented 4 years ago

Yeah I know its the idea to stop using the cloud. My approach is to use the webinterface from valetudo but with a cloud connected robot.

I don't get the idea, the two points are contradictory... The main advantage of dustcloud and valetudo is to stop the robot from sending data to the chinese cloud. With cloud connection, you can easily use the Mi home app. So all efforts have been made to prevent any connections to the cloud and just control the robot only local. Personally I don't want to have an valetudo version running that also sends any data to the cloud.

Because of the random reset issue I wanted to try to get the map directly from the Xiaomi Cloud

Furthermore I don't see the context of how the map from cloud should prevent the random resets?!

Xento commented 4 years ago

The main advantage of dustcloud and valetudo is to stop the robot from sending data to the chinese cloud. With cloud connection, you can easily use the Mi home app. I know. I want to integrate my robot into my smarthome system and webinterface (HabPanel). This was not possible when the robot isn't rooted. With my extension you can get the maps from the cloud and display them local in the valetudo webinterface.

Personally I don't want to have an valetudo version running that also sends any data to the cloud. Valetudo won't send any data to the cloud when it's run on the robot. It would only get the maps from the cloud when you run it on a raspberry for example.

Furthermore I don't see the context of how the map from cloud should prevent the random resets?! You are right, it has nothing to do with it but I can't use valetudo on my robot when it always resets. So I need an other way to get the map.

Both versions can do the same but Valetudo RE gets the map from the robot and my fork gets it from the cloud. The commands to control the robot and the other features like timers or telegram should work on both versions the same way. It's like an additional feature that you can run valetudo with an unrooted robo. It can be disabled when you run valetudo on the robo directly.

Krazy998 commented 4 years ago

I believe @Xento intent is to basically use valetudo front end but talking to xiaomi cloud instead of the bot.

Thats it really. I mean that wasnt ever the purpose of valetudo (as stated above) but I see what you are trying to do. Create a new client to connect to xiaomi cloud (by repurposing valetudo frontend)

Xento commented 4 years ago

Yes, this is exactly what I'm trying to do ;-)

radokristof commented 4 years ago

But why this is better? The map was not working for you in the current implementation? You also mention the random reset problem... But how does this prevents that? You still install a firmware which can break the robot (and I highly doubt that this has anything to do with the map...). So this is still weird for me. Yes you can control your robot from a browser (ie.: PC) and still control from the MiHome app, but why this is good?

Xento commented 4 years ago

My fork isn't installed on the robot. You can install it on a raspberry pi for example. The robot has his original firmware, so no reboot issue (I don't care about the cloud connection).

The advantage is that you can embed it in HabPanel for example and you can easily edit the zones via the webinterface.

HabPanel on Nexus 7

radokristof commented 4 years ago

Thanks! Now it makes sense!

almostserious commented 4 years ago

I love that idea. This is the same way as FloleVac is doing it i presume. I asked them once if they can share how to get the map from the cloud, but they did not want to do that. This would be ideal for adding to HomeAssistant or any other SmartHome Software without flashing a new Firmware on the Robot. Does this also work with the new "Rooms" Map Format?

Hypfer commented 4 years ago

Please change the name of your project to something else than valetudo.

I don't want anything cloud-related associated to the project.

Xento commented 4 years ago

I renamed it to ValeCLOUDo. I think this should be different enough.