rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.82k stars 544 forks source link

Add supported device: Medion S20 SW #1355

Open SombraFrog opened 1 year ago

SombraFrog commented 1 year ago

Hello,

I figured out what settings worked for me for the Medion S20 SW robot vacuum:

Edit: these settings probably aren't right after all, see the screenshot below

Field Value
ID 5
Idle Status standby,sleep
Power DP 2
Docked Status charging,charging_done
Returning Status goto_charge
Battery status DP 6
Mode DP 3
Modes list standby,spot_clean,smart_clean,goto_charge,wall_clean,sleep,charging,charge_done,paused,cleaning,mop_clean
Return home mode goto_charge
Fan speeds DP 14
Fan speeds list normal,strong
Clean Time DP 17
Clean Area DP 16
Clean Record DP 15
Locate DP 13
Fault DP 18
Paused state pause
Stop status standby

I haven't tested all the functionality, but I managed to start, stop, return to home, and read if the robot is idle or charging. Hopefully I can save someone the time I spent experimenting with the different values :D

SombraFrog commented 1 year ago

The info in this issue helped quite a bit: https://github.com/rospogrigio/localtuya/issues/1010

bkbartk commented 1 year ago

As starter of that specific issue, I need to tell you that for me, Somehow, still not everything is working, I only can read the statusses "Cleaning" and "Error", no clue, why you got "idle" and "charging." also, I don't know the difference between "paused,stop and idle"

but I think this should be Power DP: 1 Modes list: "standby,random,spiral,smart,wall_follow" //those are modes, the other one are statusses. Paused state: paused //Icluding the d at the end,

but as mentioned, for me still not everything works, and I just changed something, and reverted it, but now locate seems to be broken as wel ;)

So any suggestions are welcome ;)

bkbartk commented 1 year ago

ok, one and another seems to be messed up. image makes sure the square puts the device in standby, which is wierd. but in vacuum.py line 216

        # state_value = str(self.dps(self._dp_id))
        state_value = str(self.dps(5))

self._dp_id = 101, don't know why, ( now I know) this one should be 5, I think you have that one, but I can't set this id anymore.

image

so for me some strange stuff seems to happen. still wondering.

SombraFrog commented 1 year ago

Here are the screenshots of how I have it configured - maybe I didn't transcribe it correctly?

Screenshot 1 Screenshot 2

SombraFrog commented 1 year ago

Alright I've tried a new combination and this one seems to work better? Screenshot3

bkbartk commented 1 year ago

I just grepped my old config from the backup

  {
                  "friendly_name": "MEDION Robot S20 SW",
                  "idle_status_value": "standby",
                  "powergo_dp": 1,
                  "docked_status_value": "charging,charge_done,chargego",
                  "returning_status_value": "goto_charge",
                  "battery_dp": 6,
                  "mode_dp": 3,
                  "modes": "standby,random,spiral,smart,wall_follow",
                  "return_mode": "chargego",
                  "fan_speed_dp": 14,
                  "fan_speeds": "normal,strong",
                  "clean_time_dp": 17,
                  "clean_area_dp": 16,
                  "clean_record_dp": 15,
                  "locate_dp": 13,
                  "fault_dp": 18,
                  "paused_state": "paused",
                  "stop_status": "standby",
                  "id": 101,
                  "platform": "vacuum"
                }

but I think your config is correct, in my case, I know now id should be 5 and power dp, sets the setting to powergo_dp, which is some naming issue, but that makes you correct there.

for now I have 2 strange issues,

  1. pause returns the vacuum to the doc,
  2. seek stopped working since I changed something yesterday and reverted it.

also I leave those fields empty image

thanks, for this post, it pointed me to the incorrect id,

SombraFrog commented 1 year ago

Glad to hear I helped!

From back when I used the app, I think I remember "pause" returning the vacuum to the dock too, but I'm not sure.

Anyway, I can start and stop NooNoo and that's all I need!