-
Notifications
You must be signed in to change notification settings - Fork 304
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
New Routine Service doesn’t work. #90
Comments
Interesting. Can I see the result of going to this page? You may have to adjust the url for your region. |
If it's not in the list, then the code won't be able to run it. It's odd though that it's in your app.
|
As an FYI, I just fixed a bug in the API unrelated to what you're experiencing, but may cause your test routine to fail if it shows up in the automations list. For now, make sure all routines have 2 items in them. Single items will fail without the fix. |
Sry I used the .com url. It opened up and because of this I did not check .de
Don't have it
I think you mean routine right? I will have a look at this
I tried to run "Gute Nacht" but that did not work to. However I did not look in the logfile when I triggered that. Will also have a look at this and come back |
Correct, sorry, inside the API it's called a sequence so I switch between both.
No, that's not the cause of the log error. The log error you posted at the top of this is saying that the entire 'utterance' key is missing in the data it was scanning. That's happening before it gets to the test routine you found. I think this means there's something in the automation link data that I haven't seen before so I'm parsing it incorrectly. I'll need to see the whole file (scrubbed of course) to really know. |
You have an echo button. I think that's it. I'll need to make the changes to the alexaapi to fix this so you'll need to run a custom version of it once ready. |
So you mean, it will not be possible to to use one version for all usecases? If so, would this mean you will upload und update two versions in your repository? @alandtse Are you ok when I delete those commebts above with possible private information in it. Did you extract all necessary information from it. I am a little carefull with this kind of data. |
Yes, you can delete it. Thanks for providing them.
The following fix should address everything you've reported, but of course let me know if it doesn't. I'm about to sleep so won't be responsive for a while. To install the fix, you'll need to do the following pip install. This will pick up the next version of the alexapy library we're working on. When we do the next version of this component we'll update the version number, I believe it will auto-update you. But if you have issues, you may have to uninstall it manually first. |
The thing is I'm using hassio and I think I cannot do things like that with it. @alandtse is it possible to change that in hassio too? |
I honestly don't know as I don't use hassio. My guess is probably not based off some quick googling. I'm preparing the next version but have one more issue I want to resolve before the next release. |
Ok so I'll wait, could you post it here when the new version is ready fr hassio. After that I'll test if it works and come back. |
The new update works great for last_called issues. But this issue about the routines is still not solved. Nothing in the logs when I try this { I still have the routine "test" in my alexa app. |
Ok, can you please enable the alexapy logs so we can see what exactly is being sent to Amazon when you try to run the routine? |
Ok this is really strange. This never worked no matter how often I tried it. No output in the logs. So I tried another Routine "Washingmachine" and "Dryer". That one worked now for the first time, BUT it doesn't work reliable. So this how it could happen
no response means alexa gives no answer, all of those routines fire a tts message This is a the log of a response called routine then followed by two entries that turn the volume to a certain level and then tts. The no response log looks exactly the same, but is not followed by the volume set and tts. So I looked if it turns on my dummy bulb to two 2%. And in fact it does turn on the bulb. So this is my automation. As I mentioned in another issue, maybe there is a timing issue here?
script (only one, the other one is the same but off)
Do I have to add a delay somewhere to give it more time to make it reliable? There is still the question why the routine "test" doesn't work at all. It works when I do it by voice. |
So if I understand correctly, the issue appears to be a problem during an automation, but if your'e in a script it tends to work? Or are you referring to just running it as a service that it's inconsistent. I may be mixing up the two threads. I guess my question is does this thread topic still seem to be a problem or does it look resolved? I get that it had some strangeness for you. If your'e not experiencing the problem anymore, it may be difficult for us to debug it so we may just want to close it until you get it again. |
There way somethin wrong with the "test" routine, after renaming it, it worked reliable. So the triggering of routines work fine. The logs say the same now, as the dummy bulb is turned on correctly. But it still doesn't work reliable because sometimes after triggering the routine, the volume set and tts are not send to alexa. The automation works reliable (because it turns on the bulb) but tts doesn't get to it every time. Maybe one more thing, that could point in the right direction. I also had this issue with not responding (alltough automation works) before with triggering the routine by voice. This only happened with one of my 3 alexa devices (an echo dot gen 3). The others respond reliable. In conclusion we can say, it makes no difference no if I trigger a routine by voice or with the component. So in fact this issue is closed, but there is still an issue somewhere. |
Is that dot in a place where wifi may be unreliable?
The
If you wanted to test this, you may consider swapping dot locations to see it changes anything. I'll go ahead and close this then. |
The dot has reliable internet and wifi connection. I don't think thats the issue. I set up some delays to see if it gets more reliable in the next days. Will come back. |
@alandtse I don't want to say I found the issue, but this is what I found out. When I put the Sometimes it worked (means volume and tts), sometimes it only worked partially (means volume set, but no tts). Putting both (volume and tts) in different scripts and calling them in an automation after each other with a one seconds delay and it (strange!!) works reliable. I don't understand why it behaves like this. It looks like a timing issue and it's an really unpleasant bug, because it's really hard to debug and as a user you will possible never find this (because to a user both codes make no difference). I found the solution by coincidence. I also don't know who to question about this or where to share it that someone who is able might fix this. Maybe you could point someone with better knowledge here? EDIT: Ok I was too fast, just now it tts also did not work at the first try at another alexa device. One of both always works (mostly volume set, as the white leds indicate, but sometimes even only tts works). This means last_alexa is fast enough to choose the right one. |
I think you may be running into a limitation of what the Alexa API allows. It's similar to some queries in the forum and for the script where people try to do multiple TTS to the same Alexa at near the same time and it doesn't do all of them. We may be able to build a queuing process into the API to build a chain of sequences like an automation routine, but I'm not sure if the API will allow it to be built dynamically. In my testing of the volume change, I always did it after something was playing like TTS. Does it help by flipping the order so the TTS happens first and then the TTS? It may result in some strangeness in the TTS, but I'd also be careful of scripting interactions that Amazon doesn't do with it's own automation routines. So for example, if an Automation routine always has some delay between the volume set and playback, I'd try to mimic that externally. |
If it is possible, this would be great. Sending the volume command after the tts will (as you said) lead to weird tts messages. So I'd like to avoid that.
Is it like this? I don't know? Do they set a delay? |
@alandtse ok so I made a routine with volume set and tts within the app and than triggered that routine. I worked reliable and there was not noticable delay between both comands. Volume led goes on and millisecs after that tts (blue/green led ring) starts. |
@alandtse with 1.2.0 tts works a 100% reliable now. Sometimes the volume set commands still gets missed, but I tried it about 20 times (switching alexa devices) and it always answered. However as I said the volume wasn't set everytime. Specially not when I switched from one to another device (but not a 100% failing rate here, sometimes with volumeset sometimes not). |
@alandtse my routines still don't work a 100% reliable. Sometimes it doesn't work at the first try, but it does always at the second one. |
Ok, so sequence works for me, but I don’t get routines working.
I have a routine called “test” and I tried it this way
but it doesn’t work.
When I say “alexa, test” it works.
This is the error I get when I trigger a script with the data from above.
The text was updated successfully, but these errors were encountered: