Amazon Echo Skill Errors

I am having issues with the Amazon Echo skill not always working or very slow response. I checked my logs for the skill and keep getting the following info:

app:102024-01-31 12:05:09.850 AMerrorError making Call to Alexa message gateway: {"header":{"namespace":"System","name":"Exception","messageId":"63a569d4-7316-4d86-9ffc-6715d90c8798"},"payload":{"code":"INVALID_REQUEST_EXCEPTION","description":"com.amazon.iota.container.exception.NoCorrelationSessionFound: No active session found for correlation token : SUdTVEs6AAE6AAg6eyJpZCI6ImMwMjFhMWEzLTJmMDMtNDkxZC04MWZjLWIwOTliMDc4MTJlMyIsInVyaSI6Imh0dHBzOi8vZC1hY3JzLW5hLXAtNWQ1LTc4YWY5Y2QzLnVzLWVhc3QtMS5hbWF6b24uY29tOjk0NDQiLCJzZXNzaW9uSWQiOiJkYjIyMTQxYy02ZTVjLTRmZDQtYTlhMi1lOGNkYWVlNjNkMWYifQ=="}}

Any help appreciated. I am using the C-5 hub

I normally see those when Alexa makes an unprompted announcement.

1 Like

Was troubleshooting this same error today

Error making Call to Alexa message gateway: {"header":{"namespace":"System","name":"Exception","messageId":"5bb2b95d-6b47-4683-b04f-cfb24db90d09"},"payload":{"code":"INVALID_REQUEST_EXCEPTION","description":"com.amazon.iota.container.exception.NoCorrelationSessionFound: No active session found for correlation token : ...

I was using a 'user' momentary switch with my own method calls which was called by an Alexa Routine. By moving the "on" event to be returned solved the problem. Noticed the same using the native "Virtual Switch" when you have the auto off() function allowed.

Here is my updated Virtual driver for inspection:

Virtual Momentary Switch
/**
 *  Copyright 2024 Bloodtick Jones
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Virtual Momentary Switch
 *
 *  Author: bloodtick
 *  Date: 2024-03-10
 */
metadata {
	definition (name: "Virtual Momentary Switch", namespace: "bloodtick", author: "Hubitat") {
		capability "Actuator"
		capability "Switch"
		capability "Momentary"
		capability "Sensor"
	}
}

preferences {
    input(name:"delayTime", type: "number", title: "Time Delay (secs)", range: "1...600", defaultValue: 2)
}

def push() {
    runIn(delayTime ?: 2, off)
    log.info "${device.displayName} was pushed with off delay of ${delayTime ?: 2} seconds"
    sendEvent(name: "switch", value: "on") // needs to be last to make Alexa happy
}

def on() {
	push()
}

def off() {
    sendEvent(name: "switch", value: "off")
}
1 Like