The error interface declares here "The different ErrorResponse types don't always result in different responses spoken by Alexa." but does not provide the responses for those that do.
What are the responses provided by each error that provides a custom unique response?
Really only interested in V3 directives. I'm not concerned with V2 backwards compatibility at this point.
Here's what I have so far:
Alexa.ErrorResponse
ALREADY_IN_OPERATION:
"I'm not quite sure what went wrong."
BRIDGE_UNREACHABLE:
"Sorry, the hub that device DEVICE_NAME is connected to is not responding. Please check it's network connection and power supply."
ENDPOINT_BUSY:
"Sorry, the device DEVICE_NAME is not responding."
ENDPOINT_LOW_POWER:
"By the way, the device's battery is low."
ENDPOINT_UNREACHABLE:
"DEVICE_NAME isn't responding. Please check it's network connection and power supply."
EXPIRED_AUTHORIZATION_CREDENTIAL:
"Sorry, something's wrong. To control DEVICE_NAME try disabling the skill and re-enabling from the Alexa app."
FIRMWARE_OUT_OF_DATE:
"Sorry, DEVICE_NAME has outdated firmware. Please visit the device manufacturer's app to update the firmware."
HARDWARE_MALFUNCTION:
"Sorry, DEVICE_NAME appears to be malfunctioning."
INSUFFICIENT_PERMISSIONS:
?
INTERNAL_ERROR:
"DEVICE_NAME isn't responding."
INVALID_AUTHORIZATION_CREDENTIAL:
"Sorry, something's wrong. To control DEVICE_NAME try disabling the skill and re-enabling from the Alexa app."
INVALID_DIRECTIVE:
"DEVICE_NAME doesn't support that."
INVALID_VALUE:
"That command doesn't work on device DEVICE_NAME."
NO_SUCH_ENDPOINT:
"I couldn't find a device or group named DEVICE_NAME in USERS profile."
NOT_CALIBRATED:
?
NOT_SUPPORTED_IN_CURRENT_MODE:
Inclusion of currentDeviceMode:
COLOR: "That only works when light is set to a shade of white."
NOT_PROVISIONED, OTHER or ASLEEP: "DEVICE_NAME is in a mode that doesn't accept requests. Please change its mode in the app or on the device."
Exclusion of currentDeviceMode:
"Hm. DEVICE_NAME is not responding."
NOT_IN_OPERATION:
"I'm not quite sure what went wrong."
POWER_LEVEL_NOT_SUPPORTED:
"I'm not quite sure what went wrong."
RATE_LIMIT_EXCEEDED:
"DEVICE_NAME has reached the maximum number of requests it allows. Please try again later."
TEMPERATURE_VALUE_OUT_OF_RANGE:
"I can only set the temperature between MINIMUM and MAXIMUM."
VALUE_OUT_OF_RANGE
"That value is out of range for device DEVICE_NAME."
Alexa.Cooking.ErrorResponse
DOOR_OPEN:
?
DOOR_CLOSED_TOO_LONG:
?
COOK_DURATION_TOO_LONG:
?
REMOTE_START_NOT_SUPPORTED:
?
REMOTE_START_DISABLED:
?
Alexa.Video.ErrorResponse
ACTION_NOT_PERMITTED_FOR_CONTENT:
?
CONFIRMATION_REQUIRED:
?
CONTENT_NOT_RECORDABLE:
?
NOT_SUBSCRIBED:
?
RECORDING_EXISTS:
?
STORAGE_FULL:
?
TITLE_DISAMBIGUATION_REQUIRED:
?
TUNER_OCCUPIED:
?
Related
The story behind it: I'm trying to command an Android box (with a proprietary launcher) that also manages TV channels. To enter the channel section it is not sufficient to type a number, but a specific key must be pressed. I want to find a way to replicate that key, and then use this command on Home Assistant. I could try with a bluetooth sniffer, but it will be after the failure of my actual attempt.
I ran this adb command after pressing the specific key for TV channels:
adb.exe shell dumpsys activity broadcasts history
And the last broadcast in history is this (timvision is the name of the box):
Historical Broadcast foreground #0:
BroadcastRecord{560a0f4 u0 android.intent.action.GLOBAL_BUTTON} to user 0
Intent { act=android.intent.action.GLOBAL_BUTTON flg=0x10000010 (has extras) }
targetComp: {timvision.launcher/timvision.launcher.TimVisionKeyReceiver}
extras: Bundle[{android.intent.extra.KEY_EVENT=KeyEvent { action=ACTION_UP, keyCode=KEYCODE_LAST_CHANNEL, scanCode=377, metaState=0, flags=0x8, repeatCount=0, eventTime=10092564, downTime=10092515, deviceId=27, source=0x301, displayId=-1 }}]
caller=android 3514:system/1000 pid=3514 uid=1000
enqueueClockTime=2022-04-16 14:43:54.577 dispatchClockTime=2022-04-16 14:43:54.578
dispatchTime=-3s691ms (+1ms since enq) finishTime=-3s502ms (+189ms since disp)
resultTo=null resultCode=0 resultData=null
nextReceiver=1 receiver=null
Deliver +189ms #0: (manifest)
priority=0 preferredOrder=0 match=0x0 specificIndex=-1 isDefault=false
ActivityInfo:
name=timvision.launcher.TimVisionKeyReceiver
packageName=timvision.launcher
enabled=true exported=true directBootAware=false
resizeMode=RESIZE_MODE_RESIZEABLE
Is possible to replicate this broadcast ? I tried this (with extra_key values too) but seems is not allowed:
adb.exe shell am broadcast -a android.intent.action.GLOBAL_BUTTON -n timvision.launcher/timvision.launcher.TimVisionKeyReceiver
Error:
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.GLOBAL_BUTTON from pid=32487, uid=2000
Alternatives or ideas are welcome.
Thanks
It is not the solution to the question but it is the solution to my problem. So I post it.
The key to enter in the TV channels section is listed on the official Android documentation and is KEYCODE_LAST_CHANNEL with code 229.
On Home Assistant the service to launch is this:
service: androidtv.adb_command
data:
command: input keyevent 229
target:
entity_id: media_player.your_android_tv_entity
I recently got myself a new PC(Predator Helios 300) and I wanted to start using aws there but when I try to perform amplify init I get the error below even though I already did all the other steps such as configuration.
× Root stack creation failed
init failed
{ SignatureDoesNotMatch: Signature expired: 20190427T235724Z is now earlier than 20190428T094952Z (20190428T095452Z - 5 min.)
at Request.extractError (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\protocol\query.js:50:29)
at Request.callListeners (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
at Request.emit (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\request.js:683:14)
at Request.transition (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\state_machine.js:14:12)
at C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\request.js:685:12)
at Request.callListeners (C:\Users\sahve\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\aws-sdk\lib\sequential_executor.js:116:18)
message:
'Signature expired: 20190427T235724Z is now earlier than 20190428T094952Z (20190428T095452Z - 5 min.)',
code: 'SignatureDoesNotMatch',
time: 2019-04-27T23:57:24.753Z,
requestId: 'ab179ef3-699b-11e9-bfe3-4ddc7ceb66ee',
statusCode: 403,
retryable: true }
After doing some research It seems to be a verification problem. Does anyone has experience with this or knows how to resolve this issue. Thanks a lot!
Any time you see an error like "is now earlier than" around some numbers that look like timestamps (20190427T235724Z -> 2019-04-27 23:57:24 UTC), that's an indicator that the error is time related. Time matters for cryptography in order to validate certificates (so that an attacker cannot break a certificate and use it after its expiration, among other reasons) [1]. In this case, either your clock or the remote server clock is wrongly set. Since the remote server in this case is AWS, it is highly unlikely that they have any significant clock drift, leaving you as the possible outlier.
Given that you mentioned a new computer, it is even more likely that this is due to an incorrectly set system clock.
Reset/synchronize your system clock and the error should disappear.
Reference [1]: https://security.stackexchange.com/q/72866/47422
My camel route tries to pick up some files from sftp, transfer them to network, and delete them from sftp. If the sftp is unreachable after 3 attempts, I want the route to send an email warning the admin about the problem.
For this reason my sftp address has the following parameters:
maximumReconnectAttempts=2&throwExceptionOnConnectFailed=true&consumer.bridgeErrorHandler=true
In case the network location is not available, i want the route to notify the admin and not delete the files from sftp.
For this reason i have set .handled(false) in onException.
However, when connecting to sftp fails, aggregation also fails and no emails are coming. I have made a minimalist example below:
/configure
onException(Throwable.class)
.retryAttemptedLogLevel(LoggingLevel.WARN)
.redeliveryDelay(1000)
.handled(false)
.log(LoggingLevel.ERROR, LOG, "XXX - Error moving files")
.to(AGGREGATEROUTE)
.end();
from(downloadFrom)
.to(to)
.log(LoggingLevel.INFO, LOG, "XXX - Moving file OK")
.to(AGGREGATEROUTE);
from(AGGREGATEROUTE)
.log(LoggingLevel.INFO, LOG, "XXX - Starting aggregation.")
.aggregate(constant(true), new GroupedExchangeAggregationStrategy())
.completionFromBatchConsumer()
.completionTimeout(10000)
.log(LoggingLevel.INFO, LOG, "XXX - Aggregation completed, sending mail.");
In the logs i see:
16:02| ERROR | CamelLogger.java 156 | XXX - Error moving files
Then the logs for the Exception occurring during connection.
And then this:
16:02| ERROR | FatalFallbackErrorHandler.java 174 | Exception occurred while trying to handle previously thrown exception on exchangeId: ID-LP0641-1552662095664-0-2 using: [Pipeline[[Channel[Log(proefjes.camel_cursus.routebuilders.MoveWithPickupExceptions)[XXX - Error moving files]], Channel[sendTo(direct://aggregate)]]]].
16:02| ERROR | FatalFallbackErrorHandler.java 172 | \--> New exception on exchangeId: ID-LP0641-1552662095664-0-2
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://user#mycompany.nl:22
at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:149)
I do not see "XXX - Starting aggregation." which i would expect to see in the log. Does some kind of error occur befor aggregation? The breakpoint on aggregate(*, *) is never reached.
First, I just want to clarify something. You write "In case the network location is not available, i want the route to notify the admin and not delete the files from sftp", but shouldn't that be obvious anyhow? I mean, if the network location is not available, wouldn't deleting the files from sftp be impossible?
It's a little confusing that your exception handler is also routing .to(AGGREGATEROUTE). Given that you want to email an admin, shouldn't that be in the exception handler, not in the happy path? Why would you and how would you "aggregate" a connection failure?
Finally, and here I think is a real problem with your implementation, you may have misunderstood what handled(false) does. Setting this to false means routing should stop and propagate the exception returned to the caller. I'm not sure what having to the .to(AGGREGATEROUTE) would do in this case, but I'm not surprised it's not being called.
I suggest trying a few things. I don't have your code so I'm not sure which will work best. These are all related and any might work:
Change handled(false) to handled(true).
Replace handled with continued(true).
Use a Dead Letter Channel.
Reference:
Handle and Continue Exceptions
Dead Letter Channel
Since errorhandling is different depending on which endpoint causes the error, i have solved this by having two different versions of onException:
//configure exception on sft end
onException(Throwable.class)
.maximumRedeliveries(2)
.retryAttemptedLogLevel(LoggingLevel.WARN)
.redeliveryDelay(1000)
.onWhen(new hasSFTPErrorPredicate())
// .continued(true) // tries to connect once, mails and continues to aggregation with empty exchange
//.handled(false) // tries to connect twice but does not reach mail
.handled(true) // tries to connect once, does reach mail
// handled not defined: tries to connect twice but does not reach mail
.log(LoggingLevel.INFO, LOG, "XXX - SFTP exception")
.to(MAIL_ROUTE)
.end();
// exception anywhere else
onException(Throwable.class)
.maximumRedeliveries(2)
.retryAttemptedLogLevel(LoggingLevel.WARN)
.redeliveryDelay(1000)
.log(LoggingLevel.ERROR, LOG, "XXX - Error moving file ${file:name}: ${exception}")
.to(AGGREGATEROUTE)
.handled(false)
.end();
Exceptions occuring at the sftp end are handled in the first onException, because there the hasSFTPErrorPredicate returns 'true'. All this predicate does is check if any exception or their cause has "Cannot connect to sftp:" in the message.
No rollback is required in this case because nothing has happened yet.
Any other exception is handled by the second onException.
I have USB-Modem Huawei E171 with working SIM-card.
I'm trying to send SMS-message using Putty and have 500 error:
AT
OK
AT+CMGF=1
OK
AT+CMGS="+7923*******",145<enter>
>Hello<ctrl-z>
+CMS Error: 500
What can I do? I know that error 500 is unknown error. So I thought that somebody can have ideas about this thing.
I checked the program, which called Huawei Modem, and it successfully sent my SMS. Feels like I didn't do something to initialize the modem.
My modem is Quectel EG95 and below command is workable just for you reference.
AT+CMGF=1
AT+CSCS="GSM"
AT+CMGS="+7923*******" #The number you want to receive sms.
> This is a test msg #Ctrl+Z to send or ESC to cancel.
Refer file is Quectel_EG9x_AT_Commands_Manual_V1.1.pdf
I have this error while trying to connect my RPC client to my RPC server:
Error occurred:5
Some googling showed me the meaning of this error: access denied.
The trouble does not come from the firewall.
Here is the server part, where I specify RPC_C_AUTHN_NONE to let everyone connect:
RPC_STATUS status;
printf("RPC Server Starting...\n");
status = RpcServerUseProtseqEp(
(unsigned char *)"ncacn_ip_tcp",
RPC_C_PROTSEQ_MAX_REQS_DEFAULT,
(unsigned char *)"9191",
RPC_C_AUTHN_NONE);
if (status) { printf("Error:%d\n", status); exit(status); }
printf("RPC Server Configured\n");
Here is the client part raising the error:
RpcTryExcept {
unsigned char szMsg[] = "Client: I can RPC now!\n";
md5(szMsg);
} RpcExcept(1) {
printf("Error occurred:%d\n", RpcExceptionCode());
}
RpcEndExcept
How do I correct this issue, in order to let any RPC client connects?
And in the same order, do you know a good RPC documentation for Windows RPC authentication?
Many thanks!
I have spent some time figuring why this happened, and I provide this answer as I found a solution, in order to help those who might encounter this trouble:
By default, RPC connection are only granted to authenticated clients. This can be changed by editing a registry entry or applying a GPO to disable restrictions for unauthenticated users as specified here.