merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
388 stars 61 forks source link

New device: Xiaomi Vacuum mop pro 2+ #170

Closed Ir0nTh0r closed 2 years ago

Ir0nTh0r commented 2 years ago

Dear Merdok,

please add device on support list. I seen that Xiaomi Vacuum mop 1T is on support list, but that is chinese version. My robot is dreame.vacuum.p241o and is eu version.

Thank you and all the best in new year!

merdok commented 2 years ago

Hi, i can add support for that device, but since i am currently in the middle of rebuilding the plugin, it will probably take quite some time till i will be able to do that. In the meantime you can try to use the model from Vacuum mop 1T in your config.json and see if this might work as a workaround for you already.

Ir0nTh0r commented 2 years ago

Wow, that was fast! I woul, but I can't find name of it "dreame.vacuum." Merdok, thank you for all your good work that you're doing for us!

Update: found it "dreame.vacuum.p2041"

Ir0nTh0r commented 2 years ago

I'm still noob and would like to ask if my config.json is correct because i have no response msg.

{ "devices": [ { "name": "MI Robot", "ip": "192.168.31.189", "token": "7362466xxxxx", "deviceId": "102246xxxx", "model": "dreame.vacuum.p2041", "pollingInterval": 7, "deepDebugLog": false, "micloud": { "username": "6283xxxx", "password": "xxxxxxxx", "country": "cn", "forceMiCloud": true, "timeout": 5000 }, "start clean": true, "stop clean": true, "locate robot": true, "play_sound": true } ], "platform": "miot" }

merdok commented 2 years ago

Look fine to me. You have to check the homebridge debug log for any possible issues. Token might be wrong or ip might be wrong.

Ir0nTh0r commented 2 years ago

Mordok, you're really one kind guy that you are willing to help.

I can see the device in Homebridge, but I can't start it. Ip is correct and token too. Do you have any other idea? In Debug is nothing special:

1/3/2022, 5:33:53 PM] [miot] Initializing devices [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Got device configuration, initializing device with name: MI Robot [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Device model known: dreame.vacuum.p2041! Creating device! [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Initializing device properties [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Initializing device actions [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Device actions: [ "start_sweep", "stop_sweep", "start_charge", "reset_brush_life", "reset_side_brush_life", "reset_filter_life", "start_clean", "stop_clean", "locate_robot", "play_sound" ] [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Successfully created a RobotCleaner device! It is a Xiaomi Mijia 1T Robot Vacuum Cleaner. [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Initializing accessory! [1/3/2022, 5:33:53 PM] [miot] [MI Robot] Accessory successfully initialized!

merdok commented 2 years ago

First, that what you posted is not a debug log, and second that is not the complete log. With the information which you given me i can only guess that the the token or ip might be wrong.

Ir0nTh0r commented 2 years ago

That is copy from debug.log. I hope that is the right one.

[1/3/2022, 5:57:19 PM] [miot] Initializing devices [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Got device configuration, initializing device with name: MI Robot Vacuum-Mop [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Device model known: dreame.vacuum.p2041! Creating device! [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Initializing device properties [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Initializing device actions [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Device actions: [ "start_sweep", "stop_sweep", "start_charge", "reset_brush_life", "reset_side_brush_life", "reset_filter_life", "start_clean", "stop_clean", "locate_robot", "play_sound" ] [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Successfully created a RobotCleaner device! It is a Xiaomi Mijia 1T Robot Vacuum Cleaner. [1/3/2022, 5:57:19 PM] [miot] [MI Robot Vacuum-Mop] Initializing accessory! [1/3/2022, 5:57:20 PM] [miot] [MI Robot Vacuum-Mop] Accessory successfully initialized! [1/3/2022, 5:57:20 PM] [Hue] ConBee: dresden elektronik deCONZ gateway v2.13.1, api v1.16.0

I checked token and IP twice, so it should be ok.

merdok commented 2 years ago

Still not a debug log. Please see https://github.com/merdok/homebridge-miot#troubleshooting

Ir0nTh0r commented 2 years ago

As you said at the beginning, it can be a problem with token.

I find the Debug log:

MI Robot Vacuum-Mop] Error: Could not connect to device, token might be wrong

[1/3/2022, 9:15:33 PM] [miot] [MI Robot Vacuum-Mop] Could not connect to the device! Retrying in 42 seconds!


But it is really strange. When I checked the token with the extractor I saw that the country is "CN", but I set it in-app on "DE".

I have Xiaomi Router, which is set on "CN" and I have Xiaomi hub, again on "CN", but the robot is not connected to that hub, because is EU version and I can't connect to China server.

Tomorrow I will try with a different phone and I will see what is going on.###

merdok commented 2 years ago

Probably the token which you have is wrong or outdated. You need to retrieve a new one.

Ir0nTh0r commented 2 years ago

Merdok you are KING! It works. Obviously it was a problem with an account that I have for my Chinese devices. I connected Robot with a different account and different Iphone and I set the country to "DE" and now it works like a charm.

Do you maybe have some "donate" link?

Again thank for all your help!

merdok commented 2 years ago

Good to hear 👍 Yeah, for MiCloud you have to look out on which server you have your devices, although the login is the same to all servers but they do not share devices. As soon, as i am done with rebuilding the plugin i will add proper support for your device!

Yes, i have one: https://paypal.me/merdokdev Thanks!

Ir0nTh0r commented 2 years ago

Sorry that I didn't reply earlier, but I was little busy. You don't need to add device just for me. Is it maybe option to add battery status and pause option? I tried to add in configuration file but it is not working.

merdok commented 2 years ago

Battery status and pause option might not work because the device is not properly implemented. You have to keep in mind that you are using a different model for your device which might cause issues, for that reason it needs to be properly implemented at some point.

Ir0nTh0r commented 2 years ago

If that is the thing, I would be very happy if you can add my device. I know that you are busy with rebuilding the plug-in so in future please fix my Johhny 5.😉

merdok commented 2 years ago

Hi, i cannot find the device with the model in the miot spec dreame.vacuum.p241o Are you sure that this is correct?

Ir0nTh0r commented 2 years ago

Hi. The correct name is: dreame.vacuum.p2041o :) And by the way it is nice to hear you!😉

merdok commented 2 years ago

Support is now added in version 1.0.0!

Ir0nTh0r commented 2 years ago

Merdok, thank you for all your time!