thorsten-gehrig / alexa-remote-control

control Amazon Alexa from command Line (set volume, select station from tunein or pandora)
416 stars 102 forks source link

Tunein Jingle #154

Closed Korki67 closed 2 years ago

Korki67 commented 2 years ago

Hi there,

since some time we have this "tune-in" jingle when starting radio with -r. It does not play with "-e textcommand: ..." but that has longer delay to start.

I assume there is no workaround other then -e textcommand. In case anybody found something, would be great to read about here.

Regards, Horst

adn77 commented 2 years ago

Sorry, I have no idea what you're referring to. Is that some sort of advertising by TuneIn? If you use the textcommand Amazon might select a different provider for the stream - you can see which in the app.

Give the playmusic command a try and see if the result is different.

Korki67 commented 2 years ago

Hi Alex,

I also tried playmusic and Jingle is played as well. Yes, it is an advertisement of tunein. Many don't like it ... see link.

Regards, Horst

Korki67 commented 2 years ago

Well using playmusic with tunein gives same Jingle. But with voice command Amazon uses "ARD Audiothek". So that is the difference.

Now I don't see how to use playmusic with ARD Audiothek. I tried some options but nothing happened. No error and no music.

Below, I post the -q output. Would be great to learn how to trigger that with -e playmusic:channel:music.

Thanks for your support, Horst

