landroid_cloud icon indicating copy to clipboard operation
landroid_cloud copied to clipboard

One-time schedule sometimes not working

Open sithmein opened this issue 5 months ago • 2 comments

Describe the issue

I have an automation which first sets a zone and then starts a one-time schedule. Quite regularly the mower doesn't start. However, when I call the ots service explicitly it almost always works. Here's the corresponding debug output of a failed invocation (i.e. mower did not start):

2024-03-20 14:00:00.080 DEBUG (SyncWorker_6) [pyworxcloud.MQTT] Publishing message '{'sc': {'ots': {'bc': 0, 'wtm': 30}}}'
2024-03-20 14:00:00.081 DEBUG (SyncWorker_6) [pyworxcloud.MQTT] Formatting message '{'sc': {'ots': {'bc': 0, 'wtm': 30}}}' to '{'id': 30776, 'sn': '202230198410017628E3', 'tm': '14:00:00', 'dt': '20/03/2024', 'sc': {'ots': {'bc': 0, 'wtm': 30}}}'
2024-03-20 14:00:01.575 DEBUG (Thread-3 (_thread_main)) [pyworxcloud.MQTT] Received MQTT message:
{"cfg":{"id":42862,"lg":"en","tm":"14:00:00","dt":"20/03/2024","sc":{"m":1,"distm":0,"ots":{"bc":0,"wtm":30},"p":0,"d":[["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0]],"dd":[["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0],["00:00",0,0]]},"cmd":0,"mz":[11,47,55,60],"mzv":[2,3,0,0,0,0,0,0,0,1],"mzk":1,"rd":180,"sn":"202230198410017628E3","al":{"lvl":0,"t":60},"tq":0},"dat":{"mac":"A8032AA0BACC","fw":3.32,"fwb":1,"bt":{"t":18.1,"v":20.09,"p":100,"nr":4,"c":0,"m":1},"dmp":[-0.4,-7.2,185.3],"st":{"b":229,"d":3915,"wt":255,"bl":74},"ls":1,"le":0,"lz":0,"rsi":-62,"lk":0,"act":1,"tr":0,"conn":"wifi","rain":{"s":0,"cnt":0},"time":{"r":0,"l":0}}}

Could it be that the timestamp in tm should be shifted by a second (or even more) so that it's not in the past?

What version of Home Assistant Core has the issue?

2024.1.6

What was the last working version of Home Assistant Core?

No response

What version of the Landroid Cloud integration do you have installed

4.0.3

What type of installation are you running?

Home Assistant Container

Which make and model is the mower used for this integration?

Landroid M500

Diagnostics information (NOT log entries!)

config_entry-landroid_cloud-abc8adb6e3837e5375be0b7d5474dc16.json.txt

Relevant log entries

See above

Additional information

No response

sithmein avatar Mar 20 '24 13:03 sithmein

It seems the problem is caused by sending two messages too quickly. I added a 2s delay in the automation between the two service calls and then it seems to work reliably. Since you don't want people to find this out by themselves I suggest to wait for the reply to the last command before sending a new command.

sithmein avatar Mar 20 '24 14:03 sithmein

Hello,

I also encountered an issue when trying to start my WR143E with pyworxcloud 4.1.8. Nothing was happening. I added a delay before and after the "cloud.start(serialNumber)" and it solved the problem. I assume there is a connection with this issue.

mji42 avatar Apr 09 '24 21:04 mji42