-
Notifications
You must be signed in to change notification settings - Fork 176
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
echo dot can't find devices python 3 / Kind of working code end of 2022 #40
Comments
I was figuring this out from 8 am, now it's 3pm. I finally fixed the code and connection works. now I need to fix the turning on and off; Here's the code: |
I fixed everything now, Here's the fully working code, (At least for me it works perfectly) |
So weird because I was literally JUST trying to update this to work with Py 3+ and I ran into this exact same error. And while I am no longer receiving the error, using your code, the devices are still not getting discovered for me sadly. |
@strunker try replugging echo dot (it actually helped me) and try at least 2 times to discover devices without restarting the script. Sometimes alexa just sends different requests. I've left in the code something like basicly uncomment every dbg() Alexa should send something like this: |
@strunker I don't think that it will change something but still try this one: for me it looks like that with the exact code that I posted above: Just in case I use python 3.10.4 Also I've tried https://pypi.org/project/fauxmo/ |
Thanks for trying to help, and yeah it seems to be the problem for me that I never get anything back from the echo device. I have my firewall turned compeltely off on this machine, and turned off my sec product so cant imagine the incoming port is being blocked. I can also browse the .../setup.xml file from a different computer, not just locally to this machine, which indicates there isnt a port issue. Just odd, I never get the Post back, which I asume comes from the echo? As some type of acknowledgement that the switch was added? What do the switches look like in your Alexa app? |
I've forked this repo and have added your code @Vamaka12 so that we can see the differences in a PR. I've had issues with my belkins, as they only seem to work with a 1st Gen echo device. My 2nd/3rd/4th gen devices don't recognise them at all... |
Sure, feel free to do anything with the code. I git cloned your fork and it works, out of the box. Never had belkins, and I only have a single gen 4 echo, so can't really help you with that. |
Alexa doesn't seem to find fauxmo, I tried changing model number to 1.0 in xml.
I tried replacing
urn:Belkin:device:**
inif data.find(b'M-SEARCH') == 0 and data.find(b'urn:Belkin:device:**') != -1:
withupnp:rootdevice
instead ofurn:Belkin:device:**
because when I use
urn:Belkin:device:**
fauxmo doesn't responses at all.and then alexa says that she can't find anything.
maybe it's because of
and
but if I send it directly without bytes() than it gives me error
a bytes-like object is required, not 'str'
same for
data.find('stuff')
If I don't make it
data.find(b'stuff')
then I get
argument should be integer or bytes-like object, not 'str'
code:
fauxmo.zip
The text was updated successfully, but these errors were encountered: