I am using the roborock driver I have two vacuums. How can I selectDevice in webcore code.
Which one? There is not one built-in, so you would have had to install something. Sharing that here (a link to the topic with a link to the code -- developers typically create topics for this -- or at least a link to the code would work) is the only way someone else can tell for sure, since this is something you would have installed on your particular hub.
That being said, in general, you'll just need to find any device under one of the lists that contains a capability the device exposes. If you don't find the device in any specific list, the generic "Actuator" list is likely to have it for any device that accepts commands (or "Sensor" for ones that just report back to the hub). But even those depend on the driver, so the above is the only way someone can see for sure -- or just looking through all of the lists, I suppose. ![]()
(This is done in the webCoRE app on your hub, like any device -- not "in code," by the way. You need to select the list of devices webCoRE has access to there.)
Which Roborock model(s) do you have?
I assume you are using this driver:
Do you have that set up and working? You should have created a device for each vacuum and toggled each to be for one of them, after doing setup for each one.
Assuming that is where you are at, you have to go into the Webcore App preferences and add the vacuum devices to the list of Webcore devices. Then they can be chosen as devices, and you will have a list of the commands you can run with them available to you.