queue info for dev:Arbeit type:A1RABVCI4QCIKC serial:xxxxxxxxxxxxxxxxxx
{
  "playerInfo": {
    "hint": null,
    "infoText": {
      "header": null,
      "headerSubtext1": null,
      "multiLineMode": false,
      "subText1": "ARD Audiothek",
      "subText2": null,
      "title": "SWR3"
    },
    "isPlayingInLemur": false,
    "lemurVolume": null,
    "lyrics": null,
    "mainArt": {
      "altText": "Albumdesign",
      "artType": "UrlArtSource",
      "contentType": "image/jpeg",
      "url": "https://img.ardmediathek.de/standard/00/42/92/12/72/-2114473875/1x1/64?mandant=ard"
    },
    "mediaId": "38034a45-18e3-4116-a8f9-xxxxxxxxxxxxxxxxxx:1",
    "miniArt": {
      "altText": "Albumdesign",
      "artType": "UrlArtSource",
      "contentType": "image/jpeg",
      "url": "https://img.ardmediathek.de/standard/00/42/92/12/72/-2114473875/1x1/64?mandant=ard"
    },
    "miniInfoText": {
      "header": null,
      "headerSubtext1": null,
      "multiLineMode": false,
      "subText1": "ARD Audiothek",
      "subText2": null,
      "title": "SWR3"
    },
    "playbackSource": null,
    "playingInLemurId": null,
    "progress": {
      "allowScrubbing": false,
      "locationInfo": null,
      "mediaLength": 0,
      "mediaProgress": 26,
      "showTiming": false,
      "visible": true
    },
    "provider": {
      "artOverlay": null,
      "fallbackMainArt": {
        "altText": null,
        "artType": "IconArtSource",
        "iconId": "music-no-art",
        "iconStyles": null
      },
      "providerDisplayName": null,
      "providerLogo": {
        "altText": "ARD Audiothek",
        "artType": "UrlArtSource",
        "contentType": "image/png",
        "url": "https://s3.amazonaws.com/CAPS-SSE/alexa_music_skills/c53e/ask.skill.wordmark.axxxxxxxxxxxxxxxxxxa/APP_WORDMARK_LARGE?versionId=xxxxxxxxxxxxxxxxxx41Wwx0G&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220211T214456Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=AKIxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=6fxxxxxxxxxxxxxxxxxx47012xxxxxxxxxxxxxxxxxx544"
      },
      "providerName": "ARD Audiothek"
    },
    "quality": null,
    "queueId": "38034a45-18e3-4116-a8f9-xxxxxxxxxxxxxxxxxx",
    "state": "PLAYING",
    "template": null,
    "transport": {
      "closedCaptions": null,
      "layoutType": "MusicTransportLayout",
      "lyrics": "HIDDEN",
      "next": "DISABLED",
      "playPause": "ENABLED",
      "previous": "DISABLED",
      "repeat": "HIDDEN",
      "shuffle": "HIDDEN"
    },
    "upNextItems": null,
    "volume": {
      "muted": false,
      "volume": 23
    }
  }
}
{
  "clientId": "Dee-Domain-Music",
  "contentId": "ard-vox-station-5852",
  "contentType": "LIVE_STATION",
  "currentState": "PLAYING",
  "imageURL": "https://img.ardmediathek.de/standard/00/42/92/12/72/-2114473875/1x1/256?mandant=ard",
  "isDisliked": false,
  "isLiked": false,
  "looping": false,
  "mediaOwnerCustomerId": null,
  "muted": false,
  "programId": null,
  "progressSeconds": 26,
  "providerId": "MUSIC_SKILL",
  "queue": null,
  "queueId": null,
  "queueSize": 0,
  "radioStationId": null,
  "radioVariety": 0,
  "referenceId": "38034a45-18e3-4116-a8f9-xxxxxxxxxxxxxxxxxx:1",
  "service": "UNKNOWN",
  "shuffling": false,
  "timeLastShuffled": 0,
  "volume": 23
}
{
  "queueInfo": {
    "header": {
      "actions": null,
      "infoText": null,
      "primaryAction": null,
      "queueId": "38034a45-18e3-4116-a8f9-xxxxxxxxxxxxxxxxxx"
    },
    "media": [
      {
        "actions": [],
        "art": {
          "altText": "Albumdesign",
          "artType": "UrlArtSource",
          "contentType": "image/*",
          "url": "https://img.ardmediathek.de/standard/00/42/92/12/72/-2114473875/1x1/64?mandant=ard"
        },
        "artOverlay": null,
        "index": 1,
        "infoText": {
          "header": null,
          "headerSubtext1": null,
          "multiLineMode": false,
          "subText1": "ARD Audiothek",
          "subText2": null,
          "title": "SWR3"
        },
        "mediaId": "38034a45-18e3-4116-a8f9-xxxxxxxxxxxxxxxxxx:1",
        "primaryAction": null
      }
    ],
    "nextPageToken": null,
    "previousPageToken": null,
    "queueType": "SINGLETON_QUEUE"
  }
}
adn77 commented 2 years ago

Using the -c switch shows all available PlayMusic channels:

alexa_remote_control.sh -c
CLOUDPLAYER - My Library Music provider
AMAZON_MUSIC - Amazon Music Music provider
TUNEIN - TuneIn Music provider
DEFAULT -  Default Music provider

I just tested DEFAULT and "Ard Mediathek" is chosen by Alexa.

adn77 commented 2 years ago

Hmm, the way I implemented the command execution doesn't really work for multi-room setups. The command is executed for each member of the multi-room group... if I find time I'll have a look at how this can be averted.

Korki67 commented 2 years ago

perfect, thanks! -e playmusic:DEFAULT:swr3 works fine without jingle.

adn77 commented 2 years ago

Beware of using PlayMusic in multi room setups. My script actually iterates over all members and plays more or less at the same time on the members. If you have a group of three devices, you'll end up with the streams - not necessarily in sync...

Korki67 commented 2 years ago

Hi there,

-e playmusic:DEFAULT:swr3 now also starts with the TuneIn jingle. Annoying.

For SWR3 radio station, I found this workaround: -e textcommand:"Spiele SWR3 von ARD"

But this is specific to SWR3. And the script is perfect, the advertisement of TuneIn has nothing to do with it. I am just posting this in case it may help somebody to avoid the jingle and see how to do this.

Regards, Horst