This is a unfinished integration for Liectroux ZK901 and his white label cousins. It branched from the open PR for vacuum implementation that localtuya guys should release soon. Comparing to the original PR, this one has to take status updates from DP 102 base 64 encoded data.
https://github.com/pratesbh/localtuya
Sample YAML configuration:
localtuya:
- host: <ip address>
device_id: <device id>
local_key: <local key>
friendly_name: Maradona
protocol_version: "3.3"
entities:
- platform: vacuum
friendly_name: Maradona
id: 1
commands_set: "smart,stop,chargego"
commands_dp: 3
idle_status_value: "dormant,idle,pause,fault"
returning_status_value: "backcharge"
docked_status_value: "fullcharge, charge"
battery_dp: 5
cleaning_mode_dp: 3
cleaning_modes: "smart,random,spiral,wall_follow"
fan_speed_dp: 3
fan_speeds: "quiet,auto,strong"
To Do
- Fix heartbeat code. While I don’t know why vacuum don’t answer sometimes, the reconnect interval was reduced and device status is kept constantly online.
- Implement additional commands (zone cleaning, spot cleaning, fan control…). Please note that only “total cleaning” and “return to base” commands on DP 3 are working at this moment. I’m not sure, but maybe other commands should be sent to a different DP, probably encoded on base 64.
- Not related to this integration, but looking to update the vacuum position in the floorplan based on its X,Y position.
ps:LocalKey and device ID from your vacuum is needed. There are many tutorials on how to get such info on the web. I recommend to install “Laser Robot” app on Bluestacks, start an ADB shell and run “logcat | grep localKey” while opening the app. Please note that Laser Robot app can work simultaneously with this this integration.