Giter Site home page Giter Site logo

Comments (22)

rytilahti avatar rytilahti commented on August 28, 2024

Hi, that's odd. Maybe the robot just wasn't responding to those discovery packets? Could you try it again multiple times, for some reason the vacuum does not always answer to those calls but I'm not sure what's the cause for it.

from python-miio.

FabioDeMiranda avatar FabioDeMiranda commented on August 28, 2024

I tried it from the raspberry PI I have HA and it's happening the same thing...

I can ping the vacuum and I tried to ssh, but I'm getting "ssh: connect to host 192.168.8.1 port 22: Connection timed out".

I didn't read the post you used to create the script or took a look at you code, so I don't know what I should expect.

What I can say is that I did upgrade the firmware the first time I used the app...

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

The vacuum doesn't accept incoming connections, port 54321 is the only way currently to communicate with them. You could try to see with wireshark if the device responds something to those discovery packets, other than that I can't really help without more information.

from python-miio.

FabioDeMiranda avatar FabioDeMiranda commented on August 28, 2024

I had to change s.sendto(helobytes, (addr, 54321)) to s.sendto(helobytes, ('192.168.8.1', 54321)) and get the response on wireshark, after that I could use the token with everything else... I'll try the HA integration now.

Thanx anyway!

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

Nice to hear you got it working, did you get it working with that on Windows or on Raspberry pi?

from python-miio.

FabioDeMiranda avatar FabioDeMiranda commented on August 28, 2024

After getting the token from wireshark it's working on both and on HA.

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

Hi, I am trying to discover it but I have the same behavior :

INFO:mirobo.vacuum:Sending discovery packet to with timeout of 5s..
INFO:mirobo.vacuum:Discovery done

I am using windows 10 with pycharm, python 3.6 in a virtualenv.
I reset wifi on vacuum and I reset the vacuum. I connected my wifi laptop to the rockrobo-xxxx. Then under pycharm (virtualenv) I did the discover.

I tried many times. I tried to set the timeout to 20s but nothing better.

I can try something with wireshark but I am not confident with it.

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

This sounds like that is not working correctly on windows (10?), so I'll reopen this for now. Unfortunately I have no time to put into this, but maybe someone with a windows installation can help me out?

Another possibility would be to just "broadcast" the message to that static IP for now but I feel that's the wrong way to do it (although sofar this IP has been always used by this vacuum afaik).

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

Great to hear that you got it working!

As the robot is always on that given IP, maybe it makes sense at least to allow using a static IP for the discovery, so let's keep this issue open.

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@pulse-mind @FabioDeMiranda The same problem, the use of windows10 under the following PIP3 virtualenv interface error. I have reset the vacuum, I would like to ask you how to solve it? Please tell me the order, thank you!
Error condition:
INFO:mirobo.vacuum:Sending discovery with timeout of to 5s..
WARNING:mirobo.vacuum:error while discover results: 22] Invalid [Errno reading argument

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

I do not know how to do the discover with python and how to adapt this code.
But I explained another solution to get the token. Have a look in the previous messages.

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@pulse-mind
Thank you, I am sorry, I read the news or do not understand what the use of tools or applications to get the token, you can step in detail the steps?

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

The tool here is great. It can does a discover = display the token. And then it can get the information of the vaccum and send commands. But to get the information and to send commands, you need the token. The token is used to encrypt and decrypt the command. Without the token it is "impossible" to communicate with the vacuum.
In my previous comments I explained how to do it with windows 10. I am using a software called "packet sender" to send packets to an IP (the IP of the vacuum after a reset).

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@pulse-mind Thank you. I'll try it when I get home! Thanks for reply!

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@pulse-mind * open packet sender (portable) * hex:21310020ffffffffffffffffffffffffffffffffffffffffffffffffffffff, port:54321, ip:192.168.8.1, protocol: UDP * send * in sixteen hexadecimal answer, the last 16 characters (not counting spaces).
Is this a step? Is to send hex:21310020ffffffffffffffffffffffffffffffffffffffffffffffffffffff???

from python-miio.

pulse-mind avatar pulse-mind commented on August 28, 2024

yes.
Be sure to switch your wifi connexion to the wifi of the robot not your usual wifi otherwise it won't work.
The robot will answer by providing its token in the answer

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@rytilahti Thank you!! The article said that yesterday to see over the notebook computer can install the Mi application can capture. I haven't tested it yet!

from python-miio.

1043717432 avatar 1043717432 commented on August 28, 2024

@pulse-mind Thank you It has been successful!

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

Considering that the new discovery is done over mDNS, and that the "handshake" discovery is sent to the given IP when executing any commands, I think this can be closed now.

from python-miio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.