ndg63276 / alexa-sky-hd

A smart home skill for Alexa to control a Sky+HD or SkyQ box
33 stars 15 forks source link

BBC 1 in Scotland #16

Closed darkbluedad closed 2 years ago

darkbluedad commented 4 years ago

Thanks for creating this - I have got it working and it does exactly what I wanted, namely letting me change the channel using Alexa from our deck where I have Speakers connected up to Sonos Amp which has a line in from our Sky box. The only minor issue is that asking for BBC1 gives Channel 115, which in Scotland is BBC Scotland. Our BBC1 HD is on 101. I can ask for 101 which works fine but it would be good if you could create a parameter like your Italy one. Have also noticed that sometimes you don't need to add "on Sky" to channel commands if you have recently issued a command with "on Sky".

ndg63276 commented 4 years ago

Hi there, assuming you set this up in the last 10 days, there is now an environment variable that lets you do this. In your lambda function, set the environment variable with the key "CHANNELS_FILE", and the value "http://epgservices.sky.com/5.1.1/api/2.1/region/json/4102/37/". That is for the region "Scottish East HD", which seems to have BBC One as you expect it. I will try and document all the regions, as I'm sure this would be useful for others.

darkbluedad commented 4 years ago

Excellent!

Thank you

Sent from my iPad

On 13 May 2020, at 09:31, ndg63276 notifications@github.com wrote:

 Hi there, assuming you set this up in the last 10 days, there is now an environment variable that lets you do this. In your lambda function, set the environment variable with the key "CHANNELS_FILE", and the value "http://epgservices.sky.com/5.1.1/api/2.1/region/json/4102/37/". That is for the region "Scottish East HD", which seems to have BBC One as you expect it. I will try and document all the regions, as I'm sure this would be useful for others.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

darkbluedad commented 4 years ago

Tried that - Now get BBC one HD but not on 101 but on 976. I guess because 101 is called BBC One ScotHD on the screen.

Sent from my iPad

On 13 May 2020, at 09:31, ndg63276 notifications@github.com wrote:

 Hi there, assuming you set this up in the last 10 days, there is now an environment variable that lets you do this. In your lambda function, set the environment variable with the key "CHANNELS_FILE", and the value "http://epgservices.sky.com/5.1.1/api/2.1/region/json/4102/37/". That is for the region "Scottish East HD", which seems to have BBC One as you expect it. I will try and document all the regions, as I'm sure this would be useful for others.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ndg63276 commented 4 years ago

Ok, plan B then!

If you go to Lambda, scroll down to the Function Code section, you should see a little file explorer. On the left, there's a file called "channels-hd.json". Double click to open it, you should be able to edit it. Just change the top lines to like this:

