[NO LONGER SUPPORTED] Ask Alexa

That is probably the nicest thing I have heard today! Thank you for the kind words!

I am not sure the ‘motion’ thing is an issue…it is by design. The real ‘issue’ with anything voice is relevance…If you put the sensor as a temperature monitor, the ‘assumption’ is that its primary job IS sensing the temperature. Motion is a bit more transient than temperature as it is just a slight moment in time, and the ‘relevance’ while a temperature sensor is almost irrelevant. If I check the temperature right now and it is 85, and then check it in 5 minutes, it will probably be around 85. However, 10 motion events could have happened and unless you capture it RIGHT during the 15 seconds the sensor is activated, you aren’t seeing the true picture. However, I DO see your point as the ‘additional attributes’ at that point become misleading as it isn’t telling you ALL of the additional attribute.

That being said, you sensor (if additional attributes are on) should show temperature AND humidity in the same report. I thought THAT was the issue, but your output seems to indicate it IS working as I would expect it.

So, based on my manifesto above, do you feel that motion SHOULD be included with this? I personally feel it shouldn’t because of its transient nature, but I could be convinced. And yes…UV is an issue with these devices as I have read and very few apps support it.

As for the invocation name, yeah…that happens and I am rather convinced there is SOMETHING on Amazon’s side. One suggestion I failed to mention…while most people forget about the ‘training’ in the Alexa app (the Amazon one), I have heard it DOES actually help…you may want to try it.

Let me know about the motion thing!

Alexa said the Lambda code I was using was not correct. I updated the Lambda code to 1.2.7 but when I tried to save I get the error: The Code tab failed to save. Reason: [object Object]. The app code lines from the log were added to the section in Lambda.

Did you ensure you have the Token and AppID in the lines, copied from your app’s setup page?

Yes I pasted all three lines: STappID, STtoken and url.

And it is Alexa telling you that you don’t have the correct Lambda? There isn’t anything different with the code from a couple days ago; can you send me HOW you know it is bad code and then try to copy/paste it again from the GitHub (ensuring you do a fresh copy from your setup variables)?

It started last night saying:
I am unable complete your request. The version of the Lambda code you are using is out-of-date. Please reinstall the latest code and try again.

I just refreshed the setup variables and repasted the new STappID, STtoken and url. Still get the same error message: The Code tab failed to save. Reason: [object Object].

I am with you 110% on the logic that if a reading is extremely transient, then one could possibly make a very valid argument that it may not be relevant to a readout that is configured for “additional attributes.” BUT… here is where my logic diverges: Why is it that a device that is configured as a motion sensor should also report Luminance and Temperature as additional attributes, but not Humidity? Is Humidity considered a transient attribute? Based on your argument above, I would think the answer is no, and that Humidity deserves to be included as an “additional attribute” along with Luminance and Temperature under a motion sensor readout. If Humidity is not considered relevant, then shouldn’t Temperature and Luminance also be considered irrelevant?

P.S. I am just having fun with philosophy and logic here at this point… I hope no emotion or strong feelings are being interpreted in any way here. Just enjoying the discussion!

P.P.S. Oh by the way I completely forgot to put in a Feature Request earlier! What are the chances that you could tweak the macro behavior for temperature changes to mimic the native Routines behavior? Currently I have my macros calling out to routines with only temperature settings (and nothing else) in order to work around the currently static nature of macros with regards to thermostat temperature settings.

Point well taken…Looking back at my notes when I created this (I had me Aeon, but also other motion sensors) was that MOST motion sensors didn’t have humidity readings on it. And, some temperature readings didn’t do humidity, and all sensors sold from SmartThings that were humidity sensor we were not motion sensors. What may not be visible on the surface is that for most devices are not polled for their capabilities, but from what I had in my own house or read about that were available…so it just doesn’t go through WHAT a device can do, but what I thought it did at the time. That being said, I can easily add this…

As do I…programming is an art and a science…as such, a programmer has to balance giving everything verses what is relevant (or what THEY consider relevant). :slight_smile:

I am not clear what you are asking for here. Can you be a bit more specific on what it is doing and what you would like it to do?

Thanks! Good discussion.

1 Like

