Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entities not populating with Eufy L60 #40

Open
rickadam opened this issue Nov 16, 2023 · 46 comments
Open

Entities not populating with Eufy L60 #40

rickadam opened this issue Nov 16, 2023 · 46 comments

Comments

@rickadam
Copy link

rickadam commented Nov 16, 2023

I have a Eufy L60. When I configure the integration I do get an IP but none of the entities populate in home assistant apart from:

sensor.robovac_battery

which shows as unavailable

Any ideas why this may happen? I've tried removing and re-adding the integration and reconfiguring the vac a couple of times

@CodeFoodPixels
Copy link
Owner

CodeFoodPixels commented Nov 16, 2023 via email

@rickadam
Copy link
Author

rickadam commented Nov 16, 2023 via email

@CodeFoodPixels
Copy link
Owner

Ah, the L60 is a new device, it's not in the supported list at the moment. I'll need to add it

@DellBoy4
Copy link

Hi,

I have the same issue with the L60. However i also have an X8 that was working until i added the L60 to the app and HA pulls it in then both devices get only the battery sensor and show as unavailable and the X8 no longer works. Is that expected due to the L60 not being supported? Any ideas on when the L60 can be added?

@iandarbey
Copy link

Plus 1 for the request on this being supported. Just ordered one on the black Friday early sales.

@wardozer
Copy link

I have the same issue with x8 pro

@jb123567
Copy link

@CodeFoodPixels Also looking for support for the L60, is it in your future plans?

@stewartpriest
Copy link

Ah, the L60 is a new device, it's not in the supported list at the moment. I'll need to add it

I added the T2267 model to the L series section in robovac.py, but no joy. Is there more to adding a device than just adding the model number? I'm happy to attempt a code change and contribute, but not entirely clear how the code all hangs together.

@jb123567
Copy link

Ah, the L60 is a new device, it's not in the supported list at the moment. I'll need to add it

I added the T2267 model to the L series section in robovac.py, but no joy. Is there more to adding a device than just adding the model number? I'm happy to attempt a code change and contribute, but not entirely clear how the code all hangs together.

I have added it to the supported list in the file and it now displays correctly, and is communicating with HA according to the logs, however it reports unavailable unfortunately, it seems as though there may be some deeper issues following a recent firmware update where the Robovacs are sending unknown strings back.

@NiekBrw
Copy link

NiekBrw commented Dec 17, 2023

Following since my L60 is also not working

@jb123567
Copy link

Anyone got anywhere with this? I'm wondering if the latest firmware update has changed the code?

@TomG736
Copy link

TomG736 commented Jan 15, 2024

I have started a fork looking at the L60.

It currently only supports battery, fan level and auto home (and voice level but not sure the rest of the integration supports it).

If you try it out there will be logs showing what messages are received.

It would be good if people can try and correlate the values with settings in the app as I currently don't have much time.

Be careful sending the base64 strings (look like jumbled text) as e.g. message 176 has at least your WIFI name in it.

@jb123567
Copy link

I have started a fork looking at the L60.

It currently only supports battery, fan level and auto home (and voice level but not sure the rest of the integration supports it).

If you try it out there will be logs showing what messages are received.

It would be good if people can try and correlate the values with settings in the app as I currently don't have much time.

Be careful sending the base64 strings (look like jumbled text) as e.g. message 176 has at least your WIFI name in it.

I have installed, the battery level now reports correctly, however the RoboVac itself reports as unavailable. I assume yours is working as expected with limited functionality?

@TomG736
Copy link

TomG736 commented Jan 16, 2024

I have started a fork looking at the L60.
It currently only supports battery, fan level and auto home (and voice level but not sure the rest of the integration supports it).
If you try it out there will be logs showing what messages are received.
It would be good if people can try and correlate the values with settings in the app as I currently don't have much time.
Be careful sending the base64 strings (look like jumbled text) as e.g. message 176 has at least your WIFI name in it.

I have installed, the battery level now reports correctly, however the RoboVac itself reports as unavailable. I assume yours is working as expected with limited functionality?

Unfortunately thats the current state of it. It looks like all the commands have changed.

@jb123567
Copy link

@TomG736 okay, how can I help?

@TomG736
Copy link

TomG736 commented Jan 16, 2024

Give me a few days to poke around with it and I'll let you know how it goes.

@jb123567
Copy link

Give me a few days to poke around with it and I'll let you know how it goes.

Looking great already, the states seem to be working now!!

@MerekW
Copy link

MerekW commented Jan 28, 2024

I'm seeing the reported behavior on a new vacuum/install into HA today. Please let me know if I can test any available fixes, and thank you so much for all your contributions!

@jb123567
Copy link

jb123567 commented Mar 1, 2024

@CodeFoodPixels is the L60 supported within the latest releases? I'm getting an error


2024-03-01 19:50:50.635 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up robovac platform for vacuum

Edited with full error


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/robovac/vacuum.py", line 128, in async_setup_entry
    entity = RoboVacEntity(item)
             ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/vacuum.py", line 296, in __init__
    self._attr_supported_features = self.vacuum.getHomeAssistantFeatures()
                                    ^^^^^^^^^^^
AttributeError: 'RoboVacEntity' object has no attribute 'vacuum'

@jb123567
Copy link

jb123567 commented Mar 8, 2024

Give me a few days to poke around with it and I'll let you know how it goes.

Did you get anywhere? The coding is way beyond me!!

@TomG736
Copy link

TomG736 commented Mar 10, 2024

I haven't had much more time to look at it. I'm not sure on the next steps to get the controls working. I may work more on some of the status reporting and getting it in a state that could be merged back in to the rest of the project.

@CodeFoodPixels
Copy link
Owner

So I've been working on a new branch better-dps that gives each vacuum it's own file to define the command codes. If you run this repo, you'll get a JSON blob of the schema, which contains the commands.

@TomG736
Copy link

TomG736 commented Mar 12, 2024

How well tested is that branch? Is it worth me making a config for the L60 off it or is it too early to test it out?

That python code worked a dream. Would have been much easier than my original method of trawling through the logs and matching the log output to the robot behaviour.

@CodeFoodPixels
Copy link
Owner

CodeFoodPixels commented Mar 13, 2024 via email

@DellBoy4
Copy link

Now i have updated beyond the version i was on which was old (1.1.1) my X8 has stopped working and now only shows the battery entity but as unavailable. My L60 also doesn't work and shows the same 1 entity. I have tried downgrading but unless i do a restore of HA back to that version i cannot get even the X8 to pick up. I have also tried it on a fresh install of HA and get the same behaviour. I saw a comment on another issue about trying the DPS builds but i get the same thing. Any ideas?

@jbleyaert
Copy link

Now i have updated beyond the version i was on which was old (1.1.1) my X8 has stopped working and now only shows the battery entity but as unavailable. My L60 also doesn't work and shows the same 1 entity. I have tried downgrading but unless i do a restore of HA back to that version i cannot get even the X8 to pick up. I have also tried it on a fresh install of HA and get the same behaviour. I saw a comment on another issue about trying the DPS builds but i get the same thing. Any ideas?

The L60 is not (yet) supported, not in the main branch and not in the better-dps branch.

@DellBoy4
Copy link

I get that but why would that stop the X8 that was working working and remove all the entities for it bar the battery which shows as unavailable?

@CodeFoodPixels
Copy link
Owner

@DellBoy4 try the latest version,

@DellBoy4
Copy link

DellBoy4 commented Mar 22, 2024

Hi, I tried the latest build 1.2.10 and had the same issue. Also tried it on a fresh install not having the integration installed before and get the same thing. I get this error repeatedly.

2024-03-22 07:41:09.760 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up robovac platform for vacuum
File "/config/custom_components/robovac/vacuum.py", line 116, in async_setup_entry
entity = RoboVacEntity(item)
File "/config/custom_components/robovac/vacuum.py", line 284, in __init__
AttributeError: 'RoboVacEntity' object has no attribute 'vacuum'

If im being stupid and something has changed that I've missed please let me know, thanks.

@Mint514
Copy link

Mint514 commented Mar 22, 2024

Just commenting to follow & say that if you need someone to test with an L60 - Happy to do so. Just bought one without doing research into the integration side of things (lame!) Keep up the awesome work all.

@Pieterv24
Copy link

Am currently trying to get the L60 H SES (T2278) to work.
Still having some issues though.
Will make a PR once I seem to have a working integration.
(workin on the better-dps branch)

@jbleyaert
Copy link

jbleyaert commented Mar 27, 2024

Am currently trying to get the L60 H SES (T2278) to work. Still having some issues though. Will make a PR once I seem to have a working integration. (workin on the better-dps branch)

I actually tried to get the T2277 to work (L60 SES), but failed. I got battery and "locate" working, but that's about it. I will pick it up again when I have more time.
Maybe we can check together? This is the PR.
#66

@VictoriousCupid
Copy link

I've got the L60 SES (T2277) and no skills in coding, I'm good at copying, pasting and testing though. So that is what I can offer. Tag me if those "skills" come in handy.

@TomG736
Copy link

TomG736 commented Mar 27, 2024

The L60 uses a different encoding for the status updates, I have a loosely working version of it but I have been unable to decode the exact content of the dps messages. I have something which will roughly give you the current status, battery and locate works. Simply using the current version with the codes updated for the L60 will not work.

@Pieterv24
Copy link

The L60 uses a different encoding for the status updates, I have a loosely working version of it but I have been unable to decode the exact content of the dps messages. I have something which will roughly give you the current status, battery and locate works. Simply using the current version with the codes updated for the L60 will not work.

Good to know.
Any guesses of how the dps values are encoded?

@TomG736
Copy link

TomG736 commented Mar 29, 2024

They are all base64 encoded bytestrings. How to decode the bytes is the challenge.
Currently Im looking for these bytestrings in the status dps:

        RobovacCommand.STATUS: {
            # there is far more to this field!
            "code": 153,
            "values": {
                b"\x10\x052\x00": "Cleaning",
                b"\x10\x052\x02\x08\x01": "Paused",
                b"\x10\x07B\x00": "Recharge",
                b"\x10\x03\x1a\x00": "Charging",
                b"\x10\x03\x1a\x02\x08\x01": "completed",
                b"\x10\x04*\x00": "QuickMapping",
                b"\x10\x05R\x00": "standby",  # Locating?
            },
        },

This is a bit of a dumb way of doing it as it doesnt actually decode the information but it does seem to be working for now.

On the schema you can see a lot of them have a 'raw' type which means they are base64 encoded bytestrings.

@CodeFoodPixels
Copy link
Owner

@TomG736 from looking at a decompiled version of the app, it looks like it uses protobuf

@CodeFoodPixels
Copy link
Owner

So I found the protobuf definitions and generated a python interface for the work status. It looks like it works! Pushed it into a gist here: https://gist.github.com/CodeFoodPixels/3ff6c153df08901b6819a25e9b9c50d0

@TomG736
Copy link

TomG736 commented Mar 31, 2024

I have just tested some cached values I have, the first byte is a length byte then the rest is correctly decoded by that protobuf.

Examples
Key: 153
2024-03-31 08:29:20.686970+00:00 06 0a 00 10 05 32 00 || b'\x06\n\x00\x10\x052\x00'
mode {
}
state: CLEANING
cleaning {
}

2024-03-31 08:29:25.575711+00:00 06 0a 00 10 05 52 00 || b'\x06\n\x00\x10\x05R\x00'
mode {
}
state: CLEANING
relocating {
}

2024-03-31 08:29:28.426625+00:00 06 0a 00 10 05 32 00 || b'\x06\n\x00\x10\x052\x00'
mode {
}
state: CLEANING
cleaning {
}

2024-03-31 08:51:28.044874+00:00 04 10 07 42 00 || b'\x04\x10\x07B\x00'
state: GO_HOME
go_home {
}

2024-03-31 08:52:14.321994+00:00 04 10 03 1a 00 || b'\x04\x10\x03\x1a\x00'
state: CHARGING
charging {
}

2024-03-31 10:32:32.879378+00:00 06 10 03 1a 02 08 01 || b'\x06\x10\x03\x1a\x02\x08\x01'
state: CHARGING
charging {
  state: DONE
}

2024-03-31 14:58:32.597083+00:00 08 0a 02 08 02 10 05 32 00 || b'\x08\n\x02\x08\x02\x10\x052\x00'
mode {
  value: SELECT_ZONE
}
state: CLEANING
cleaning {
}

2024-03-31 14:58:36.700443+00:00 08 0a 02 08 02 10 05 52 00 || b'\x08\n\x02\x08\x02\x10\x05R\x00'
mode {
  value: SELECT_ZONE
}
state: CLEANING
relocating {
}

2024-03-31 14:58:39.781104+00:00 08 0a 02 08 02 10 05 32 00 || b'\x08\n\x02\x08\x02\x10\x052\x00'
mode {
  value: SELECT_ZONE
}
state: CLEANING
cleaning {
}

2024-03-31 15:00:55.145192+00:00 04 10 07 42 00 || b'\x04\x10\x07B\x00'
state: GO_HOME
go_home {
}

2024-03-31 15:01:23.701433+00:00 04 10 03 1a 00 || b'\x04\x10\x03\x1a\x00'
state: CHARGING
charging {
}

2024-03-31 15:03:51.769760+00:00 06 10 03 1a 02 08 01 || b'\x06\x10\x03\x1a\x02\x08\x01'
state: CHARGING
charging {
  state: DONE
}

@CodeFoodPixels
Copy link
Owner

Do these byte strings come through the dps dict that the current tuyalocalapi.py provides?

@TomG736
Copy link

TomG736 commented Apr 6, 2024

Do these byte strings come through the dps dict that the current tuyalocalapi.py provides?

Yes, here I have create an attribute which will display all the dps keys and values. My HA instance exports all its data to influx so I can then access all these states and how they have changed over time.

@VictoriousCupid
Copy link

Any progress in this? If possible and or needed, can I help in any way?

@john500y2k
Copy link

john500y2k commented May 3, 2024

Do these byte strings come through the dps dict that the current tuyalocalapi.py provides?

Yes, here I have create an attribute which will display all the dps keys and values. My HA instance exports all its data to influx so I can then access all these states and how they have changed over time.

I think you may be on to something. Just tried your repo versions and had a touch of success specifically with version L60_V3.0 on my X9 Pro (screenshot below). None of the commands work and it seems to only report those values when a clean is in progress. Never manages to pull them when it is just docked and idle with the exception of battery level

IMG_1450

@IainPHay
Copy link

Just got an L60 and would love to see this working, all the comments before are a little beyond me though!

@ddakotac
Copy link

Also just got an L60 and would love to see it supported. Happy to test anything out and report back, and thanks for the work on this integration

@maximoei
Copy link

Got some success with my L60 SES
#85 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests