Telldus Live in Amazon Alexa

Moderator: Telldus

Post Reply
kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

To enable support for using Telldus Live in Amazon Alexa (Echo/Dot/Tap) you can now use: https://github.com/kimlood/alexa-home-telldus
It's supports on/off/dim and it's built as a Alexa Smart Home Skill.
After deployment tell Alexa: - Discover my devices. When done, all devices can be controlled with Alexa. Please note, that only English (American) and German is rolled out for Amazon Alexa, so be smart in how you name your devices.

You can of course build your own Amazon Echo with these instructions: https://github.com/alexa/alexa-avs-sample-app
If you build your own Amazon Echo with a raspberry pi, I have also done a Magic mirror plugin for Telldus Live: https://github.com/kimlood/MMM-telldusLive
Magic mirror steup: https://github.com/MichMich/MagicMirror

Note, depending on your account, US/English/German, the location of the lambda could be different.
From Amazon: Deploy your code to the relevant Lambda endpoints.
You can deploy your code to a North America Lambda function (US East), Europe Lambda function (EU Ireland), or both.
Last edited by kimlood on Thu Nov 24, 2016 9:50 am, edited 1 time in total.

phit03
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by phit03 » Thu Jan 18, 2018 11:08 am

Hi,

I'm trying to implement this and I'm running on Windows 10.

I've updated the keys and tokens in global.groovy.
I've run gradlew.bat and it appears to have completed OK.

When I run gradlew uberjar, it fails with a compiler error on line 112 as below. Any ideas?

