CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
110 stars 26 forks source link

Eufy X9 Pro #4

Closed john500y2k closed 9 months ago

john500y2k commented 11 months ago

Would it be possible to add support for the Eufy X9 Pro T2320 model?

fbricker commented 10 months ago

I also have one Eufy Robovac X9 Pro. It would be great to have this working šŸ™

I tried adding the T2320 model to the "X": [ .... ] array like this:

...
        "T2255",
    ],
    "X": ["T2261", "T2262", "T2320"],
}
...

And I got the device recognized...

Screenshot 2023-08-14 at 23 50 39 Screenshot 2023-08-14 at 23 50 49

But it always displays status error and start / stop buttons don't do anything.

If you someone has an idea, I can try it :)

john500y2k commented 10 months ago

I also have one Eufy Robovac X9 Pro. It would be great to have this working šŸ™

I tried adding the T2320 model to the "X": [ .... ] array like this:

...
        "T2255",
    ],
    "X": ["T2261", "T2262", "T2320"],
}
...

And I got the device recognized...

Screenshot 2023-08-14 at 23 50 39 Screenshot 2023-08-14 at 23 50 49 But it always displays status error and start / stop buttons don't do anything.

If you someone has an idea, I can try it :)

I also did the same added T2320 there and also in the has map features setting.

Results in the same as you are seeing error with no responses from controls.

CodeFoodPixels commented 10 months ago

Have you set the IP of the device?

CodeFoodPixels commented 10 months ago

X9 Pro has been added in f4e4a64

john500y2k commented 10 months ago

X9 Pro has been added in f4e4a64

Thanks so much, really appreciate your support and efforts. Have redownloaded and tried out the revisions, also confirmed setting the IP of the device which was successful. However still getting the following errors.

2023-08-15 16:06:47.828 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'gwId': 'bf7e482efae9e7b687zijq', 'devId': 'bf7e482efae9e7b687zijq'}, 699224, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.855 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'dps': {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}}, 699224, None)

2023-08-15 16:06:47.855 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state bf7e482efae9e7b687zijq (192.168.0.232:6668): {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}

2023-08-15 16:06:47.903 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.957 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:08:57.926 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:08:57.995 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15Ā 16:08:57.926Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā SendingĀ toĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0x9,Ā b'',Ā 0,Ā <DeviceĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668)>)

2023-08-15Ā 16:08:57.995Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā ReceivedĀ messageĀ fromĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0x9,Ā b'',Ā 0,Ā None)

2023-08-15Ā 16:09:07.835Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā SendingĀ toĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0xa,Ā {'gwId':Ā 'bf7e482efae9e7b687zijq',Ā 'devId':Ā 'bf7e482efae9e7b687zijq'},Ā 839231,Ā <DeviceĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668)>)

2023-08-15Ā 16:09:07.929Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā SendingĀ toĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0x9,Ā b'',Ā 0,Ā <DeviceĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668)>)

2023-08-15Ā 16:09:07.931Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā ReceivedĀ messageĀ fromĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0xa,Ā {'dps':Ā {'151':Ā True,Ā '156':Ā True,Ā '158':Ā 'Max',Ā '159':Ā True,Ā '160':Ā False,Ā '161':Ā 70,Ā '163':Ā 60}},Ā 839231,Ā None)

2023-08-15Ā 16:09:07.932Ā INFOĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā ReceivedĀ updatedĀ stateĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā {'151':Ā True,Ā '156':Ā True,Ā '158':Ā 'Max',Ā '159':Ā True,Ā '160':Ā False,Ā '161':Ā 70,Ā '163':Ā 60}

2023-08-15Ā 16:09:07.946Ā DEBUGĀ (MainThread)Ā [custom_components.robovac.tuyalocalapi]Ā ReceivedĀ messageĀ fromĀ bf7e482efae9e7b687zijqĀ (192.168.0.232:6668):Ā Message(0x9,Ā b'',Ā 0,Ā None)
fbricker commented 10 months ago

Same here... removed and re-installed from main instead of 1.0.0 (the added T2320 code is in there).

Logged in with my Eufy account, it finds the robot and ask me for it's room.

Then I click configure, set the IP (get a confirmation message)

But I still get status error šŸ˜­

Screenshot 2023-08-15 at 19 28 11 Screenshot 2023-08-15 at 19 28 46

Buttons are also not working šŸ˜¢

CodeFoodPixels commented 10 months ago

@fbricker this sounds like it hasn't got an IP address. I've just added autodiscovery in main, so if you redownload from main, you won't need to input the IP yourself

fbricker commented 10 months ago

Hi, I tried that... but still have the error (before I set the IP i get an error saying I don't have the IP set, and after setting it just says error: unknown)

Here are the steps I follow:

First I installed the plugin from Main and configured by adding the credentials.

Screenshot 2023-08-20 at 11 50 00

. .

Get the device added

Screenshot 2023-08-20 at 11 50 26

. .

Check the "IP Address not set" error

Screenshot 2023-08-20 at 11 50 59

. .

Validate the IP on the router

IMG_9413 . .

Configure the IP

Screenshot 2023-08-20 at 11 51 16

. .

Get the success message

Screenshot 2023-08-20 at 11 51 22

. .

Check the status again...

Screenshot 2023-08-20 at 11 51 43

Please let me know if there's any other test you'll like me to perform.

CodeFoodPixels commented 10 months ago

If you download the latest beta, this should be fixed. You no longer need to configure the IP manually but it may take a few seconds to connect to the vacuum:

https://github.com/CodeFoodPixels/robovac/releases/tag/v1.1.0.beta.1

CodeFoodPixels commented 10 months ago

X9 Pro has been added in f4e4a64

Thanks so much, really appreciate your support and efforts. Have redownloaded and tried out the revisions, also confirmed setting the IP of the device which was successful. However still getting the following errors.

2023-08-15 16:06:47.828 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'gwId': 'bf7e482efae9e7b687zijq', 'devId': 'bf7e482efae9e7b687zijq'}, 699224, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.855 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'dps': {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}}, 699224, None)

2023-08-15 16:06:47.855 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state bf7e482efae9e7b687zijq (192.168.0.232:6668): {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}

2023-08-15 16:06:47.903 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.957 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:08:57.926 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:08:57.995 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:08:57.926 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:08:57.995 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:09:07.835 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'gwId': 'bf7e482efae9e7b687zijq', 'devId': 'bf7e482efae9e7b687zijq'}, 839231, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:09:07.929 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:09:07.931 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'dps': {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 60}}, 839231, None)

2023-08-15 16:09:07.932 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state bf7e482efae9e7b687zijq (192.168.0.232:6668): {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 60}

2023-08-15 16:09:07.946 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

None of these are errors, some of them are debug messages and should only show up if you have debug logging enabled.

john500y2k commented 10 months ago

X9 Pro has been added in f4e4a64

Thanks so much, really appreciate your support and efforts. Have redownloaded and tried out the revisions, also confirmed setting the IP of the device which was successful. However still getting the following errors.

2023-08-15 16:06:47.828 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'gwId': 'bf7e482efae9e7b687zijq', 'devId': 'bf7e482efae9e7b687zijq'}, 699224, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.855 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'dps': {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}}, 699224, None)

2023-08-15 16:06:47.855 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state bf7e482efae9e7b687zijq (192.168.0.232:6668): {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 59}

2023-08-15 16:06:47.903 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:06:47.957 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:08:57.926 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:08:57.995 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:08:57.926 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:08:57.995 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

2023-08-15 16:09:07.835 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'gwId': 'bf7e482efae9e7b687zijq', 'devId': 'bf7e482efae9e7b687zijq'}, 839231, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:09:07.929 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, <Device bf7e482efae9e7b687zijq (192.168.0.232:6668)>)

2023-08-15 16:09:07.931 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0xa, {'dps': {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 60}}, 839231, None)

2023-08-15 16:09:07.932 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state bf7e482efae9e7b687zijq (192.168.0.232:6668): {'151': True, '156': True, '158': 'Max', '159': True, '160': False, '161': 70, '163': 60}

2023-08-15 16:09:07.946 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from bf7e482efae9e7b687zijq (192.168.0.232:6668): Message(0x9, b'', 0, None)

None of these are errors, some of them are debug messages and should only show up if you have debug logging enabled.

Ah sorry you are correct I did enable debug logging at the time.

Have seen your posts regarding the latest release:

https://github.com/CodeFoodPixels/robovac/releases/tag/v1.1.0.beta.1

Have used that version and encountered the below errors:

When setting up just using Eufy login credentials (no manual IP entry)

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py",line 362, in _async_setup_platform await asyncio.shield(task)
File "/config/custom_components/robovac/vacuum.py", line 110, in async_setup_entry await entity.vacuum. async_connect ()
File "/config/custom_components/robovac/tuyalocalapi.py", line 678, in async_connect
sock.connect ((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused

After manually entering IP:

/config/custom_components/robovac/__init._ā€¦.py:85:RuntimeWarning:coroutine'ConfigEntries.async_reload'wasneverawaited hass.config_entries.async_reload(entry.entry_id)

After reloading integration post manual IP config:

Incomplete read from: bf8374esie9e7b027zig (192.168.0.69:6668) : 0 bytes read on a total of undefined expected bytes

So sorry for the wide array of errors during the different stages/attempts of setting up, but am really hoping that sort of detail assists you more in understanding what is occurring.

Thank you so much for all of your efforts, really appreciate it so much :)

fbricker commented 10 months ago

Hi thx, for all your efforts :) I still have the same even with beta.1

I think that in order for the discovery to work propperly, I need to disable the TuyaLocal integration I have due to some port conflicts. I don't think this is the cause of the issue anyway. Buy maybe it helps for other cases.

Here goes the logs I had before disabling the tuyalocal integration:

Screenshot 2023-08-23 at 02 21 58 Screenshot 2023-08-23 at 02 31 47

Once I managed to get the disvoery working, I still have the error on the robot

Screenshot 2023-08-23 at 02 35 13 Screenshot 2023-08-23 at 02 36 29

This time it displays less fields... but still displays unavailable.

Maybe this model changed something in the protocol or the port is different?

Thx again!

fbricker commented 10 months ago

Hi, sorry to bother you again. Do you have something you want me to try? Can I help somehow?

CodeFoodPixels commented 10 months ago

So this is indeed a conflict with the TuyaLocal integration, they don't allow port reuse, and both integrations try to listen on the same port. I've submitted a PR to that integration.

Could you give v1.1.0.beta.2 a try with the TuyaLocal integration disabled please?

john500y2k commented 10 months ago

Saw your updates and have given them a try.

Beta 2: Account added successfully but device not discovered. Log outputs errors below

Logger: homeassistant.components.vacuum
Source: custom_components/robovac/tuyalocalapi.py:678
Integration: Vacuum (documentation, issues)
First occurred: 4:45:19 pm (1 occurrences)
Last logged: 4:45:19 pm

Error while setting up robovac platform for vacuum

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py",line 362, in _async_setup_platform await asyncio.shield(task)
File "/config/custom_components/robovac/vacuum.py", line 110, in async_setup_entry
await entity. vacuum. async_connect ()
File "/config/custom_components/robovac/tuyalocalapi.py", line 678, in async_connect
sock.connect ((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused

Beta 3: Account added successfully and device discovered successfully however just reports unavailable and there are no errors being reported in the logs.

Logs from debug option

2023-09-01 16:34:07.223 DEBUG (MainThread) [custom_components. robovac. tuyalocalapil Disconnected from [redacted] (192.168.0.232:6668)
2023-09-01 16:34:07.229 DEBUG (MainThread) [custom_components. robovac. tuyalocalapil Connecting to [redacted] (192.168.0.232:6668)
2023-09-01 16:34:07.347 DEBUG (MainThread) [custom_components.robovac.tuyalocalapil Sending to [redacted] (192.168.0.232:6668) :
Message (Oxa, {'gwId': '[redacted]', 'devId': '[redacted]'}, 312926, Ā«Device [redacted] (192.168.0.232:6668)>)
2023-09-01 16:34:07.353 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from [redacted]
(192.168.0.232:6668) : Message (Oxa, {'dps':
{'151': True, '156': True, '158': 'Turbo
'159': True, '160': False,
'161': 70, '163': 100}}, 312926,
None)
2023-09-01 16:34:07.354 INFO (MainThread) [custom components. robovac. tuyalocalapi] Received updated state [redacted]
(192.168.0.232:6668): {'151': True,
"156': True,
'158': 'Turbo', '159': True, '160': False,
"161': 70, '163': 100}
2023-09-01 16:34:27.359 DEBUG (MainThread) [custom_components. robovac. tuyalocalapil Sending to [redacted] (192.168.0.232:6668) :
Message (Oxa, {'gwId': '[redacted]', 'devId': '[redacted]'}, 333056, Ā«Device [redacted] (192.168.0.232:6668)>)
2023-09-01 16:34:27.415 DEBUG (MainThread) [custom_components. robovac. tuyalocalapi] Received message from [redacted]
(192.168.0.232:6668) : Message (0xa, {'dps': {'151': True, '156': True, '158': 'Turbo'
'159': True,
'160': False, '161': 70, '163': 100}3, 333056,
None)
2023-09-01 16:34:27.415 INFO (MainThread) [custom components.robovac.tuvalocalapi] Received updated state [redacted] (192.168.0.232:6668): {'151': True, '156': True,
2023-09-01 16:34:47.360 DEBUG (MainThread) [custom_components. robovac. tuyalocalapi] Sending to [redacted] (192.168.0.232:6668) :
Message (Oxa, {'gwId': '[redacted]', 'devId': '[redacted]'}, 353057, Ā«Device [redacted] (192.168.0.232:6668)>)
2023-09-01 16:34:47.488 DEBUG (MainThread) [custom_components. robovac. tuyalocalapil Received message from [redacted]
(192.168.0.232:6668) : Message (Oxa, {'dps': {'151': True, '156': True,
'158': "Turbo'
'159': True,
'160': False, '161': 70, '163': 100}}, 353057,
None)
2023-09-01 16:34:47.488 INFO (MainThread) [custom_ components.robovac.tuyalocalapi] Received updated state [redacted] (192.168.0.232:6668): {'151': True, '156': True,
'158': 'Turbo', '159': True, '160: False, '161': 70, '163': 100}

Hope any of that is of value?

CodeFoodPixels commented 10 months ago

@john500y2k Could you give beta 4 a try please?

@fbricker Beta 4 allows you to manually set the IP again, so please give that a try

john500y2k commented 10 months ago

@john500y2k Could you give beta 4 a try please?

@fbricker Beta 4 allows you to manually set the IP again, so please give that a try

Tried out beta 4, sadly still the same. Can add account and vacuum is auto discovered correctly but device remains unavailable with attribute error reported as ā€œunknownā€ and no errors reported in the logs. Debug logging remains the same as my previous post. Also tried manually setting IP (auto discovery already had correct IP) but still the same.

Thanks so much for your perseverance it really is appreciated, please do let me know if there is anything I can try out on my end to help you understand where itā€™s having troubles.

My very limited trials with local Tuya was managing to connect however there was hardly any functionality (no way to start/stop a clean and so on) and the reported dps items were only the ones that are in the debug log which I have managed to figure out some of:

151: 156: Auto-Return Cleaning 158: Fan Speed (quiet,standard,turbo,max) 159: Boost IQ 160: 161: Voice Level 163: Battery Status

For the above I was able to successfully control the ones that can be via local Tuya and the changes were reflected on the robot and in Eufy app. Also updates were reflected in the integration on status updates or changes made via the Eufy app.

CodeFoodPixels commented 10 months ago

So I think that the dps keys are different on the X9 compared to others, so I'm going to need to dig into the decompiled app code again.

CodeFoodPixels commented 9 months ago

@john500y2k I've discovered that one of the tuya apis returns a schema that I can potentially use for commands. Could you please run this and paste the output here? https://replit.com/@CodeFoodPixels/robovac-auth-test

john500y2k commented 9 months ago

@john500y2k I've discovered that one of the tuya apis returns a schema that I can potentially use for commands. Could you please run this and paste the output here? https://replit.com/@CodeFoodPixels/robovac-auth-test

Oh nice, have ran with output below:

********** Robovac Auth Tester **********
Logging in to Eufy
    Success
Getting Eufy device info
    Success
Devices
    Cleaning device: RoboVac X9 Pro (redacted)
        Found device in tuya
            RoboVac X9 Pro
            [{"attr":0,"canTrigger":true,"code":"proto","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":150,"mode":"rw","name":"åč®®","property":{"type":"string","maxlen":255},"type":"obj"},{"attr":0,"canTrigger":true,"code":"power","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":151,"mode":"rw","name":"ē”µęŗå¼€å…³","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"mode_ctrl","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":152,"mode":"rw","name":"ęØ”å¼ęŽ§åˆ¶","type":"raw"},{"attr":0,"canTrigger":true,"code":"work_status","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":153,"mode":"rw","name":"巄作ēŠ¶ę€","type":"raw"},{"attr":0,"canTrigger":true,"code":"clean_params","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":154,"mode":"rw","name":"ęø…ę“å‚ę•°","type":"raw"},{"attr":0,"canTrigger":true,"code":"remote_ctrl","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":155,"mode":"rw","name":"é„ęŽ§ę–¹å‘","property":{"range":["Brake","Forward","Back","Left","Right"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"pause_job","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":156,"mode":"rw","name":"ꖭē‚¹ē»­ę‰«","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"dnd","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":157,"mode":"rw","name":"å‹æꉰ","type":"raw"},{"attr":0,"canTrigger":true,"code":"suction_level","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":158,"mode":"rw","name":"åøåŠ›ę”£ä½","property":{"range":["Quiet","Standard","Turbo","Max"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"boost_iq","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":159,"mode":"rw","name":"BoostIQ","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"calling_robot","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":160,"mode":"rw","name":"åÆ»ę‰¾ęœŗå™Øäŗŗ","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"volume","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":161,"mode":"rw","name":"音量","property":{"unit":"","min":0,"max":100,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"user_language","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":162,"mode":"rw","name":"čÆ­č؀ē®”ē†","type":"raw"},{"attr":0,"canTrigger":true,"code":"bat_level","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":163,"mode":"ro","name":"ē”µę± ē”µé‡","property":{"unit":"","min":0,"max":100,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"timing","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":164,"mode":"rw","name":"å®šę—¶","type":"raw"},{"attr":0,"canTrigger":true,"code":"reserved2","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":165,"mode":"rw","name":"预ē•™2","type":"raw"},{"attr":0,"canTrigger":true,"code":"log_debug","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":166,"mode":"rw","name":"调čÆ•č®¾ē½®","type":"raw"},{"attr":0,"canTrigger":true,"code":"clean_statistics","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":167,"mode":"rw","name":"ęø…꓁ē»Ÿč®”","type":"raw"},{"attr":0,"canTrigger":true,"code":"consumables","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":168,"mode":"rw","name":"耗Ꝑ","type":"raw"},{"attr":0,"canTrigger":true,"code":"app_dev_info","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":169,"mode":"rw","name":"Appå’Œč®¾å¤‡","type":"raw"},{"attr":0,"canTrigger":true,"code":"map_edit","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":170,"mode":"rw","name":"地图ē¼–č¾‘","type":"raw"},{"attr":0,"canTrigger":true,"code":"multi_maps_ctrl","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":171,"mode":"rw","name":"å¤šåœ°å›¾ęŽ§åˆ¶","type":"raw"},{"attr":0,"canTrigger":true,"code":"multi_maps_mng","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":172,"mode":"rw","name":"多地图ē®”ē†","type":"raw"},{"attr":0,"canTrigger":true,"code":"station","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":173,"mode":"rw","name":"åŸŗē«™","type":"raw"},{"attr":0,"canTrigger":true,"code":"media_manager","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":174,"mode":"rw","name":"åŖ’体ē®”ē†","type":"raw"},{"attr":0,"canTrigger":true,"code":"reserved3","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":175,"mode":"rw","name":"预ē•™3","property":{"type":"string","maxlen":255},"type":"obj"},{"attr":0,"canTrigger":true,"code":"unisetting","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":176,"mode":"rw","name":"å…¬å…±č®¾ē½®","type":"raw"},{"attr":0,"canTrigger":true,"code":"error_warning","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":177,"mode":"rw","name":"ꕅ障ꏐ醒","type":"raw"},{"attr":0,"canTrigger":true,"code":"toast","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":178,"mode":"rw","name":"ꏐē¤ŗ","type":"raw"},{"attr":0,"canTrigger":true,"code":"analysis","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":179,"mode":"rw","name":"ę•°ę®åˆ†ęž","type":"raw"}]
Test script ran successfully
CodeFoodPixels commented 9 months ago

Closing this in favour of #28