tuya-local
tuya-local copied to clipboard
[Vacuum] Proscenic M8 Pro
Hello, apparently since the last update from a long time ago my vacuum uses Tuya directly to function. I proxied all the requests and see that it uses https://a1.tuyaeu.com/api.json to execute commands and retrieve info from the vacuum. But since it appears to be encrypted it's useless to me at the current state.
I got the following keys in the payload: result, t and sign.
Any way to integrate it into this component? I could help where needed.
Please see README.md for the ways you can find information useful for providing local protocol support. The local protocol is not identical to the cloud protocol, so proxying that is not the best way to gather information (though that information may give some clues).
I already gave up since I'm unable to get the local key since it is connected using a white label through Proscenic. I can reset and connect it through the public Tuya server but then I will lose a lot of features like the mapping. I don't think it has complete support for Tuya.
For most devices (including other models of vacuum), the white label app is just a rebranding, all of the features are the same as the standard Tuya or Smart Life apps (the ones that work with the developer portal). For Lefant vacuums at least, the map also works, but the toolbar at the bottom of the screen needs to be scrolled to access all features (I think the manufacturer's app had a better layout for that).
Did you determine the map is not working by repairing with the Tuya app, or are you basing that off an assumption?
When I connected the vacuum through the official Tuya app I get a blank map. I was however still able to start cleaning. Or should I have it run first before I got a new map? When I re-connect with the official app it remembered the previous map.
I think the data may be separate between the apps, so the Tuya app will not see the old maps that were created under the official app. The map may also not be enabled by default in the Tuya app. The Settings are the last item in the bottom bar, and it took me a while to discover that you can scroll across past the first four items to find the Settings.
This is all I'm seeing. I'm running a clean job now while connected to the official tuya app. Let's see if I get a map when it's done.


No option for Cleaning Record anywhere? My Lefant has quite a different UI in the "Tuya" app, and contains "Cleaning Record" in the Settings menu, which is where all the previous session maps are. Otherwise it only shows the map on the main screen while cleaning is in progress. Anyway, I haven't quite figured out how to get the map to display in HA yet. It is stored on a server, the local protocol just returns an ID that can be used to construct a URL, but I either am missing something in how the URL is constructed, or it needs authentication as well, since when I've tried using docs from the iot.tuya.com portal, I get 404 not found errors.
Yeah, that's all I get. The official proscenic app does have "Cleaning Record" in the settings menu.
Maybe I just learn my smart IR blaster to start a cleaning, so I can control it in home assistant.
So far I still don't have any mapping. But it does remember the rooms and my blocked areas. So maybe Proscenic doesn't use Tuya completely to control it's device?
The switch available through the cloud API is probably sufficient if you just want to start a cleaning from HA. Does it show up in the default Tuya integration, or nothing at all?
Otherwise if you can forego the mapping, I think we can get everything else working locally with a bit of exploration work on iot.tuya.com to find out what we can through the device debugger there.
But if I don't have mapping doesn't that mean I can't tell him to go clean that room or go clean this spot anymore?
I don't know the details of how that is implemented, if the map is stored on the vacuum then there will be commands that could probably be used if it does not clear its memory when repaired to the Tuya app, but if that is implemented in the cloud, then it will be lost. Currently supported vacuums only have a read-only map as a visual indication of what they have cleaned that session. I don't think the map can be used to send the vacuum to a specific spot to do spot cleaning on those. There are manual movement commands that could do it with enough trial and error, but I haven't tried as my vacuum seems to have just enough battery to do the whole house in one go.
I'm going to close this, as it seems you will lose functionality that you are not willing to lose if you move to using the local protocol for this device. If any future user thinks the Home Assistant integration is more valuable than the mapping, then they can either reopen this, or file a new request with the necessary information from the Tuya developer portal.
Good news! I was just able to get the localKey from my device. Although I configured it with some random values I was able to get it cleaning. What are our next steps to get proper device support?
The list in that screenshot comes from some other application which does not clearly show the distinction between integers and strings. It is better if you can capture the log from tuya-local itself when attempting to add the device.
In addition to the raw data, I also need to know what each datapoint means and what the ranges/possible values are. This is normally available in the iot.tuya.com developer portal, but since you are using a non-Tuya branded app, you will not be able to see this device in there. It may be worth temporarily re-pairing with the Tuya branded app so you can gather info from iot.tuya.com, and then re-pairing back to the manufacturer branded app after the data is collected. This will cause the local key to get regenerated, so you will need to go through the process of getting it from your device again.