npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pimatic-lg-smart-tv

v0.0.2

Published

Pimatic Plugin to monitor and control an LG TV with webOS

Downloads

1

Readme

pimatic-lg-smart-tv

A pimatic plugin to control WebOS based LG Smart TV's. This plugin was developed against a LG OLED55B8PLA. Similar models should work equally well. I do recommend connecting a Smart TV through cabled LAN for stability reasons - Which you already did for Netflix quality reasons anyway ;)

Status of Implementation

Since the first release the following features have been implemented:

  • Autodiscovery of LG WebOS capable televisions
  • Button devices for TV Channels, TV Inputs, and installed WebOS Apps, allowing to switch apps, inputs and channels rule-based
  • Rule Action to show Toast messages on the television
  • Turning TV on and off (Turning the TV on is accomplished through Wake-On-LAN)

Roadmap:

  • Implement volume control (Not done initially since I use my AV Receiver for TV volume).

Contributions / Credits

Originally this project was inspired by pimatic-lgtv (Vincent Riemer). However, the code base has deviated significantly since then.

Configuration

  • Add the plugin to your config.json, or via the GUI (Do not forget to activate)
  • Create a device config, or run device autodiscovery (Recommended)

Plugin Configuration

{
  "plugin": "lg-smart-tv",
  "debug": false,
  "smartTVs": [
    {
      "id": "192.168.0.101",
      "mac": "a8:23:fe:66:dd:11"
    },
    {
      .......
    }
  ],
  "active": true
}

The plugin has the following configuration properties:

| Property | Default | Type | Description | |:------------------|:---------|:--------|:------------------------------------------------| | debug | false | Boolean | Debug messages to pimatic log, if set to true |

Device Configuration

Default settings through autodiscovery should work fine.

LgSmartTvDevice

{
  "class": "LgSmartTvDevice",
  "name": "TV Livingroom",
  "id": "tv-livingroom",
  "tvIp": "192.168.0.101",
  "tvMac": "a8:23:fe:66:dd:11",
  "key": "401d6a314a8992695c0139c042084e4a"
}

The device has the following configuration properties:

| Property | Default | Type | Description | |:--------------------|:---------|:--------|:-------------------------------------------------| | tvIP | '' | String | IPv4 address of TV (Populated by auto discovery | | tvMAC | '' | String | MAC address of TV (Populated by auto discovery | | key | '' | String | Unique key identifying Pimatic with the TV |

LgSmartTvAppsDevice / LgSmartTvInputsDevice

{
  "class": "LgSmartTvAppsDevice",
  "name": "TV Apps",
  "id": "lg-smart-tv-applications",
  "tvIp": "192.168.0.101",
  "buttons": [
    {
      "id": "netflix",
      "text": "Netflix"
    },
    {
	  .....
    }
  ]
}

| Property | Default | Type | Description | |:--------------------|:---------|:--------|:-------------------------------------------------| | buttons | '' | Array | Array of Applications installed on TV | | id | '' | String | Internal WebOS app id | | text | '' | String | Friendly App name for Pimatic GUI |

In WebOS Apps and Inputs are treated similarly, therefore you can opt to include your inputs in your Apps device! In case you want to have a separate buttons device for inputs, the syntax is equal, where the id refers to the input in that case. *E.g. "id": "com.webos.app.hdmi2", "name": "Input HDMI 2"

LgSmartTvChannelsDevice

{
  "class": "LgSmartTvChannelsDevice",
  "name": "TV Channels",
  "id": "lg-smart-tv-channels",
  "tvIp": "192.168.0.101",
  "buttons": [
    {
      "id": "npo-1-hd",
      "text": "NPO 1 HD",
      "webosId": "3_36_1_501_114_14010_2249"
    },
    {
      ......
    }
  ]
}

| Buttons Property | Default | Type | Description | |:--------------------|:---------|:--------|:-------------------------------------------------| | id | '' | String | Pimatic button ID | | webosId | '' | String | Internal WebOS channel id | | text | '' | String | Friendly Channel name for Pimatic GUI |

Predicates and Actions

The following predicates are supported:

  • {device} is turned on|off

The following actions are supported:

  • switch {device} on|off
  • show message "Look at the TV!" on TV Living Room
  • press Discovery Channel HD (Discovery Channel HD being the friendly name for the TV Channel)
  • Press Mediaplayer (Mediaplayer being the Pimatic friendly name for the corresponding TV Input)

License

Copyright (c) 2021, Danny Wigmans and contributors. All rights reserved.

GPL-3.0