Telldus Live in Amazon Alexa

Moderator: Telldus

r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

kimlood wrote:
kimlood wrote:
r1kkie wrote:Hello Kimlood!
Amazing work with the telldus app for alexa. Works like a charm however there is one thing that doesnt work is on my dimming switches. When I use:
Alexa, increase <device name> by <number> percent
Alexa, decrease <device name> by <number> percent
I get, that command doesnt work on...

Any clue why?
Hi r1kkie,
Can you provide me with the lambda log for when the command is executed? I will look in to it..
Hi again r1kkie!
I have pushed an update to github, please try that and see if it works.
It works for me, but I had initially the same problem as you, set percent did work, but not increase/decrease. However, after some minor changes to the code, it seems to work now.
Hi Kimlood!
I've downloaded the new files from githurb and made a new .jar file and updated the function. However there are no changes, it still doesnt work. Non of the command set **** to **** procent or increas/decrease. :?
Where can I found the log for the commands?
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

r1kkie wrote:
kimlood wrote:
kimlood wrote:[


Hi r1kkie,
Can you provide me with the lambda log for when the command is executed? I will look in to it..
Hi again r1kkie!
I have pushed an update to github, please try that and see if it works.
It works for me, but I had initially the same problem as you, set percent did work, but not increase/decrease. However, after some minor changes to the code, it seems to work now.
Hi Kimlood!
I've downloaded the new files from githurb and made a new .jar file and updated the function. However there are no changes, it still doesnt work. Non of the command set **** to **** procent or increas/decrease. :?
Where can I found the log for the commands?
Hi,
In the lambda service, select monitoring and press any of the boxes, when forward to the cloudwatch, select logs and make the request to Alexa..
One note, please try the commands a few times, I noticed that it took a while for Alexa to notice the changes..
r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

kimlood wrote: Hi,
In the lambda service, select monitoring and press any of the boxes, when forward to the cloudwatch, select logs and make the request to Alexa..
One note, please try the commands a few times, I noticed that it took a while for Alexa to notice the changes..
The log wont show anything when I try does command that doesnt work. Strange. :/
Only shows the successful turn on/turn off.
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

r1kkie wrote:
kimlood wrote: Hi,
In the lambda service, select monitoring and press any of the boxes, when forward to the cloudwatch, select logs and make the request to Alexa..
One note, please try the commands a few times, I noticed that it took a while for Alexa to notice the changes..
The log wont show anything when I try does command that doesnt work. Strange. :/
Only shows the successful turn on/turn off.
Hmm, are you sure you are looking in the correct log?
It should look something like this:

Code: Select all

			INFO: Alexa.ConnectedHome.Control
12:05:57	INFO: Handle IncrementPercentageRequest
12:05:57	INFO: createAndSignRequest url: device/info Parameters: [id:1068213]
12:05:57	INFO: createRequest Parms key: id and value: 1068213
12:05:57	INFO: Dim value: 177.50
12:05:57	INFO: createAndSignRequest url: device/dim Parameters: [id:1068213, level:177.50]
12:05:57	INFO: createRequest Parms key: id and value: 1068213
12:05:57	INFO: createRequest Parms key: level and value: 177.50
12:05:57	INFO: Sending request for id: 1068213
12:05:58	INFO: Response: org.scribe.model.Response@3b938003
12:05:58	INFO: Telldus reply: [status:success]
12:05:58	INFO: Control reply [header:[namespace:Alexa.ConnectedHome.Control, name:IncrementPercentageConfirmation, messageId:77a10a31-affa-4ac6-9e23-40ea077af973, payloadVersion:2], payload:[:]]
12:05:58	END RequestId: fea56bbc-c83e-11e6-8549-0723fceeb29f
Else, send my an email at kim@hoglandet.org, and we will try to setup a online session?
r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

kimlood wrote:
r1kkie wrote:
kimlood wrote: Hi,
In the lambda service, select monitoring and press any of the boxes, when forward to the cloudwatch, select logs and make the request to Alexa..
One note, please try the commands a few times, I noticed that it took a while for Alexa to notice the changes..
The log wont show anything when I try does command that doesnt work. Strange. :/
Only shows the successful turn on/turn off.
Hmm, are you sure you are looking in the correct log?
It should look something like this:

Code: Select all

			INFO: Alexa.ConnectedHome.Control
12:05:57	INFO: Handle IncrementPercentageRequest
12:05:57	INFO: createAndSignRequest url: device/info Parameters: [id:1068213]
12:05:57	INFO: createRequest Parms key: id and value: 1068213
12:05:57	INFO: Dim value: 177.50
12:05:57	INFO: createAndSignRequest url: device/dim Parameters: [id:1068213, level:177.50]
12:05:57	INFO: createRequest Parms key: id and value: 1068213
12:05:57	INFO: createRequest Parms key: level and value: 177.50
12:05:57	INFO: Sending request for id: 1068213
12:05:58	INFO: Response: org.scribe.model.Response@3b938003
12:05:58	INFO: Telldus reply: [status:success]
12:05:58	INFO: Control reply [header:[namespace:Alexa.ConnectedHome.Control, name:IncrementPercentageConfirmation, messageId:77a10a31-affa-4ac6-9e23-40ea077af973, payloadVersion:2], payload:[:]]
12:05:58	END RequestId: fea56bbc-c83e-11e6-8549-0723fceeb29f
Else, send my an email at kim@hoglandet.org, and we will try to setup a online session?
This is what it show when its working:

Code: Select all



20:41:09
START RequestId: f6bbe2a6-c886-11e6-853e-134d702a48fd Version: $LATEST

20:41:10
INFO: [header:[namespace:Alexa.ConnectedHome.Control, name:TurnOnRequest, payloadVersion:2, messageId:1a343089-e377-45d6-acfc-1c2d01af831d], payload:[accessToken:Atza|IwEBINfTqj5IyyIdc3aWCrU4LMuRqdKBGlJ8GOa3PG2xFouuUKPc3I-ILg7L4VbjLXMD-_xuHdYq37PnAZNPOhpXrK4Zqs2HY6rXUeY8ta3Osv9WbGYsYtKbn9e5TmSQCb2yz7v1mKPzCZlCBcFqB5ioNh_VdWSJu2Bi9OPxQ1ymmow6yZRizXJDp0dtklupEYqExs259FonJF0s4Q5ib91lhi2l0PkMwCw0Sgnb9

20:41:10
INFO: Alexa.ConnectedHome.Control

20:41:10
INFO: Handle TurnOnRequest

20:41:10
INFO: createAndSignRequest url: device/turnOn Parameters: [id:851058]

20:41:10
INFO: createRequest Parms key: id and value: 851058

20:41:11
INFO: Sending request for id: 851058

20:41:11
INFO: Response: org.scribe.model.Response@429bd883

20:41:11
INFO: Telldus reply: [status:success]

20:41:12
INFO: Control reply [header:[namespace:Alexa.ConnectedHome.Control, name:TurnOnConfirmation, messageId:1a343089-e377-45d6-acfc-1c2d01af831d, payloadVersion:2], payload:[:]]

20:41:12
END RequestId: f6bbe2a6-c886-11e6-853e-134d702a48fd

20:41:12
REPORT RequestId: f6bbe2a6-c886-11e6-853e-134d702a48fd	Duration: 2190.69 ms	Billed Duration: 2200 ms Memory Size: 512 MB	Max Memory Used: 80 MB

20:50:26
START RequestId: 44441a53-c888-11e6-8faf-a192db12ff3b Version: $LATEST

20:50:26
INFO: [header:[namespace:Alexa.ConnectedHome.Discovery, name:DiscoverAppliancesRequest, payloadVersion:2, messageId:9fd626d5-5678-40ef-820e-940ba4145bc8], payload:[accessToken:Atza|IwEBINfTqj5IyyIdc3aWCrU4LMuRqdKBGlJ8GOa3PG2xFouuUKPc3I-ILg7L4VbjLXMD-_xuHdYq37PnAZNPOhpXrK4Zqs2HY6rXUeY8ta3Osv9WbGYsYtKbn9e5TmSQCb2yz7v1mKPzCZlCBcFqB5ioNh_VdWSJu2Bi9OPxQ1ymmow6yZRizXJDp0dtklupEYqExs259FonJF0s4Q5ib91lhi2

20:50:26
INFO: Alexa.ConnectedHome.Discovery - Sending response

20:50:26
INFO: getDevicesRequest

20:50:26
INFO: createAndSignRequest url: devices/list Parameters: [supportedMethods:1023]

20:50:26
INFO: createRequest Parms key: supportedMethods and value: 1023

20:50:27
INFO: Device request reply: [header:[namespace:Alexa.ConnectedHome.Discovery, name:DiscoverAppliancesResponse, messageId:63e1f992-3700-44a2-8210-6e7484d62330, payloadVersion:2], payload:[discoveredAppliances:[[applianceId:851097, manufacturerName:Telldus, modelName:Unknown, version:1, friendlyName:All Lights, friendlyDescription:Telldus - All Lights, isReachable:true, actions:[turnOn, turnOff], ad

20:50:27
END RequestId: 44441a53-c888-11e6-8faf-a192db12ff3b

20:50:27
REPORT RequestId: 44441a53-c888-11e6-8faf-a192db12ff3b	Duration: 959.33 ms	Billed Duration: 1000 ms Memory Size: 512 MB	Max Memory Used: 85 MB
Korsmann
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Korsmann »

Well, I´ve tinkered with this for the past two days, and cannot get this to work.
Point by point I follow the instructions and I build the JAR successfully:

xxxx-xxxxx-MacBook-Pro:alexa-home-telldus-master 3 xxxx-xxxx$ gradle uberjar
Starting a Gradle Daemon (subsequent builds will be faster)
:compileJava UP-TO-DATE
:compileGroovy
:processResources UP-TO-DATE
:classes
:uberjar

BUILD SUCCESSFUL


Uploading the code to Lambda, but I cannot fathom the test functions, and from this are unable to verify the code.
I set location to Ireland with English (UK) language.

Setting up the Skills works and I get it linked with my Alexa app but when trying to discover devices it will not find any new.

Any takes or thoughts appreciated.
martikainen
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by martikainen »

Try switching to US language everywhere and set it function up in the US aswell, seems to be a good advice for all skills i've read about
kimlood
Posts: 43
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by kimlood »

Korsmann wrote:Well, I´ve tinkered with this for the past two days, and cannot get this to work.
Point by point I follow the instructions and I build the JAR successfully:

xxxx-xxxxx-MacBook-Pro:alexa-home-telldus-master 3 xxxx-xxxx$ gradle uberjar
Starting a Gradle Daemon (subsequent builds will be faster)
:compileJava UP-TO-DATE
:compileGroovy
:processResources UP-TO-DATE
:classes
:uberjar

BUILD SUCCESSFUL


Uploading the code to Lambda, but I cannot fathom the test functions, and from this are unable to verify the code.
I set location to Ireland with English (UK) language.

Setting up the Skills works and I get it linked with my Alexa app but when trying to discover devices it will not find any new.

Any takes or thoughts appreciated.
Yes, as previous responder state, try to switch the location of your lambda. Also verify the lambda logs.. You can also test your lambda by configure a test discovery message, see one of the first post in this thread, there is a link to the Amazon forum, in that you have a test discoverey message. If that works, it's probably the location of your lambda..
Korsmann
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Korsmann »

kimlood wrote:
Korsmann wrote:Well, I´ve tinkered with this for the past two days, and cannot get this to work.
Point by point I follow the instructions and I build the JAR successfully:

xxxx-xxxxx-MacBook-Pro:alexa-home-telldus-master 3 xxxx-xxxx$ gradle uberjar
Starting a Gradle Daemon (subsequent builds will be faster)
:compileJava UP-TO-DATE
:compileGroovy
:processResources UP-TO-DATE
:classes
:uberjar

BUILD SUCCESSFUL


Uploading the code to Lambda, but I cannot fathom the test functions, and from this are unable to verify the code.
I set location to Ireland with English (UK) language.

Setting up the Skills works and I get it linked with my Alexa app but when trying to discover devices it will not find any new.

Any takes or thoughts appreciated.
Yes, as previous responder state, try to switch the location of your lambda. Also verify the lambda logs.. You can also test your lambda by configure a test discovery message, see one of the first post in this thread, there is a link to the Amazon forum, in that you have a test discoverey message. If that works, it's probably the location of your lambda..
Found the test script and that worked OK, no Errors.
Created a new Lambda and changed the region to US-"something", created a new skill.

And, holy crap. It worked, my devices shows and now I just need to set names that Alexa actually understands...

Thanks for the inputs.
r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

Hi kimlood!

I was wondering if it is possible to get motorized blinds to work with Alexa, the command would have to be different like "roll up/ roll down xxx" or something like that?
I have attached a printscreen of the telldus API for one of my devices to show how its recognized in telldus. The commands in telldus is up/down/stop.

Image
Dingboy
Posts: 12
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Dingboy »

kimlood wrote:
Dingboy wrote:Hello again, Kimlood.

I agree... Telldus could and should make an official skill for Alexa.

I would really appreciate your help here. I will try to go through the process as described, but I'm quite new to this way of programming. I have downloaded the "alexa-home-telldus-master.zip" and started the process. I however are already struggling at the second step. What is "uberjar" and where tdo I find the gradlew file that's supposed to be in the gradle folder? I can find such a file in the root of the "alexa-home-telldus-master" folder, but it has no file extension. How do i "run" this type of file?

I have found my keys and tokens and edited them into the Global.groovy file.

Thanks :-)
Hi Dingboy,
Well, scroll up a few posts in this thread, and you will see how to execute the gradlew command.
"Uberjar" is a defined gradle task, that actually package the jar, this is needed since we all have different Telldus keys.

But in short, open a command prompt (Cmd), change the directory to where the telldus-alexa project is.
Then execute the command:

Code: Select all

gradlew uberjar
Hello again, Kimlood.

Thanks for your help the last time. I think I have gotten a few steps closer to my end goal. I however are struggling a little bit with "The ALexa Skill" settings. Please see my screengrab below. I have hidden the "keys" and adresses which I suspect might be unique for my profile. I'm not sure, but I did it anyway just to be on the safe side. Here are some quick questions that I would love if you or someone else could help me out with:

1. Do the settings look like they are generally correct?
2. What is the Authorization URL and what should I enter here?
3. Can you also comment on the "Authorization grant type" and the open cells under here?

Thanks :-)
Image
r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

Dingboy wrote: Hello again, Kimlood.

Thanks for your help the last time. I think I have gotten a few steps closer to my end goal. I however are struggling a little bit with "The ALexa Skill" settings. Please see my screengrab below. I have hidden the "keys" and adresses which I suspect might be unique for my profile. I'm not sure, but I did it anyway just to be on the safe side. Here are some quick questions that I would love if you or someone else could help me out with:

1. Do the settings look like they are generally correct?
2. What is the Authorization URL and what should I enter here?
3. Can you also comment on the "Authorization grant type" and the open cells under here?

Thanks :-)
1. No, the client ID is wrong.
2. I have this: https://www.amazon.com/ap/oa
3. See below

First you need to set up a security profile in amazone developers console. Apps & Services -> Security Profile
Should look something like this:
Image

Here you will get you client ID, Client Secret

Use Auth Code Grant
Scope: profile
For Access token: https://api.amazon.com/auth/o2/token
Dingboy
Posts: 12
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Dingboy »

r1kkie wrote:
Dingboy wrote: Hello again, Kimlood.

Thanks for your help the last time. I think I have gotten a few steps closer to my end goal. I however are struggling a little bit with "The ALexa Skill" settings. Please see my screengrab below. I have hidden the "keys" and adresses which I suspect might be unique for my profile. I'm not sure, but I did it anyway just to be on the safe side. Here are some quick questions that I would love if you or someone else could help me out with:

1. Do the settings look like they are generally correct?
2. What is the Authorization URL and what should I enter here?
3. Can you also comment on the "Authorization grant type" and the open cells under here?

Thanks :-)
1. No, the client ID is wrong.
2. I have this: https://www.amazon.com/ap/oa
3. See below

First you need to set up a security profile in amazone developers console. Apps & Services -> Security Profile
Should look something like this:
Image

Here you will get you client ID, Client Secret

Use Auth Code Grant
Scope: profile
For Access token: https://api.amazon.com/auth/o2/token
Hi R1kkie.

Thank you so much for a very helpful reply. I had not done the security profile as you suggested. I have however fixed that now (I think). It still looks like there is one or two small details that are not correct since I'm not getting the "green" checks on the "Configuration" tabs on the top left.

Is there any more help you can give me? I really appreciate your quick and detailed reply :-)

Image
r1kkie
Posts: 19
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by r1kkie »

Dingboy wrote: Hi R1kkie.

Thank you so much for a very helpful reply. I had not done the security profile as you suggested. I have however fixed that now (I think). It still looks like there is one or two small details that are not correct since I'm not getting the "green" checks on the "Configuration" tabs on the top left.

Is there any more help you can give me? I really appreciate your quick and detailed reply :-)
Dont worry about the green check. I dont have it but it works anyway. Check if your alexa can discover your devices.
And you dont have to do the last two either. :)
Dingboy
Posts: 12
Joined: Fri Mar 17, 2023 9:45 am

Re: Telldus Live in Amazon Alexa

Post by Dingboy »

r1kkie wrote:
Dingboy wrote: Hi R1kkie.

Thank you so much for a very helpful reply. I had not done the security profile as you suggested. I have however fixed that now (I think). It still looks like there is one or two small details that are not correct since I'm not getting the "green" checks on the "Configuration" tabs on the top left.

Is there any more help you can give me? I really appreciate your quick and detailed reply :-)
Dont worry about the green check. I dont have it but it works anyway. Check if your alexa can discover your devices.
And you dont have to do the last two either. :)
Thanks again for the positive and superfast reply, R1kkie :-)

I'm at the office now, but I'll check my Alexa as soon as I get home.

One very good sign tough is that I can find the skill in my "Amazon Alexa" app on my iPhone. It says however that "Account linking required". It has a yellow "Enable Skill" button when I go into the skill in my app, but it fails when i try to do this. It comes back with a page saying "Unable to link your Skill. Please try again later".

Do you think it's a step I have missed?
Does it not have to be "enabled" from the app?
Will this get resolved by "discovering" the devices?

Thanks again :-)
Post Reply