Everything in Ask Alexa’s world is tied together…you can’t have a different version of the Lambda code that doesn’t match the IDE code…did you just update one and not the other? Your main app should be 2.2.7, and that should match the 1.2.7 for the Lambda code…It sounds like you updated one without the other.

If you have verified everything and it still isn’t working, please PM me and I will go into specific things you can look at to determine what is going one.

Everything on my IDE page is showing black but it’s showing version 2.4. The mobile askAlexa app is showing 2.2.7.

I assume you mean 2.2.4? It almost sounds like your IDE isn’t registering changed…If you go to the main mage, and About, you should see a dropdown for all of the versions…If you have them installed, these are the latest that should match up with what you should have:

The latest version of each of the applications listed in this document (as of 6/17/17)
Ask Alexa : 2.2.7
Lambda: 1.2.7
Voice Reports 1.0.2a
Weather Reports 1.0.2a
Schedules: 1.0.2
Message Queue: 1.0.3

If you need to update, the links to the code versions are here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Latest_Version

I followed the links to the latest Lambda code but then it gives me that error when trying to save it. The view details under my smartapps is now showing 2.399999 instead of 2.4. I went to my location>installed smart apps>askAlexa. I don’t see any versions for askalexa there.

I’ll go through the steps again on my home computer in a little bit as soon as I get off work.

In the current implementation of Ask Alexa macro logic for Thermostats, users are forced to choose whether they want to set either a cooling temperature or a heating temperature, but not both. The result is that the user must either manually edit the macro each time their thermostat unit switches from heating to cooling and vice versa, or have two duplicate copies of the same macro but one with a cooling temperature and another with a heating temperature. The native SmartThings “routine” concept doesn’t have this limitation, as it allows you to set both a heating temperature and a cooling temperature, and intelligently only applies the one applicable given the current state of the thermostat (heating|cooling). During seasonal shifts (e.g. Winter → Spring, Summer → Fall, etc.) it is very common for me to switch the thermostat from heating to cooling or vice versa depending upon Monday night forecasted to be 55 degrees (f) and tuesday night forecasted to be 85 degrees (f). When I tell Ask Alexa that I’m going to bed or waking up, those macros have temperature changes in them. But depending upon the day of the week, the AC might be on, or the heater might be on. To solve for that, I’ve eliminated temperature control from the Ask Alexa macro and told it to call out to a native SmartThings routine which has the appropriate heating+cooling temperatures set in it.

There is nothing that is version 2.4…something is screwy somewhere :frowning:

Ah…I get it…You are referring to Control Macros? Unfortunately that is another design choice that was rooted in the fact that if you set both of them and you are in the wrong mode (On the thermostat) you might get an error or not the expected results. Again, this was the results with my Nest Thermostat…Probably time to reexamine that logic as well. The issue is (at least with the Nest) is the polling interval…I can manually set the device all day long, but it could take a while for the DTH to recognize that. So, in theory, you could be in heating mode and send a cooling setpoint because it thinks it is in cooling mode. Nest is probably NOT a good example because the integration is not even native…but again, it was a design choice based on when I did it (about a year ago as well). So, you are not wrong. However, the fact that you do this with a routine (I assume through Ask Alexa) means it DOES accomplish the goal…giving you the tools to do what you want.

I will add this to my list to re-examine…

I am not sure where the version numbers come from in that area. My bet is that it is some internal system with GitHub. Again, if Alexa is telling you that you have the wrong version, either your Lambda or your IDE code is out of date. You can easily look at this in your app on your mobile device. Can you produce a screenshot of that with the version numbers expanded (in the About Ask Alexa area at the bottom of the main menu). You can also look at the first couple lines of the IDE code for Ask Alexa… I put the version number right there…you should have 2.2.7a

Notice what mine says…I feel that version stuff is from GitHub or some internal numbering system:

Ok…your Lambda code is out of date…the current version is 1.2.7. Is THIS the area you are having trouble updating in AWS?

The link to the raw code is here: https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/smartapps/michaelstruck/ask-alexa.src/Node.js

You should be able to easily upgrade, unless of course, AWS is having issues…I just checked mine (N Virginia) and it worked for me. Be sure to copy and save your Token and AppID.

Let me know if you get it…Sorry for the circular discussion here…I thought you mentioned you had updated to 1.2.7.