-
Notifications
You must be signed in to change notification settings - Fork 14
"Battery state error" when integration is used with G30 Edge #6
Comments
Right, so that error is due to it not being able to get the proper status off the battery. I'll look at it. Might have you try a modified file so I can see what data is being returned. |
Hi, I have a regular G30 model (T2250) giving essentially the same log output. Commands all work, but does not report battery or current status. More than willing to subject it to a little experimentation. |
I've done a little experimenting. in vacuum.py, Commenting out lines 116 & 117 and then changing 118 from an elif to an if will sort of make it work. It's basically just bypassing the error handler. I now have battery status but the condition returned is incorrect. It shows as "returning" when in reality it is idle and fully charged in the dock. It looks like it is just a matter of getting all the right workstatus parts matched up, but I am unsure how to go about reading them directly as the machine changes state. |
More uneducated blind tweaking: Instead of the above, commenting out lines 116-119 inclusive & changing 120 from elif to if in vacuum.py results in the correct status being returned. Tested with cleaning, idle, returning and docked. Commands work, fan modes return & are selectable without error and the battery reports with no issue. This works enough for me now, but will watch this issue and help with testing where possible in order to have it fixed properly. |
Have tested the same as above, and can confirm it works with the 2 x G30 Edge devices as well. @pbulteel Does this look like a suitable fix, or does the removal of the earlier lines of code cause issues with other models ? |
Hey - glad to see my poking around has had some use! I am sure there is a more elegant way to fix this than simply gutting problematic sections of the code though. We'd need Patrick or another person properly versed in Python to take a look. |
Hi guys, Life got a little busy so I wasn't able to look into all of these, though I knew I had things waiting on me. I'll go through the code and see if @gmac0612's work can be used with all the other models. Meanwhile, hang tight as I start looking into this. I also was doing quite a bit of research on this while looking into Tuya's integration, etc. |
I looked at the changes you did, at the code and I see an issue with doing this. I will need to look into it deeper, but the change will need to be done in multiple places (tuya.py and robovac.py as well) to account for this. I may send you some debug versions of these to try to capture the proper values - so that I can then take them into account and properly implement this. |
Figured as much, More than happy to guinea pig any changes 🙂 |
Ditto - Always happy to test changes |
Hi i have the same issue. as the others above happy to test any fixes Thanks |
@gmac0612 this helped me to get the correct state but my battery state is not okay. Is there any way to fix this or is this maybe a caching problem? i have a 15C Max and everything works but not battery state EDIT: for some kind of reason everything works now. Maybe it takes some runs to get the correct battery state. |
Just to add to this, I've also added the changes that @gmac0612 mentioned and it all works for me, status-wise. I've got a g30 Edge and also a 30c, both of which seem to be doing what they're supposed to with these changes. I'll give it a full test over the weekend though, just to make sure. |
Made the changes to |
Good to see a few more people getting this to work. Strongly suggest not updating any components of the vac. Mine is blocked from 'net access and continues to work locally as it should. |
@gmac0612 , thanks a lot! Just tried your suggestion with my new G30 and all looks great now. |
Thank you for this, have now got my G30 Edge running fine and all info seems to be getting reported back. Hopefully this can be implemented into the code and cleaned up. |
I was able to get proper reporting from a X8 using the changes to the vacuum.py. not a perfect solution but makes the device look a little more integrated. |
Thanks for this. With this my G10 is working. I have only a few errors in the log (althoug heverything is working fine): |
To fix the correctly, my guess is we just have to change how ErrorCode enum is done. My G30 (T2250) returns: 1 is POWER so I assume True means it is charging? I'm assuming 0 is NO_ERROR It also lists the S codes which I'm fairly certain aren't passed as string so are likely different: So we need a different ErrorCode enum for the G-Series. A quick patch might be to change the class ErrorCode (StringEnum) to
It also requires adding this to the imports:
I also modified CleanSpeed to support Turbo
I also added an entry for T2250 in vacuum.py, but using T2118 will work (since I just replicated it) but I also wanted to add in the Turbo Fan speed:
I also commented out
in def status because it seems to always be true and on mine, when I hit GO_HOME, it changes the work_mode to "RECHARGING", which sets the status to "RETURNING". We do need to figure out how to switch the ENUM depending on model to keep the support for the non-G series. |
I've since decoupled my vac from homeassistant, but it's nice to see some substantial activity here 👍 |
The below error is generated every 20 seconds when used with a Eufy G30 Edge RoboVac (model T2251)
The outcome (failure to read the battery state) can be seen from the entity when added to Lovelace (vacuum is named Lilo in this example)
The text was updated successfully, but these errors were encountered: