• 1
  • 60
  • 61
  • 62(current)
  • 63
  • 64
  • 176
Release Kanzi: Amazon Alexa skill for Kodi
hi
need help
thats what i get when trying to deploy the code to aws
C:\Users\Rafi\Desktop\kodi-alexa-master>C:\Users\Rafi\Desktop\kodi-alexa-master>botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the ListFunctions operation: Signature expired: 20170118T052829Z is now earlier than 20170118T072225Z (20170118T072725Z - 5 min.)
'C:\Users\Rafi\Desktop\kodi-alexa-master' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Rafi\Desktop\kodi-alexa-master>'botocore.exceptions.ClientError:' is not recognized as an internal or external command,
The filename, directory name, or volume label syntax is incorrect.

can any1 help?
thenks refael
Reply
@refael65 based on previous posts, this error is because your PC time is too far out of step (looking at your error message, 5 minutes out), please check PC time against an Internet clock or NTP source and retry.
QNAP TS670 NAS - 4x4TB Raided with NFS Support & Central MySQL DB
Pi 3 [Xbian] - Samsung 46" ES7000 Smart TV & HT-E5550 3D BD Sound System
Pi 3 [Xbian]  + Hyperion Ambilight- Samsung 48" Curved UE48JS9000 4k
PowerEthernet T1502 Powerline adapters
Reply
Hi there,

I'm from Germany and followed all the instructions to deploy and enable the skill for eu-west. Everything up to the testing has been fine so far.
My Kodi is reachable from the outside via a DynDNS service (tested via webinterface and Kodi slot generator).
However, when I test the skill (e.g. with the utterance "are there any new movies"), it creates the correct Service Request (WhatNewMovies), but for the Service Response I get the following error message:

The remote endpoint could not be called, or the response it returned was invalid.

I am using OSMC on a Raspberry Pi 2. Could this have something to do with this?
I used Python on my Windows computer to deploy to AWS Lamda. I do not need to install Python on my Raspberry, correct?

EDIT 2:
Problem seems to be solved. I used http:// in the KODI_ADDRESS in the .env. file. That had the address go to http://http:/...
Reply
Everything works however when I add new stuff to my library I have to go back to the slot generator for it to work any ideas? or else it says doe snot exist
Reply
(2017-01-19, 16:58)joeygecho Wrote: Everything works however when I add new stuff to my library I have to go back to the slot generator for it to work any ideas? or else it says doe snot exist

If you have too few items in a slot, it won't be converted to a "generic" slot. Amazon won't tell us what the exact number is, but people suggest it's around 200.
Reply
Start to finish tutorial for this guide Smile

https://youtu.be/_KSlz_lT1k4
Reply
Thank you mrwolf. Have not tried it yet. Week end project I think.

Best wishes.

Update. Worked for me.
Reply
This is a great Alexa skill!

I followed the video above from mrwolf11245 and it all worked first time, great job on the video too Smile

I have one question though... my PC with kodi on has VPN software from hide.me running on it. When I'm connected the kodi skill can't find kodi on my PC anymore.

Does anyone know how I could set up port forwarding from my router to my PC that has a VPN connected? As soon as I disconnect the VPN it all works fine.
Reply
Ok, I've been on this for the past 4 hours and still not able to get past the section where I have to type 'python deploy-to-lambda.py'. As I am a newbie to python I have been using these two commands instead
'C:\Python27\Scripts\pip.exe install lambda-deploy' - this runs ok
and
'C:\Python27\Scripts\lambda-deploy.exe deploy' which starts off ok but then I get the 'botocore.exceptions.NoRegionError, everytime.


My .env is showing as an ENV file and all is input correctly as per instructions, so I am definitely missing something. I am running out of patience here and going bald due to the pulling out of my hair. Can anyone help?


EDIT - School boy error, I was editing the .env file NOT the env.lambda. Least I think this was the issue, just running through it again
EDIT 2 - Yep, it was me being thick. Typical, I post for help and then 30 minutes later solve it after 4 hours
Reply
Thanks for this skill. It looks really comprehensive!!

Unfortunately, I'm having a hard time configuring it with the dreaded: "The remote endpoint could not be called, or the response it returned was invalid." message with a basic command like "ask kodi to pause". I've tried a ton of troubleshooting, but I just can't figure it out, so any help would be immensely appreciated Smile

This is set up as Alexa->Lambda->Kodi and I've followed the instructions as far as I can tell, deployment to Lambda succeeds without errors, and I've tested that I can cURL the JSON-RPC endpoint from the Internet successfully, getting JSON back that I can indeed validate:

Code:
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u <username>:<password> http://<hostname>:<port>/jsonrpc

More details below:

On the Alexa skill side, I've made sure:
- intents, slot types, and utterances are fully populated with the slotgenerator
- Lambda arn populated for North America (us-east-1)
- the CloudWatch logs are:

Code:
/var/task/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
START RequestId: e08df31a-e0f4-11e6-ae40-bf974765169b Version: $LATEST
lambda_handler: applicationId=<appID>
Verifying application ID...
on_session_started: requestId=EdwRequestId.76885fc8-a475-46cc-8811-f1fb8ac5de89, sessionId=SessionId.4e78cb1c-4f2a-46f9-a321-e621dac7da8d
on_intent: requestId=EdwRequestId.76885fc8-a475-46cc-8811-f1fb8ac5de89, sessionId=SessionId.4e78cb1c-4f2a-46f9-a321-e621dac7da8d
Requested intent: PlayPause
Playing or pausing
Sending request to http://<hostname>:<port>/jsonrpc
No JSON object could be decoded: ValueError
Traceback (most recent call last):
File "/var/task/wsgi.py", line 1932, in lambda_handler
return on_intent(event['request'], event['session'])
File "/var/task/wsgi.py", line 1899, in on_intent
return one_intent[1](intent_slots)
File "/var/task/wsgi.py", line 256, in alexa_play_pause
kodi.PlayPause()
File "/var/task/kodi.py", line 494, in PlayPause
playerid = GetPlayerID()
File "/var/task/kodi.py", line 880, in GetPlayerID
data = SendCommand(RPCString("Player.GetActivePlayers"))
File "/var/task/kodi.py", line 143, in SendCommand
return json.loads(r.text)
File "/usr/lib64/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

END RequestId: e08df31a-e0f4-11e6-ae40-bf974765169b
REPORT RequestId: e08df31a-e0f4-11e6-ae40-bf974765169b    Duration: 1377.53 ms    Billed Duration: 1400 ms Memory Size: 128 MB    Max Memory Used: 33 MB

On the Lambda side, which is probably where the problem is, I've:
- used lambda-deploy on python 2.7 on Ubuntu to deploy
- The env file looks like this:

Code:
KODI_ADDRESS = <hostname>
KODI_PORT = <port>
KODI_USERNAME = <username>
KODI_PASSWORD = <password>

SKILL_APPID = amzn1.ask.skill.<blah>
SKILL_TZ =

LAMBDA_ENV_VARS = KODI_SCHEME,KODI_ADDRESS,KODI_PORT,KODI_SUBPATH,KODI_USERNAME,KODI_PASSWORD,SKILL_APPID,SKILL_TZ

AWS_DEFAULT_REGION = us-east-1
LAMBDA_TIMEOUT = 60
LAMBDA_MEMORY_SIZE = 128
LAMBDA_HANDLER = wsgi.lambda_handler

AWS_ACCESS_KEY_ID = <id>
AWS_SECRET_ACCESS_KEY = <key>
LAMBDA_ROLE = arn:aws:iam::<id>:role/lambda_full_access
Reply
Having a little issue with creating the alexa skill in the developer portal. Rest of the setup went through easy enough. When I input the Intent Schema, Slot Types, and Sample Utterances nothing happens when I click save. I just get the "Please wait while the alexa skill is updated with a pinwheel. I've tried at least ten times and with the same result. So close!! What am I missing?

