-
Notifications
You must be signed in to change notification settings - Fork 137
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
Espalexa aways returns 255 #49
Comments
I just started using this library today, and when I say "Alexa turn (device) green" it always returns 255 each for R, G, and B. |
Quick update, I removed the devices from Alexa and re-initialized. This time it came up as "Royal Philips Electronics smart device" upon discovery -- previously it was something else. |
MrDadaGuy provided a good hint. When I looked in my device list I have for the Espalexa devices "Light Strip" and "Royal Philips Electronics smart device" on each device. When I had Alexa Forget the "Light Strip" device everything works as designed. The issue is if I rerun Discovery it adds all the same devices with "Light Strip" and I have to go in and delete them for things to work correctly. |
Interesting, never heard of that issue yet! I always only get the "Royal Philips Electronics smart device". Do you have multiple Echo devices on the network? And do you discover via app or voice? I think it might be possible that the device gets added twice because two Echos discover it in different ways... |
"Light Strip" -- yes, that's the other device I had previously removed. To answer @Aircoookie - I have multiple Echo devices -- a couple of Echo Gen 1, a few Dot gen 2, an Echo Show (this has a Hue hub I believe). I was discovering using the Android Echo app. I was also using the android app for most of my testing, and validated using Show and Dot once I got my code working. Edit: I might have initially discovered using the Web interface https://alexa.amazon.com/spa/index.html#appliances |
I've done some more testing and subsequent discoveries (through web interface) will usually result in duplicate devices, one that's a Light Strip, and another Royal Philips Electronics smart device. I am deleting the Light Strip device and things are behaving well. |
I have multiple Echo devices (Gen1, Gen2, maybe one Gen3 not sure on that) but it does not matter if you use voice Discovery or the Web interface it still discovers the two different devices for each physical device. |
Okay, after removing my Dot Gen3 from my environment, deleting my 4 discovered devices, running a discovery from any of the previously mentioned devices/apps finds them as Royal Philips Electronics smart device!?! I will leave the Gen3 offline for a few days and see what happens, if all continues normally I will re-introduce it and let you know what happens. Again, great library |
I want to clarify/correct on my previous statement in that I have only Gen1 and Gen2 devices and they are running the latest firmware. The "Light Strip" only shows up in the app under devices when I run discovery from the app and it does not show up when I run it using voice from either the Gen1 or Gen 2 devices. Using voice I get the "Royal Philips Electronics smart device" and everything works as designed. I have noticed after a router reboot that the "Light Strip" shows up again but that needs to be confirmed to be 100% that the reboot is what caused it to appear. |
I had checked at night and no "Light Strip" was present but this morning it came back. No discovery was initiated by me and the router had not rebooted so it seems that Amazon issued a "Discover Devices" overnight and maybe it is done at some preset intervals. When the "Light Strip" appears you can only turn the devices on but not off so until you delete the "Light Strip" which could be at least once a day it cripples usage. |
@Aircoookie I concur with @CodeNoMore that during the night last night a non-requested discovery took place again replacing the Royal Philips Electronics smart device with Light Strip. I deleted ran voice discovery from Show v1 and all come back to Royal Philips Electronics smart device. 5 hours later they were all back to Light Strip, again with no requested discovery??? I am able to discover Royal Philips Electronics smart device via the Android app sporadically, 2 out of 20 tries during last round of testing, other 18 times shows as Light Strip. Is there anything I can provide, code, debugging logs, etc to help diagnose? |
I am not sure if it matters, but I do have a Phillips Hue Gen2 Hub in my environment, just thought I'd throw that out there. |
Ok, I just had my devices replaced with "light strips" without discovering as well! I'll get back to you once I have something to report! |
Okay, I just pushed an update to mitigate this! |
@Aircoookie I have updated the library and reflashed the board (the library is not yet available via Arduino IDE). All devices were still showing as Royal Philips Electronics smart device so I did not delete them. Everything seems to be working well, will update later. Thanks for the quick update!! |
Everything worked great until this morning, now instead of Light Strip my devices have become Color Light and exhibit the same symptoms (all 255) as before. Since I had not deleted the previous devices prior to this update I have now done that and we are back to working. Will update again later tonight or tomorrow if this happens, or not, again. |
@brentbrooks70 what Echo model are you using? If it is an Echo Dot, you are likely experiencing #6. Downgrading the esp8266 arduino core to v2.3.0 or using |
@Aircoookie I am not running on an esp8266, I am using an esp32 (Adafruit Huzza Feather32) with core 1.0.1. I have several gen2 Dots, an Echo Plus (zigbee hub built in), couple gen1 Shows and a gen3 Dot which I unplugged couple days ago during testing and this seemed to help with the application discover. I think my issue yesterday was because I had not deleted the devices after deploying the new library. When I updated the library my defined devices all still worked so I left them and ultimately they turned into the “Color Light” (which I’m guessing is what you changed Lst001 to ). Since deleting them almost 24 hours ago and re-discovering they have worked perfectly. I will update again in another day to let you know if it is still working or sooner if not. I appreciate all the help,! |
Ah sorry, forgot to mention that important detail! Deleting the old device with the wrong type manually (and probably re-discovering once) seems to be required. |
I just tested the 2.3.4 library and I do not get two devices on a discovery however the single device I get is "Dimmable Light". This always responds with a 255 for a On or Off command so things are different but still not working here. I did delete all the devices before the Discovery and repeated it twice. |
@CodeNoMore you are affected by #6! Try |
I change my code per your suggestion to use the async webserver as I have used that library before. I am glad you put support for it in this project. Things do now work as designed with the minor nuisance of two virtual devices showing up on each physical device in the list. I have several devices so it creates a bit of clutter and confusion. There is a "Royal Philips Electronics smart device" and a "Dimmable Light" the difference being from before is that control functions correctly in spite of having two devices listed for the same physical device. It would be nice to only get one virtual device per physical device showing up in the device list if you know a solution to that issue. |
@CodeNoMore ok, good that it's at least working for now. The two virtual devices are created because of the implementation differences between Echo Dots (1st and 2nd gen) and other Echos (Dot 3rd gen and most big Echos). I don't have an option to patch this, Amazon will need to patch the earlier gen Echo Dots to exhibit the same behavior the other models do. You can try unplugging all your Echo Dots Gen 1 and 2, deleting all devices and discover again to only keep the "Royal Philips Electronics smart device". I don't know how it will take though until "Dimmable Light" appears again after turning on the Dots, since it seems like Echos periodically discover devices automatically without being asked to do so. |
Thanks for the explanation. Unfortunately I spoke a bit too soon as when I add more physical devices some stop or will not work at all with all showing the two virtual names. From my tests it seems that Amazon at least does a discovery every night and maybe more so it does make this basically unusable. Doesn't seem like any options at this point from what you have said since it is 100% on Amazons side. |
I have a slight hunch right now. Can you try deleting all devices in the app, but discovering via voice on your Echo (not Dot) 2 or Echo Dot 3 (you should have one of those, otherwise you shouldn't get Royal Philips devices). That should yield only functional devices, if I'm correct. Otherwise, I'll get back to you once I have news on how to get the library to work properly. |
I disconnected all but one of the ESPAlexa devices to keep it simple and ran voice discovery from the Gen1 Echo (tall). What showed up in the list was "Royal Philips Electronics smart device" and "Dimmable Light". Hope this helps. |
Interesting, this negates my theory that a device is only added from the Echo you voice discover with! @everyone Contrary to what I said previously, 2.5.0 beta 1 apparently DOES have the Content-type bug with the empty body and resulting "always 255" behavior. Please use 2.3.0, 2.4.x with workaround #6 or the async version until the issue is resolved. "Always 255" is unrelated to the "Dimmable Light" vs "Royal Philips Electronics smart device" behavior, although the "Royal Philips Electronics smart device" will work with any Arduino core version because those Echos don't send an invalid content type. |
This has been a bit of a conflaguration as this issue has morphed from how it started. After changing to the async webserver the original 255 issue was corrected as you have stated it should be but I thought that issue was still occurring because of the two different virtual device name which induced the original issue before migrating to the async webserver. That as it turns out was not the case. The two virtual device names for each physical device were being counted against the max number of devices set to 10 in the library. The number of counted devices was times two from the physical so I ran out of devices with the default setting and things stopped working correctly and somewhat erratically. Once I determined this I increase the number of devices using "#define ESPALEXA_MAXDEVICES" and now everything works as designed. Unfortunately there are still two names for each device cluttering up the list but hopefully that will be resolved at some point. |
@CodeNoMore so you are saying, for every |
Hmmm... I checked the IP/espalexa and it only shows one device like it should so that indicates it is only assigning one device within espalexa like it should. I guess at this point I don't have an explanation for what was causing the second issue I was seeing after the switch to the async webserver which ultimately corrected the always 255 issue. |
@Aircoookie Sorry for the delay in reporting back... Since I last updated I have had to delete my discovered devices again, about 70 hours ago, as they had become "Color Light" once more and of course, began returning the ambiguous 255s again. Since then I have had no issue with any unrequested discovery but I have yet to return my Dot gen3 into service. I will do so this evening and see if that changes anything. Again please let me know if I can perform any additional testing for you from my current type board (ESP32) or I have a few 8266s around I could load any combination library/core and have access to Show gen1, Echo Plus gen1, Dot gen2 & 3 and a Look. I do have several VLAN segregated WiFi networks so I could completely isolate a particular board and Echo device to be sure only they could discover/communicate with each other. Not sure if that would be of any value or not. |
Using a previously working sketch it was rebuilt using the latest Espalexa 2.3.3 and the release 2.5.0 for the ESP8266. The return value is always 255 for On or Off much like what occurred with 2.4.2 without the webserver file hack. My understanding was that issue which is related to the Alexa itself was corrected in the 2.5.0 but yet the behavior of the sketch has reverted back to how it worked without the 8266 library hack.
Have you seen this behavior or is there something else I need to do with the 2.3.3 and the 2.5.0?
Thanks, your support is appreciated.
The text was updated successfully, but these errors were encountered: