WebThingsIO / addon-list

List of installable add-ons for WebThings Gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[new add-on] Internet radio

flatsiedatsie opened this issue · comments

Play internet radio stations.

  • Uses ffplay, which is already built into the WebThings gateway. There are no other dependencies.
  • It comes with a few default radio stations, but you can substitute and add your own.

It creates a thing with a few properties:

  • Select the desired station from a drop-down.
  • You can set the audio volume
  • You can turn the radio on and off

It uses persistence to remember the previous state (e.g. selected radio station, volume, playing)

It has been designed to work well with the Voco voice add-on - e.g. is has easy and logical names for properties.

{
  "name": "internet-radio",
  "display_name": "Internet radio",
  "description": "Play your favourite online radio stations",
  "author": "Flatsiedatsie",
  "homepage": "https://github.com/flatsiedatsie/internet-radio",
  "license": "https://github.com/flatsiedatsie/internet-radio/blob/master/LICENSE",
  "type": "adapter",
  "packages": [
    {
      "architecture": "linux-arm",
      "language": {
        "name": "python",
        "versions": [
          "3.5",
          "3.6",
          "3.7",
        ]
      },
      "version": "0.0.2",
      "url": "https://github.com/flatsiedatsie/internet-radio/raw/master/internet-radio-0.0.2.tgz",
      "checksum": "c3a3489e121aebde8422316b40a1fdb67eeeacbbf8b2c6daa9087fdb79b8c023",
      "api": {
        "min": 2,
        "max": 2
      }
    }
  ]
}

I have the same issue with this add-on as I do with the Voco one (the installation of system dependencies).

An alternative would be to release a webthing that controls VLC, which could then be added with the existing thing-url-adapter (Web Thing add-on). That's what I did for controlling MPD: https://github.com/mrstegeman/mpd-webthing

Version 0.0.2 has no dependencies anymore. I discovered ffplay is already built into the image, so now it uses that instead.

Cool! I like it.