I also was not able to use the slot generator to pull my current lists. Not sure why. I typed them manually in the alexa app though. But because it won't save I can't add any additional slot types

Thanks!
Reply
(2017-01-23, 01:17)sblackst Wrote: Unfortunately, I'm having a hard time configuring it with the dreaded: "The remote endpoint could not be called, or the response it returned was invalid." message with a basic command like "ask kodi to pause". I've tried a ton of troubleshooting, but I just can't figure it out, so any help would be immensely appreciated Smile

This is set up as Alexa->Lambda->Kodi and I've followed the instructions as far as I can tell, deployment to Lambda succeeds without errors, and I've tested that I can cURL the JSON-RPC endpoint from the Internet successfully, getting JSON back that I can indeed validate:

Code:
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u <username>:<password> http://<hostname>:<port>/jsonrpc

Code:
Sending request to http://<hostname>:<port>/jsonrpc
No JSON object could be decoded: ValueError

My first thought would be to check that you're using the external address and port for Kodi. Remember, the request is coming from Amazon, so you'll need a port forwarded on your router and either a static IP or use a service like No-IP, dyndns, etc.
Reply
(2017-01-23, 19:37)viperv1 Wrote: Having a little issue with creating the alexa skill in the developer portal. Rest of the setup went through easy enough. When I input the Intent Schema, Slot Types, and Sample Utterances nothing happens when I click save. I just get the "Please wait while the alexa skill is updated with a pinwheel. I've tried at least ten times and with the same result. So close!! What am I missing?

I also was not able to use the slot generator to pull my current lists. Not sure why. I typed them manually in the alexa app though. But because it won't save I can't add any additional slot types

First things first: if the slot generator won't work, it's unlikely the skill will. They both communicate with Kodi in the same fashion.

You should diagnose the problem with the slot generator. First thing to check is that your external address and port are accessible from the outside world. If you don't have a static IP address, you will need to use a dynamic DNS. Also, you will need to forward the port on your router to whatever port on the inside machine you used for Kodi's JSON RPC interface.
Reply
(2017-01-24, 14:54)jingai Wrote:
(2017-01-23, 01:17)sblackst Wrote: Unfortunately, I'm having a hard time configuring it with the dreaded: "The remote endpoint could not be called, or the response it returned was invalid." message with a basic command like "ask kodi to pause". I've tried a ton of troubleshooting, but I just can't figure it out, so any help would be immensely appreciated Smile

This is set up as Alexa->Lambda->Kodi and I've followed the instructions as far as I can tell, deployment to Lambda succeeds without errors, and I've tested that I can cURL the JSON-RPC endpoint from the Internet successfully, getting JSON back that I can indeed validate:

Code:
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u <username>:<password> http://<hostname>:<port>/jsonrpc

Code:
Sending request to http://<hostname>:<port>/jsonrpc
No JSON object could be decoded: ValueError

My first thought would be to check that you're using the external address and port for Kodi. Remember, the request is coming from Amazon, so you'll need a port forwarded on your router and either a static IP or use a service like No-IP, dyndns, etc.

Yup, I'm using the external name (it's a dyndns name) and port, and have checked it's open from the Internet. That was my first thought incidentally, though I wouldn't expect to see a JSON decoding error but rather an error from the requests library if a 200 wasn't received. Thanks @jingai, I'll keep looking and post any findings.
Reply
this looks awesome, can't wait to set it up!

so many questions about your kodi setup though.

how does your kodi run so fast and smooth?!? do you have a pc hooked up to the TV? or is it fire tv/stick? what build of kodi are you using? are these shows stored locally or are you using add-ons like exodus? how does it bypass selecting links with voice if so?


thanks!
Reply
  • 1
  • 60
  • 61
  • 62(current)
  • 63
  • 64
  • 176

Logout Mark Read Team Forum Stats Members Help
Kanzi: Amazon Alexa skill for Kodi15