{
    "101": ["BBC One HD", "bbc 1 hd"],
    "102": ["BBC Two HD", "bbc 2 hd"],
    "103": ["ITV"],
    "104": ["Channel 4", "channel four"],
    "105": ["Channel 5 HD", "channel five hd"],
    "106": ["Sky One HD", "sky 1 hd"],
    "107": ["Sky Witness HD"],
    "108": ["Sky Atlantic HD"],
    "109": ["W HD"],
    "110": ["GOLD HD"],
    "111": ["Dave HD"],
    "112": ["Comedy Central HD"],
    "113": ["Universal HD"],
    "114": ["SYFY HD", "sci-fi hd"],
    "115": ["BBC Scotland HD", "bbc scotland hd"],
    "116": ["BBC Four HD", "bbc 4 hd"],
...

And click Save.

Then change that environment variable again, keep the key as "CHANNELS_FILE", change the value to "channels-hd.json" (ie the name of the file you edited). Click Save again and try that.

darkbluedad commented 4 years ago

Many thanks

As an aside do I need to deactivate/activate the skill after the change or will it just pick up the new code?

Sent from my iPhone

On 13 May 2020, at 16:00, ndg63276 notifications@github.com wrote:

 Ok, plan B then!

If you go to Lambda, scroll down to the Function Code section, you should see a little file explorer. On the left, there's a file called "channels-hd.json". Double click to open it, you should be able to edit it. Just change the top lines to like this:

{ "101": ["BBC One HD", "bbc 1 hd"], "102": ["BBC Two HD", "bbc 2 hd"], "103": ["ITV"], "104": ["Channel 4", "channel four"], "105": ["Channel 5 HD", "channel five hd"], "106": ["Sky One HD", "sky 1 hd"], "107": ["Sky Witness HD"], "108": ["Sky Atlantic HD"], "109": ["W HD"], "110": ["GOLD HD"], "111": ["Dave HD"], "112": ["Comedy Central HD"], "113": ["Universal HD"], "114": ["SYFY HD", "sci-fi hd"], "115": ["BBC Scotland HD", "bbc scotland hd"], "116": ["BBC Four HD", "bbc 4 hd"], ... And click Save.

Then change that environment variable again, keep the key as "CHANNELS_FILE", change the value to "channels-hd.json" (ie the name of the file you edited). Click Save again and try that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ndg63276 commented 4 years ago

It should just work as soon as you click save.

On Wed, 13 May 2020, 17:31 darkbluedad, notifications@github.com wrote:

Many thanks

As an aside do I need to deactivate/activate the skill after the change or will it just pick up the new code?

Sent from my iPhone

On 13 May 2020, at 16:00, ndg63276 notifications@github.com wrote:

 Ok, plan B then!

If you go to Lambda, scroll down to the Function Code section, you should see a little file explorer. On the left, there's a file called "channels-hd.json". Double click to open it, you should be able to edit it. Just change the top lines to like this:

{ "101": ["BBC One HD", "bbc 1 hd"], "102": ["BBC Two HD", "bbc 2 hd"], "103": ["ITV"], "104": ["Channel 4", "channel four"], "105": ["Channel 5 HD", "channel five hd"], "106": ["Sky One HD", "sky 1 hd"], "107": ["Sky Witness HD"], "108": ["Sky Atlantic HD"], "109": ["W HD"], "110": ["GOLD HD"], "111": ["Dave HD"], "112": ["Comedy Central HD"], "113": ["Universal HD"], "114": ["SYFY HD", "sci-fi hd"], "115": ["BBC Scotland HD", "bbc scotland hd"], "116": ["BBC Four HD", "bbc 4 hd"], ... And click Save.

Then change that environment variable again, keep the key as "CHANNELS_FILE", change the value to "channels-hd.json" (ie the name of the file you edited). Click Save again and try that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ndg63276/alexa-sky-hd/issues/16#issuecomment-628103965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6M4UOGRV4BVKDUOM4EFH3RRLDNHANCNFSM4M7GGT7A .

darkbluedad commented 4 years ago

Many thanks

Will test when my dear wife has finished watching the news - I'm not planning releasing this new Alexa feature to the production user audience till it works to my satisfaction - Even though I'm retired I like to keep my development standards up!

Cheers

darkbluedad commented 4 years ago

BBC One working fine now - Thank you -I also changed 103 to STV as that's what we call it. To get BBC Scotland (Channel 115) to work I have to say "BBC Scotland HD" I tried removing the HD from the line in channels-hd and also adding "BBC Scotland" with a channel number of 876 but Alexa says "Sorry I don't know that"

darkbluedad commented 4 years ago

Had a quick look in the code but I can't immediately work out what is going wrong - Probably too late to be debugging!

ndg63276 commented 4 years ago

If she's saying "Sorry I don't know that", then she is not invoking the Skybox skill, that message is not in my code anywhere. Make sure to say "... on sky box", but even then Alexa can be a bit flaky as to whether to invoke my skill. If I ask for BBC Scotland, she goes off to some other skill, very annoying!

darkbluedad commented 4 years ago

Yesterday I had to disable/enable the sky skill to get it working - have you come across that?

ndg63276 commented 4 years ago

No, but the skill as a whole is a bit sketchy. Alexa constantly wants to do things herself rather than invoking the skill, so it seems like it's not working, but actually it's just not being used.

darkbluedad commented 2 years ago

Alexa is sometimes too clever for her own good.