-
Notifications
You must be signed in to change notification settings - Fork 567
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
First implementation of vacuum platform #111
base: master
Are you sure you want to change the base?
Conversation
@rospogrigio thank you very much for your helps and your implementation. I'm really new about HA so maybe i done some errors. I'm going to explain you what i done:
And also inside the new init.py i put my info (Host IP, Device ID and Local Key)
But rebooting HA it restarted in safe mode cause some error... |
You should not edit any of the python files, just your configuration.yaml. Looks like you are missing |
And moreover @RobyDomo , the code of this PR is not yet operational because I still need your DPs dump. |
@postlund Thank you!!! I got it.. I launched following command /home/homeassistant/.homeassistant/custom_components/tuyadebug $ python test.py ID IP LK this is the result,
Sorry!!!! :-( |
Sorry, I was not clear enough. You have uncompressed it in the localtuya directory... no, just uncompress it in another directory, out of the homeassistant environment (your home, for example). Decompress everything and launch the script and it should work. |
@rospogrigio i didn't uncompress in localtuya folder. /home/tuyadebug $ python test.py XXX XXX XXX
|
@RobyDomo The script is executable, please launch it directly. As an alternative, launch it with python3 ("python" actually uses python2 and it fails). |
@rospogrigio i already tried to run directly as esecutable but it didn't work, and it didn't work also launching /home/tuyadebug $ python3 test.py XX XX XX Traceback (most recent call last): |
I also tried to install pycryptodome, but same results: pip install pycryptodome |
You are using an old version of tuyadebug.tgz, the one currently on master uses cryptography instead of Crypto. Don't know how you are downloading such an old version... please use this URL and retry: https://github.com/rospogrigio/localtuya/raw/master/tuyadebug.tgz |
I can't believe, and i'm so sorry to bore you so much, but it don't work....
:-( |
Ooops, now I see... can you try |
No way!!! :-( Installed Crypto, same result... ~/Downloads/tuyadebug $ python3 test.py XXX XXX XXX |
OK, I uploaded a new tuyadebug.tgz without Crypto. Give it a try. |
:-( now is changed the module... Itt can't find module 'cryptography' :~/Downloads/tuyadebug $ python3 test.py bla bla bla |
Well, then you should pip3 install --upgrade cryptography ... |
by the way i installed cryptograpy (pip install cryptography) and somethings is changed... ~/Downloads/tuyadebug $ python3 test.py bla bla bla Now i can't start robot cause my wife will kill me... :-) I canmake some try tomorrow morning if this result is what you aspected.. i didn't try PR #79 |
OK now the script is working. |
My phones are switched off, HA stopped: ~/Downloads/tuyadebug $ sudo systemctl stop home-assistant@homeassistant ~/Downloads/tuyadebug $ python3 test.py n |
Mmm it is still refusing connections... maybe a different protocol? Try to add 3.1 at the end and see if it goes. |
i don't know if i understood... Now i can't do nothing. tomorrow i will try tho reboot the vacuum and i let you know. |
HABEMUS PAPAM!!!!! :-) So, these are the DPS Dump in different state: Vacuum IN THE DOCK (IN CHARGE)
Vacuum In STOPPED MODE ( OUT THE DOCK) Stand-By
Vacuum STARTED
Vacuum started with program turn back at home
Thank you!!! |
@rospogrigio sorry, i think i made my try with protocol 3.1, because my last try yesterday was python3 test.py BLABLA 1.2.3.4 XXXXXXXXXX 3.1 Now i just re-runned the command withot 3.1 at the end, ( python3 test.py BLABLA 1.2.3.4 XXXXXXXXXX ) and protocol changed in protocol 3.3. :Detecting list of available DPS of device XX [XX], protocol 3.3. I don't know if this info is important, and if you need that i try again all states with different command (without 3.1 at the end). |
Good, you can ignore the 3.1/3.3 thing, we have the DPs. Now it's time to try to understand what each of the DPs refers to, also with the help of what you see in the Tuya app. |
Vacuum IN THE DOCK (IN CHARGE)
STOPPED OUT THE DOCK (Stand-BY)
STARTED with SMART program and with LOW air flow
STARTED with "WALL FOLLOWING" program and with MEDIUM air flow
** STARTED with "SPIRAL" program and with HIGH air flow **
** STARTED with "RANDOM" program and with LOW air flow **
** STARTED with "MANUAL" program - In this program i can direct Vacuum from smartphone or remote control **
** Started with program "BACK HOME" - Come back to dock - **
|
OK OK OK @RobyDomo please don't flood the conversation like this.
This is a start. Please edit your post and reduce it to a little less cases because it's really huge. |
@rospogrigio SORRY!!!! Edited post with essential info... Thank you very much!!! |
As we saw from DPS 5, your device has only 7 states available:
It should already work correctly. If it is not showing the current status/program/fan speed, then we have to debug what is going on. Please confirm that none of these is working, and I'll add some debug instructions to understand why.
This is impossible, unless we understand where are this info located within the DPs... but I believe this info are shared with the app in some other way. |
Tuya App works that when i press stop the vacuum stop to clean and cancel the program, but i don't care. For me is OK in this way. These are a debug: STOP
And this is in Pause State:
I can't see differnece. But for me, what you have done is OK.
For me doesn't work: Thank you again for all your time!!! :-) |
Are we in a state so I should review this, @rospogrigio? |
Well actually I am still pondering whether supporting fully RobyDomo's device, making Stop and Pause command behave differently (Stop switches off the vacuum). You can give it a look so I can correct the issues you might find, but expect more commits to come. |
@postlund , a question about hacs/default#662 : the only check that fails is about the fact that this repo is a fork: is there any way to fix this, detaching from mileperhour's repo? I'm wondering whether our PR is not being reviewed because they see a "fail" mark beside it... |
@rospogrigio I don't think I have any opinion when it comes how that works. From an overview perspective I guess I would expect pause to just "pause" what is currently happening, play resume a "pause" (or start a new round of docked) and stop would abort everything and make the robot go back to base. Do we really need to support everything? It would probably be better to do MVP and extend functionality in additional PRs, just so we don't get stuck. It would also help us get feedback from more users as the functionality would actually ship in the next release. Agree? I've been thinking about the failed check too, but since the docs say that it's ok that it fails I assumed it was ok. Let me try to take a bullet... |
Hi I was searching around how to replace tuya cloud in my Ikohs netbot LS23 and this plus what was already build in valetudo (tuya fake services injected inside xioami vacuums, that also use tuya) could be used to improve this support by checking that they did for any missing feature |
@postlund @rospogrigio is there a status update on this? I've just received a new robot vacuum and I'd love to make use of this! Edit: For now I'll be used this, but based on the fact that both are using the Tuya platform I'm pretty sure I should be able to switch over in the future. |
hello @rospogrigio what Can I do to add my vacuum by flow? Do I have to replace some files to test it? and thanks for all your hard work!! |
Hi, just dropping in with a quick note. I had to add |
@rospogrigio @postlund Do you plan to continue working on this area? |
@unfilet I would love to see this merged, I don't have time nor any tuya compatible vacuum to test with though. Best would be if someone took over the PR, perhaps started fresh to clean up the history a bit and also got hold on some users to test it. I can do general code review. Having code owners/primary maintainers per platform would be ideal IMHO. |
I can't commit to taking over the PR (no time!), but I have a Lefant M501B and have it working on this branch of the custom component. Happy to help test if this is going to go forward! |
I tried to merge the master's branch but my knowledge of python is not enough to do it correct. I have a “liectroux c30b” for test. DPS [1] VALUE [True] |
And my config:
|
Hi guys! I'm currently working on this integration but I'm not sure what is the actual progress of this branch so I'm going to share what I was doing and please let me know if it can be helpful for this branch. What I have already done:
What I'm currently working on:
So let me know if you want this to be integrated in a new branch or PR as I'm not sure what is the actual status of this component... |
Hi! I already have a functional custom card based on this: Xiaomi Vacuum Card . Currently looks like this: I'm not a frontend developer so I'm having trouble with the dropdown to select mode/fan speed. It's currently working but doesn't look good: Could be better to show the dropdown just under mode/fan speed and add some kind of arrow icon like the native HA dropdowns. If someone can help with this pleas let me know to share you the code! |
@rikman122 Do you have working code/branch of integration, so we can test it at least |
@timota No, I'm currently working locally waiting for @rospogrigio and @postlund to let me know the progress on this PR. I'm not sure if this is out of date nor I should create a new branch |
Maybe @postlund 's reply to a different contributor is helpful: #425 (comment) |
Thanks for your work so far. I'm currently using cloud based access in HA but will try this with my S5Max once it gets to master (I'm currently using climate LocalTuya PR work) |
does cloud based integration supports Vacuum ? |
I'm not completely following, but I'm using a custom component for roborock |
Is this still ongoing or am I missing something? |
Introduced vacuum platform.