merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
383 stars 62 forks source link

Can't understand how to setup properly actionButtons ijai.vacuum.v19 #410

Closed gianemi2 closed 1 year ago

gianemi2 commented 1 year ago

I'm opening an issue not for a bug of the repository but for a hard time understanding how to handle correctly actionButtons.

I'm trying to create a button for cleaning a specific room. I've got my miot spec from https://merdok.github.io/miotspec/?model=ijai.vacuum.v19.

"actionButtons": [
    {
        "action": "sweep:set-room-clean",
        "name": "Pulisci lettiera"
    }
]

Seems like params are required since I have to say which room to clean but how can I understand how to pass those params correctly? I can't find anything online and also, using debug mode on homebridge didn't help me.

merdok commented 1 year ago

Hi, did you have a look here. There are currently two guides for Viomi and Dreame vacuums but i guess that should be a good starting point for you https://github.com/merdok/homebridge-miot/blob/main/docs/robotcleaner.md

gianemi2 commented 1 year ago

Hi, did you have a look here. There are currently two guides for Viomi and Dreame vacuums but i guess that should be a good starting point for you https://github.com/merdok/homebridge-miot/blob/main/docs/robotcleaner.md

First of all, thank you for replying. I've copied and adapted part of the following code

"actionButtons": [
  {
      "action": "4.13",
      "name": "Clean kitchen",
      "params": [
          0,
          1,
          "8"
      ]
  }
]

Fetched my actions from: https://merdok.github.io/miotspec/?model=ijai.vacuum.v19 I've changed both action and params, action with sweep:set-room-clean and params with 0,1,1 based on the fact that I've just two room in my Xiaomi Home app but the vacuum doesn't run. How can I check what kind of request does the robot takes when I run a command? is it possible to read a response at my command? Logs doesn't show anyting when I run that action.

merdok commented 1 year ago

You would need to use the modified Xiaomi Home app by Vevs for Android. It allows you to capture requests, so you could then start a room clean from the app and it will log the request for you which then you can use to configure the action button. Unfortunately an android device is currently the only way to do that as far as i know.

tommyMX commented 1 year ago

i have no android :-(

merdok commented 1 year ago

You can try to use the miot cli and run the following command in terminal to see if that outputs something. miot send <IP> -t <TOKEN> get_room_mapping '[]'

tommyMX commented 1 year ago

@merdok > You can try to use the miot cli and run the following command in terminal to see if that outputs something.

miot send <IP> -t <TOKEN> get_room_mapping '[]'

You can explain more? over which Terminal I should try this command?

tommyMX commented 1 year ago

my home bridge is running in a docker on a synology...

merdok commented 1 year ago

On the device where your homebridge is running on.

tommyMX commented 1 year ago

okay I did it in the terminal.....but got no confirmation or error...is that good ?

merdok commented 1 year ago

You should get a list with your room mappings, if that does not work then your only way would be to use and Android device.

tommyMX commented 1 year ago

Yes i installed the modified app but it says plug-in not installed inside the app when I click on my device

maybe I haven’t the new version ?

tommyMX commented 1 year ago

Have you a link ?

tommyMX commented 1 year ago

I used this one:

https://apkvision.com/app/modified-mi-home-by-vevs-38331/

merdok commented 1 year ago

Sorry, i have no link. You would need find the latest version which supports your device.

tommyMX commented 1 year ago

can I do something with this:

https://merdok.github.io/miotspec/?model=ijai.vacuum.v19

I found in a post

merdok commented 1 year ago

This is just your base for creating the action buttons, you still need the room IDs, of course you can start to guess but that might take a while

tommyMX commented 1 year ago

Are you the developer here ? So for the future all new models will have this problem then ;-)

tommyMX commented 1 year ago

But I will try

merdok commented 1 year ago

I am the owner and developer yes. The thins is that until now nobody tried that with a ijai vacuum so some discoveries need to be made and documented in the guide.

tommyMX commented 1 year ago

Ok i will try again

I will get the device delivered on Tuesday or Wednesday

so I can look what the plug-in is doing when I am configured in the mi app ;-)

tommyMX commented 1 year ago

I am the owner and developer yes. The thins is that until now nobody tried that with a ijai vacuum so some discoveries need to be made and documented in the guide.

@merdok

I have the device

merdok commented 1 year ago

Then you can try to use the guides for the other vacuums and see if any of them will work.

gianemi2 commented 1 year ago

@merdok stop answer him. Seems like he can only complain. I'm going to make some inner tests with CLI and let you know if I found some solutions for ijai.vacuum.v19. If I can found a solution I'll update this issue with additional information.

By now, we can just close this issue.

merdok commented 1 year ago

@gianemi2 thanksđź‘Ť You can use the guides for the other vacuums as references, might be that one of them applies to the ijai models or at least is very similar. If you find something out then please let me know and we can update the guide!

tommyMX commented 1 year ago

@gianemi2 Thanks for your compliment

I don’t complain

but there are not many options

I said I can test and need some information to test

but when the miot command in the bash hasn’t enough functions what should I do

Trying some commands with Params and action buttons in the plugin gui make no sense for me.

The do is for the plug-in itself and the developer to get new devices in . We have all specs for this new device

but seems not interested to expand the plug-in

anyway o say goodbye and thank you for not replying my email

that’s also not a fine thing from you !!!

tommyMX commented 1 year ago

You are all very unfriendly