Skip to content

Control Screenly OSE digital signage via REST API.

License

Notifications You must be signed in to change notification settings

burnnat/screenly_ose

Repository files navigation

Screenly OSE API Client

image image

Library to enable control of Screenly OSE digital signage via REST API.

  • Free software: MIT license

Sample Usage

import asyncio
import aiohttp
import screenly_ose

async def run():
    async with aiohttp.ClientSession() as session:
        screenly = screenly_ose.Screenly(session, '192.168.1.112')
        asset = await screenly.get_current_asset()
        print(asset)

asyncio.run(run())

API

Constructor

  • Screenly(websession, hostname, port=80, encryption=False, timeout=None)

    Creates a new connection to a Screenly OSE instance running on the given hostname and port.

Methods

All instance methods return False in the event of a request error.

  • list_assets()

    Returns a list of dicts describing the currently registered assets. Each dict contains the following info:

    • id (string) The asset ID
    • name (string) The asset name
    • type (string) The asset type
    • enabled (boolean) True if the asset is currently enabled
    • active (boolean) True if the asset is currently being displayed
  • get_current_asset()

    Returns a dict containing the following info about the asset currently being displayed:

    • id The asset ID
    • name The asset name
    • type The asset type
  • next_asset()

    Requests Screenly to display the next asset in the sequence.

  • previous_asset()

    Requests Screenly to display the previous asset in the sequence.

  • switch_asset(asset_id)

    Requests Screenly to display the asset with the given ID string.

  • enable_asset(asset_id)

    Updates the given asset to be enabled.

  • disable_asset(asset_id)

    Updates the given asset to be disabled.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Control Screenly OSE digital signage via REST API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published