C:\Users\tony\Desktop\alexa-home-telldus-master>gradlew uberjar
:compileJava UP-TO-DATE
:compileGroovy
startup failed:
C:\Users\tony\Desktop\alexa-home-telldus-master\src\main\groovy\Telldus.groovy: 112: unexpected token: ) @ line 112, column 15.
} else if () valueLevel < 0 {
^

1 error

:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.

kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

Hi, nice to see you try this!
That was an error from my side, I have pushed the new code, so do a git pull in order to retrieve the new code.

phit03
Posts: 3
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by phit03 » Thu Jan 18, 2018 11:08 am

Thanks for the correction, .jar file appears to have compiled successfully.

I went on to Amazon, registered as an Amazon developer and created the skill (I think) as a "Smart Home Skill".
However, I think I need to do some reading before going further.

Is there a cost in setting up and using an AWS account or is it free for personal users?

ade_leigh
Posts: 6
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by ade_leigh » Thu Jan 18, 2018 11:08 am

I have followed all of the instructions provided and am now stuck at the point that Kimlood reported in another forum (https://forums.developer.amazon.com/que ... rking.html). That being that the the Alexa app cannot discover devices. I believe that the root cause is due to the response being in JSON format however i have no idea how to change this within the Lambda. The good news is that when i execute a test script from the Lambda, it does discover all my devices so connectivity and authentication to Telldus Live is good. Someone please help as i'm now about 30 hours+ into this project and now completely frustrated as still no functionality and i feel i'm very close.

intergalactic1
Posts: 4
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by intergalactic1 » Thu Jan 18, 2018 11:08 am

hi Kimlood,

Thanks very much for taking the time to produce this! I am yet to try and implement it as I have just ordered my echo dot. I will try this as soon as it arrives and report back.

Cheers!

Dan.

ade_leigh
Posts: 6
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by ade_leigh » Thu Jan 18, 2018 11:08 am

Hi Dan,

I'm sure you have read my previous comment/question, unfortunately Kimlood seems to have gone off grid so no answers, also seems others are in the same predicament. If you get it working i'd be grateful if you could provide an overview of how you got it working as for me the skill build and lambda build is exactly as described by both Kimlood, Amazon and Telldus. Problem is that the find device request never seems to create a log in the lambda so bot sure if it's a northound or a return protocol issue. Just cannot get Alexa to find the devices. Call from Lambda to Telldus API does however return a full list of my devices so i know that works. I'm now in a position of probably waiting for IFTTT to be integrated into both Amazon and Telldus so someone else can have the coding and connectivity problems... Good news is that i can tell people at work i'm an AWS developer :)

intergalactic1
Posts: 4
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by intergalactic1 » Thu Jan 18, 2018 11:08 am

hi Ade Leigh,

Im afraid I dont think that I will be much help in unpicking the problems with the code, I will have a go at implementing code but I dont have the skills to work out what is wrong!

What I am really looking for is any device/hub/controller that I can use via the echo to control my lights which are a 433Mhz system called home easy/byron/smartwares. I currently use the telldus live app on my android to control the lights via my tellstick - if any one has any suggestions then it would be appreciated.

Thanks,

Dan.

ade_leigh
Posts: 6
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by ade_leigh » Thu Jan 18, 2018 11:08 am

Hi Dan,

Your current solution is exactly the same as mine -- Homeasy, Tellstick Net. Let me know how you get on with the implementation, i'd be keen to know if it's a general flaw in the code or if i'm doing something wrong if it works for you. I'm also keeping my eye on other solutions coming to market such as IFTTT integration for Tellstick/Alexa. Also i have found a solution called Home Assistant (Python), i have been playing with this also but again just can't get that final integration. I do have a thought thought particularly around Alexa skills that we are in the UK and not US. This may make the difference.

I'll post if i find a solution as i'm not giving up yet by ditching my Homeasy for the mainstream smarthings/hue etc...

Cheers

Ade

kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

Hi all!
Sorry, but the forum has stopped pinging me when this thread is updated!
Ok, nice to see that so many has tested this, if the lamda can execute you should see all the logs, that will be the first hint where to start looking.
If you need help, feel free to send my a private message, and I will help you, either by email or if you want slack or skype!
Last edited by kimlood on Tue Nov 08, 2016 6:19 pm, edited 1 time in total.

kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

ade_leigh wrote:I have followed all of the instructions provided and am now stuck at the point that Kimlood reported in another forum (https://forums.developer.amazon.com/que ... rking.html). That being that the the Alexa app cannot discover devices. I believe that the root cause is due to the response being in JSON format however i have no idea how to change this within the Lambda. The good news is that when i execute a test script from the Lambda, it does discover all my devices so connectivity and authentication to Telldus Live is good. Someone please help as i'm now about 30 hours+ into this project and now completely frustrated as still no functionality and i feel i'm very close.
If your lamda can discover all your devices, it's not a problem of the application, it's probably a user issue between your lamda and Alexa.
Please look in to the instructions of how to connect Lamda with Alexa.

In details: Verify these steps:
  • Register with an OAuth provider, such as Login with Amazon.
    Note the "Client ID" and "Client Secret", as you'll need those later

    Under the "Account Linking" section:
    Set Authorization URL to: https://www.amazon.com/ap/oa
    Set the Client ID to the previously noted value from Login with Amazon
    Set Scope to profile
    Set Access Token URI to https://api.amazon.com/auth/o2/token
    Set Client Secret to the previously noted value from Login with Amazon
    Note the "Redirect URL"

    Go back to Login with Amazon and enter the "Redirect URL" as an "Allowed Return URL" for the application you registered.

ade_leigh
Posts: 6
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by ade_leigh » Thu Jan 18, 2018 11:08 am

Hi Kimlood, I have already completed the account linking as per the description, doesnt seem to be the problem, maybe you can help me out over skype when you are free as per the offer. Not sure how to PM you as i can't find an email address on the forum.

kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

ade_leigh wrote:Hi Kimlood, I have already completed the account linking as per the description, doesnt seem to be the problem, maybe you can help me out over skype when you are free as per the offer. Not sure how to PM you as i can't find an email address on the forum.
Sure, email me at kim@hoglandet.org and we will try to work this out.
Have you enable the Alexa skill at developer.amazon.com? And added it to your Alexa under "My skills"?

intergalactic1
Posts: 4
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by intergalactic1 » Thu Jan 18, 2018 11:08 am

hi Kimlood and Ade_leigh,

If you guys do manage to get together and work out the problem please can you post the solution for me to try.

Much appreciated!

Cheers,

Dan.

kimlood
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: Telldus Live in Amazon Alexa

Post by kimlood » Thu Jan 18, 2018 11:08 am

intergalactic1 wrote:hi Kimlood and Ade_leigh,

If you guys do manage to get together and work out the problem please can you post the solution for me to try.

Much appreciated!

Cheers,

Dan.
Hi Dan,
Feel free to contact me as well, I will try to help you as much as possible.

Post Reply