nervoku v0.1.0 Nervoku

Documentation for Nervoku.

Link to this section Summary

Functions

Tells what device is currently in use.

Gets device info for your roku

Checks the network for any roku devices. Will attempt SSDP and if none are found does a manual ping. If you have a Roku TV it has to do the manual ping because they aren't setup for SSDP.

Lists apps for given roku device

Launches an app my its app ID

Lists all available apps on given device.

Presses one of the available keys.

Gets available TV channels (if using roku TV)

Link to this section Functions

Tells what device is currently in use.

Examples

iex> 192.168.86.28 |> Nervoku.active_app()
%{id: "13535", name: "Plex", sub_type: "rsga", type: "appl", version: "6.3.13"}
Link to this function

device_info(ip)

Gets device info for your roku

Examples

iex> 192.168.86.28 |> Nervoku.device_info()
%{
  software_build: "4129",
  default_name: "TCL•Roku TV - UHOAIUFHSAF",
  time_zone_offset: -240,
  ethernet_mac: "23:23:23:41:34:cd",
  tuner_type: "ATSC",
  network_name: "Network",
  screen_size: 49,
  network_type: "wifi",
  supports_find_remote?: true,
  software_version: "9.1.0",
  power_mode: "PowerOn",
  country: "US",
  udn: "818afcbc-8181-81cf-81dd-1919ccff99cc",
  language: "en",
  wifi_driver: "realtek",
  time_zone_name: "United States/Eastern",
  serial_number: "UAYA9292SS99",
  is_stick?: false,
  advertising_id: "818afcbc-8181-81cf-81dd-1919ccff99cc",
  panel_id: 32,
  time_zone_auto?: true,
  headphones_connected?: false,
  build_number: "309.10E04129A",
  model_region: "US",
  friendly_model_name: "TCL•Roku TV",
  supports_ethernet?: true,
  uptime: 1409333,
  vendor_name: "TCL",
  is_tv?: true,
  clock_format: "12-hour",
  user_device_name: "49\" TCL Roku TV",
  model_number: "7117X",
  time_zone_tz: "America/New_York",
  model_name: "49S517",
  find_remote_is_possible?: false,
  wifi_mac: "1b:7a:6a:41:f1:dc",
  friendly_name: "49\" TCL Roku TV",
  supports_suspend?: true,
  time_zone: "US/Eastern",
  device_id: "FSU8C8992112",
  secure_device?: true,
  locale: "en_US"
}
Link to this function

find_rokus(base_ip \\ "192.168.86")

Checks the network for any roku devices. Will attempt SSDP and if none are found does a manual ping. If you have a Roku TV it has to do the manual ping because they aren't setup for SSDP.

Examples

iex> Nervoku.find_rokus()
{:ok, %{location: "192.168.86.28"}}

Lists apps for given roku device

Examples

iex> Nervoku.list_apps()
[
  %{
    id: '31012',
    name: 'FandangoNOW Movies & TV',
    sub_type: nil,
    type: 'menu',
    version: '1.9.31'
  },
  %{
    id: 'tvinput.hdmi1',
    name: [72, 68, 77, 73, 160, 49],
    sub_type: nil,
    type: 'tvin',
    version: '1.0.0'
  }
]
Link to this function

launch_app(ip, app_id)

Launches an app my its app ID

Examples

iex> 192.168.86.28 |> Nervoku.launch_app("13535")
:ok

iex> 192.168.86.28 |> Nervoku.launch_app("tvinput.dtv")
:ok

Lists all available apps on given device.

Examples

iex> 192.168.86.28 |> Nervoku.list_apps()
[
  %{
    id: "13535",
    name: "Plex",
    sub_type: "rsga",
    type: "appl",
    version: "6.3.13"
  },
  %{
    id: "151908",
    name: "The Roku Channel",
    sub_type: "rsga",
    type: "appl",
    version: "2.5.19"
  }
]
Link to this function

press_key(ip, key)

Presses one of the available keys.

Examples

iex> 192.168.86.28 |> Nervoku.press_key(:DIN)
{:error, :invalid_key}

iex> 192.168.86.28 |> Nervoku.press_key(:down)
:ok
Link to this function

tv_channels(ip)

Gets available TV channels (if using roku TV)

Examples

iex> 192.168.86.28 |> Nervoku.tv_channels()
[%{
  name: "UNC-EX",
  number: 58.3,
  physical_channel: 44,
  physical_frequency: 653000,
  type: "air-digital"
},
%{
  name: "NCCHL",
  number: 58.4,
  physical_channel: 44,
  physical_frequency: 653000,
  type: "air-digital"
}]