Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 3.32 KB

blockLibrary_nspanel_cards_cardMedia.md

File metadata and controls

37 lines (24 loc) · 3.32 KB

cardMedia

The cardMedia page can e used to control some media player. Indicate what music is playing and change the sources, all possible with this card.

Example Configuration

Important: This Card will do nothing if called directly without any context. At least it requires some information about the NSPanel Item to work with, which is usually supplied from the CallBack calling the script with this Card. To enable direct testing in your Blockly editor or to force the NSPanel Item you can use the related helpers. To get to know which NSPanel Item you are working on, use some helper as well.

Configuration

Standard Top Configuration

  • The Page Title which is used for this page.
  • The Refresh Time, after that time the page contents got refreshed. This might be useful when displaying some changing entities on the page, like lights or switches, to keep them in sync with their openHAB status (you can also use some rule to trigger the update via the Callback remote control options). This refresh timeout won't work (and will be ignored) when directly started with context, it needs to be called from CallBack for this to work.
  • Navigation items (previous, next) to easily enable some link to other cards. Best choose the Navigation String Helper from the NSPanel Helpers Menu. These items will be displayed in the top area left or right.

Special Configuration for cardMedia

  • If you like to use it as a fancy media player frontend, you can display the Song Title and the Artist (or whatever you like) in any color you like.
  • You can configure the preset Volume, which can be changed on the related slider.
  • Select the controls you like to have added (ON/OFF, Shuffle) and configure them by selecting colors or icons.
  • There is one Button located above the slider on the left and 5 other buttons are located below the Volume slider. The Icon will be displayed together with the Name, the Value will be ignored. Choose one of the following entities from the "NSPanel Entities" library:
  • On the bottom of the module you can add some actions, which should be triggered on button presses. The Volume action will give you a variable returnValue, which contains the selected Volume.

Openhab Blockly Nspanel - Library Documentation