Telldus Live in Amazon Alexa

Moderator: Telldus

kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

LiTtLe_DeE wrote:Hi thank you for creating this great skill, I would love to use this but I'm afraid I've got stuck right at the start. Tried to compile the .jar file from cd prompt as per the instrctions & received the following error.

Global.groovy: 3: expecting '}', found "static" @ line 3, column 65

-----static string


I got the following four keys from telldus live, 1. a Public key, 2. Private key, 3. Token & 4. Token secret. no "static String secretkey" Can someone tell me how to get the "static String secretkey" for the global groovy file"?

Tia
Hi,
You have an error in your Global.groovy file.
It should look like this:

Code: Select all

class Global {
  static String publictoken = 'PUBLICTOKEN'
  static String secrettoken = 'SECRETTOKEN'
  static String publickey =  'PUBLICKEY'
  static String secretkey =  'SECRETKEY'
}
For the error it looks like the last "}" is missing in the file.
Redferne
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Redferne »

I made some small changes to friendlyDescription and rebuilt the .jar and uploaded. Now Alexa does not find any devices anylonger. The Cloudwatch log looks OK, a complete device list is returned without error.

Now I just saw the javascript implementation of handler looks like:

exports.handler = function (event, context, callback)

the callback is not implemented in Kims java version. Could this be a cause? Anyone? Please advice.
///Redferne
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Redferne wrote:I made some small changes to friendlyDescription and rebuilt the .jar and uploaded. Now Alexa does not find any devices anylonger. The Cloudwatch log looks OK, a complete device list is returned without error.

Now I just saw the javascript implementation of handler looks like:

exports.handler = function (event, context, callback)

the callback is not implemented in Kims java version. Could this be a cause? Anyone? Please advice.
Redferne, you changed something that already is handle and now it does not work? My guess is that your change messed something up.. When doing changes to the code, please link or attach it..

If the clodwatch log looks ok, then the problem is probably that your change is not complient with the Alexa api... So please share your device list response..
Stenskj
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Stenskj »

@kimlood

Thank you for developing this skill. After some tries I managed to get this up and running.

S
netwing77
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am
Location: Austria

Re: Telldus Live in Amazon Alexa

Post by netwing77 »

@kimlood

Thank you for your great support.

Created the jar file and uploaded in us and eu. I have the ability to set the skill level in alexa. After login at telldus live, I get the message: Failed OAuth Request: Unknown request token ""

Do you have a tip for me as I can solve the problem ??

Peter
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Hi Peter,
My guess is that there is something wrong with the keys you entered in Global.groovy. Please verify!
netwing77 wrote:@kimlood

Thank you for your great support.

Created the jar file and uploaded in us and eu. I have the ability to set the skill level in alexa. After login at telldus live, I get the message: Failed OAuth Request: Unknown request token ""

Do you have a tip for me as I can solve the problem ??

Peter
PetriK
Posts: 33
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by PetriK »

Looks awfully complicated...

Cant you just use IFTTT to connect Alexa to Telldus live ? At least thats what I am doing with my Google Home to give speech commands to turn off/on lights, tv and setting temperature using telldus.
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Thanks for the very valuable input!
When this was released IFTTT was not available, if this is to complicated please stick with your setup..
PetriK wrote:Looks awfully complicated...

Cant you just use IFTTT to connect Alexa to Telldus live ? At least thats what I am doing with my Google Home to give speech commands to turn off/on lights, tv and setting temperature using telldus.
LiTtLe_DeE
Posts: 4
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by LiTtLe_DeE »

kimlood wrote:
LiTtLe_DeE wrote:Hi thank you for creating this great skill, I would love to use this but I'm afraid I've got stuck right at the start. Tried to compile the .jar file from cd prompt as per the instrctions & received the following error.

Global.groovy: 3: expecting '}', found "static" @ line 3, column 65

-----static string


I got the following four keys from telldus live, 1. a Public key, 2. Private key, 3. Token & 4. Token secret. no "static String secretkey" Can someone tell me how to get the "static String secretkey" for the global groovy file"?

Tia
Hi,
You have an error in your Global.groovy file.
It should look like this:

Code: Select all

class Global {
  static String publictoken = 'PUBLICTOKEN'
  static String secrettoken = 'SECRETTOKEN'
  static String publickey =  'PUBLICKEY'
  static String secretkey =  'SECRETKEY'
}
For the error it looks like the last "}" is missing in the file.
Thank you, I now have the alexa-home-telldus-master-1.0.jar compiled correctly. I then created the lambda function & uploaded the alexa-home-telldus-master-1.0.jar file but I get this error on the Global fields page of the developer site "Error: A Lambda function ARN should be between 25 and 65535 characters" I cannot proceed any further. Any ideas what I've missed?
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Well, the error message speaks for it self: "Error: A Lambda function ARN should be between 25 and 65535 characters".
Probably you have missed to enter the ARN or have specified the wrong ARN..
LiTtLe_DeE wrote:
kimlood wrote:
LiTtLe_DeE wrote:Hi thank you for creating this great skill, I would love to use this but I'm afraid I've got stuck right at the start. Tried to compile the .jar file from cd prompt as per the instrctions & received the following error.

Global.groovy: 3: expecting '}', found "static" @ line 3, column 65

-----static string


I got the following four keys from telldus live, 1. a Public key, 2. Private key, 3. Token & 4. Token secret. no "static String secretkey" Can someone tell me how to get the "static String secretkey" for the global groovy file"?

Tia
Hi,
You have an error in your Global.groovy file.
It should look like this:

Code: Select all

class Global {
  static String publictoken = 'PUBLICTOKEN'
  static String secrettoken = 'SECRETTOKEN'
  static String publickey =  'PUBLICKEY'
  static String secretkey =  'SECRETKEY'
}
For the error it looks like the last "}" is missing in the file.
Thank you, I now have the alexa-home-telldus-master-1.0.jar compiled correctly. I then created the lambda function & uploaded the alexa-home-telldus-master-1.0.jar file but I get this error on the Global fields page of the developer site "Error: A Lambda function ARN should be between 25 and 65535 characters" I cannot proceed any further. Any ideas what I've missed?
michaelstraub
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by michaelstraub »

Hi, I spent a several hours yesterday to get so far, Lamda is working, at a test my devices is shown, My Telldus style is also there, but when I try to Acivate the Skil an error appears. Is the Authorization URL realy correct, or do I have to place the logon Page from Telldus there? Or is it realy a Amazon problem right now?
screenshots:
https://www.imagebanana.com/s/758/Jh46thER.html
https://www.imagebanana.com/s/758/C4TafiQR.html
https://www.imagebanana.com/s/758/r5qWv2BU.html

Thanks Michael
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

michaelstraub this seems to be a problem with the account linking, so double check the information in the forum for this.
michaelstraub wrote:Hi, I spent a several hours yesterday to get so far, Lamda is working, at a test my devices is shown, My Telldus style is also there, but when I try to Acivate the Skil an error appears. Is the Authorization URL realy correct, or do I have to place the logon Page from Telldus there? Or is it realy a Amazon problem right now?
screenshots:
https://www.imagebanana.com/s/758/Jh46thER.html
https://www.imagebanana.com/s/758/C4TafiQR.html
https://www.imagebanana.com/s/758/r5qWv2BU.html

Thanks Michael
michaelstraub
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by michaelstraub »

Thanks that was my thought but have you seen my Screenshot? The url fits...
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Yes, I have seen your screenshots, but I have not seen how you have setup the security profile. The error message is "Unknown scope provided"´.. look at page 5 in this forum and make sure that all steps are done:
1. Download the files provided by kimlood at https://github.com/kimlood/alexa-home-telldus
2. Go to https://api.telldus.com/keys/index and generate a private token for my users only
3. Insert the keys and tokens in global.groovy file
4. Open cmd and navigate to alexa-home-telldus-master folder
5. Run command gradlew uberjar to build the .jar file. Will be located in the build/lib folder.
6. Go to https://developer.amazon.com/ and hit Alexa -> get started -> Add a new skill
7. Chose “Smart home skill api” and name your skill. Hit next.
8. Go back to skill information to get your Application ID, starts with amzn1.ask…
9. Go to https://console.aws.amazon.com to create the lambda function
10. Search for lambda
11. Hit create lambda function and use blank function
12. Hit the box and chose Alexa Smart Home, in the box below paste your application ID you got in step 8. Hit Next.
13. Name your function, select “Java 8” in Runtime and upload your .jar file.
14. In Handler type: Telldus::handler, Role: Chose an existing role, and in Existing Role: lambda_basic_execution, hit next and then create function.
15. Note the ARN code in the top right corner and copy it for later.
16. Now head to the the developers console where we started and hit next twice to get to “configuration”.
17. In the Redirect URLs, copy the one that begins with http://pitangui
18. Head to https://developer.amazon.com/lwa/sp/overview.html to create a security profile.
19. Hit create security profile and name it and type a description. In Consent Privacy Notice URL type http://example.com/privacy.html and hit save.
20. Hit the gear symbol and chose web settings and then edit and type in the http://pitangui... Address u got in step 17 and then save.
21. Go back to General and you should see some security profile ID and client ID etc.
22. Go back to your skill creation, step 17.
23. Check North America if you have an alexa amazon us account and paste your ARN code from your lambda skill.
24. In authorization URL type: https://www.amazon.com/ap/oa
25. For client ID use the string you get from your security profile.
26. Scope, typ profile
27. Access Token URI: Use https://api.amazon.com/auth/o2/token
28. Client Secret: Paste the Client Secret from your security profile.
29. Hit Next and your done.
30. Go to Alexa skill App and enable it under Skills -> Your Skills. Should redirect you to a sign in page.
michaelstraub wrote:Thanks that was my thought but have you seen my Screenshot? The url fits...
michaelstraub
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by michaelstraub »

Hi Kimlood,

thanks for that perfect instruction, ich I had that it saved me a lot of time :-)

Yes I Have a Sec Profile:
https://www.imagebanana.com/s/759/Zt68XvXz.html

I double checked my settings, the only difference I have is, that I'm using "arn:aws:lambda:eu-west-1....." instead of US location, could that be my problem? And if Yes, which one shoud be choosen?

I what to use german language to talk to Alexa.

regards Michael
Post Reply