Coder Social home page Coder Social logo

screenly / anthias Goto Github PK

View Code? Open in Web Editor NEW
2.3K 2.3K 593.0 21.68 MB

The world's most popular open source digital signage project.

Home Page: https://anthias.screenly.io

License: GNU General Public License v2.0

Python 26.18% Shell 6.44% CoffeeScript 4.91% CSS 30.96% JavaScript 14.79% HTML 12.11% SCSS 1.66% Dockerfile 2.25% QMake 0.07% C++ 0.63%
digital-signage iot python raspberry-pi

anthias's People

Contributors

a-martynovich avatar aljungberg avatar antonmolodykh avatar axel-b avatar brainrake avatar dependabot[bot] avatar ealmonte32 avatar eugenosm avatar ghholm avatar heberalmeida avatar loriancoltof avatar mcbuddha avatar mpous avatar mscreations avatar nicomiguelino avatar nikize avatar nkaminski avatar p-rintz avatar pain64 avatar pastcompute avatar richard-to avatar rusko124 avatar schwingm avatar sebastianschildt avatar semaf avatar shawaj avatar tonylhansen avatar umeboshi2 avatar vpetersson avatar zacharytamas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anthias's Issues

suspend display during off-hours

[I'm using this issue to document what I found in a topic on the raspberrypi forum ]

Our Screenly-controlled display is in the office; it seems a waste to have it always on, also at night and during the weekends when there is noone there.
[I don't care (yet?) about suspending/resuming the Raspberry Pi, but I guess that could be done too.]

To switch off display, programmatically, on raspberry pi:

/opt/vc/bin/tvservice -p; /opt/vc/bin/tvservice -o

To switch the display on again (the chvt command combination re-activates X Windows):

/opt/vc/bin/tvservice -p ; sudo chvt 6; sudo chvt 7

I use the following crontab entry, to switch the display off after working hours, and to switch it on in the morning, on working days.

# minute   hour   day of month     month   day of week       command
#  0-59    0-23   1-31             1-12    0-7 (0/7 is Sun) 
30         18     *                *       *                 /opt/vc/bin/tvservice -p ; /opt/vc/bin/tvservice -o
30         8      *                *       1-5               /opt/vc/bin/tvservice -p ; sudo chvt 6; sudo chvt 7

JPG resize?

If I upload a jpg that is larger than the screen resolution, Screenly displays it at 100%, which crops the edges. This may be an omxplayer issue...

I can re-size the pictures manually before uploading, but I'd prefer the system to be more tolerant.

Smaller than full-screen pictures display nicely: centered with a black background.

Date is lost when deactivating an asset

How reproduce:

  • Add an asset
  • Schedule the asset to start in the past and end some time in the future. Take a note of the end-date.
  • The asset should show up in the 'active' list.
  • Now deactivate the asset.

You can now see that the end-date changed, but the desired result would be that the start/end remains the same, but the asset simply is deactivated.

Bugs and Requests

First of all I want to thank you for a wonderful program. I am really interested in using this along side the raspberry pi throughout my facility. I am really interested in trying out the Pro version. I did sign up to be notified.

Let me share my observations of bugs and requests.

Bugs:
#1 Popping sound at end and beginning of video assets out of the analog port.
#2 5-10 second view of another website asset when transitioning from video to website listed on playlist. I have 2 websites and 2 videos setup for testing.

Requests:
#1 Being able to prioritize or arrange the order of the playlist. Found that if you place a number in front of asset name it will play in order I want according to my numbering convention.
#2 Transition between assets (fade, dissolve...etc)

Auto fullscreen, or reason behind using resolution?

Is there any specific reason why screenly uses a static resolution?
I see it somewhat as problem to configure the resolution depending on screen size or orientation.

I would suggest the following change and then remove the resolution code, only used to set the size of uzbl?

--- a/misc/lxde-rc.xml
+++ b/misc/lxde-rc.xml
@@ -657,6 +657,7 @@
   <!-- match all windows, and remove their decorations -->
 <application class="*">
        <decor>no</decor>
+       <maximized>yes</maximized>
 </application>

     <!--

Update splash-page

While the new logo will be the center piece of the splash page. In the meantime, let's update the splash page to use the new look and feel. Once we have the logo, we can simply add it.

Add Error Handling For Missing Network Connection

Right now if there isn't a network connection, screenly thorws an error

I'd like to see some basic logic to address the issue

pseudo-coded

if eth[0] = null
then
Display page "you need a network connection to edit content on this device"
else
Display splash

Make an educated guess for the mimetype.

When adding an asset (remote or local), we should make an educated guess based on the mimetype in order to pre-populate the asset-type drop-down.

Since it is harder to guess the mimetype for websites, we could simply assume it is a website if it doesn't match either video nor image.

Add support for mjpeg

A lot of surveillance cameras are using mjpeg for their feed. It would be great if Screenly would support this too in order to make it more versatile.

As it turns out, mplayer can handle mjpeg streams using the command:
mplayer -fs -demuxer lavf http://webcam/stream.mjpg

Mplayer also support the '-zoom' option to bring the camera up to full screen, but the Raspberry Pi doesn't appear to be powerful enough to bring up the test-stream I used (640x480) to full screen with zoom.

This would of course also require that mplayer is installed. It would also require a new handling for mplayer along with a new content type.

Add disk space checker to installer

We need to both investigate how much disk space Screenly (or rather, the dependencies) require and add a checker that ensures that this much space is available in the installation process.

If not enough space is available, the installer should exit.

Can't select both URL and upload

It appears as the API has properly handling for this, but when you try to add (or edit) an assit such that it has both an URL and an uploaded file, you get the following message from the API displayed:

{"error": "Invalid combination. Can't select both URI and a file."}

However, there is no handling for this in the UI.

Composite out?

I was just wondering if hdmi is the only working output? or Will the composite video out work also?

Move settings from screenly.conf to UI

From a usability standpoint, it makes sense to move some of the settings from screenly.conf into the web interface.

In order to successfully do this, we need to create a new database table named 'config'.

The settings page should include the following:

  • Show splash screen (true/false, ported from screenly.conf)
  • Audio out (HDMI or 3.5mm-port, ported from screenly.conf)
  • Shuffle playlist (true/false, ported from screenly.conf)

2 playlists that alternates?

Hi,
Screenly-ose is awesome! Looking forward to the Pro plan!

I've got one question/issue. How can I make two playlists that alternates and pick 3 movies / playlist?
Eg. (6 movies in Playlist1, 3 movies in playlist2)
Playlist1: movie 1-3
Playlist2: movie 1-3
Playlist1: movie 4-6
Playlist2: movie 1-3
etc...

Which files should I edit in that case?
Thanks in advance!
Best regards,
Jonas

Improve crash handling

While the loader takes care of a crash of viewer.py just fine, it can be improved.

Right now, if viewer.py crashes, it automatically reloads, but it brings up the splash page. It would be much better if viewer.py was intelligent enough to only view the splash-page if the uptime of the node was less than N minutes.

In a perfect world, viewer.py would never crash, but we don't live in such world. :)

Make the default duration a setting

We decided in ticket #53 that the default duration should be 5 seconds. However, the more I think of it, the more I think it makes sense to move this to a setting.

Hence, let's add a field to the settings page (and in screenly.conf) for default duration and use this value.

Login credentials

Is it possible to add login information input into the asset configuration? This would be helpfull in cases where you are showing secured information on a screen (in my case using Nagios monitoring information for our costumers).

I know once logged in, it saves it for a while (cache maybe?) but that requires acces to keyboard to the Pi, which isnt ideal.

make web server port configurable

As asked in the screenly topic on the forum: it would be nice if the web server port could be configured.

The code in my branch config-port tries to do this, by allowing a 'port = 8080' line in the '[main]' config section, where
a default of 8080 is specified in both python files.
I'm wondering whether it would be nicer

  • to introduce a '[server]' config section for this 'port' setting... if so, the config.get(...) calls in my code must be updated accordingly.
  • to not have the defaults in the python files, but just demand that the 'port = ...' line is present in the config file.

don't use issue name as file name for generated html-image file?

from looking at the code, I got the impression that the asset name is used for the html file that is generated for an image asset.

because there may be more than one asset with the same name, this somehow doesn't feel too good...
what about using asset ID instead?

Hide the duration field for movies

Since movies already have a built-in duration (ie. the length), it's both confusing and redundant to display this information.

As a result, we should hide the duration field entirely if the asset type is set to 'movie'.

Add the ability to set play order

One commonly requested feature is the ability to set the play order. I think this is a reasonable feature.

The most intuitive way to solve this would to simply turn the 'active' section into an ordered list. The user would then be able to drag the items to the desired play order. By default new items would appear at the end of the list.

asset Image requires asset_id, but playlist array does not get assed_id passed over

Only affects view_image(), but breaks it.

patch follows:
(branch: master)

diff --git a/viewer.py b/viewer.py
index a56ecd4..6f34eca 100755
--- a/viewer.py
+++ b/viewer.py
@@ -93,7 +93,7 @@ def generate_asset_list():
         logging.debug('generate_asset_list: %s: start (%s) end (%s)' % (name, start_date, end_date))
         if start_date and end_date:
             if start_date < time_cur and end_date > time_cur:
-                playlist.append({"name": name, "uri": uri, "duration": duration, "mimetype": mimetype})
+                playlist.append({"asset_id": asset_id, "name": name, "uri": uri, "duration": duration, "mimetype": mimetype})
                 if not deadline or end_date < deadline:
                     deadline = end_date
             elif start_date >= time_cur and end_date > start_date:

UNC paths

On a scale from 0 - 10 how likely will UNC paths supported as a source? Or is this impossible to do.

viewer.py crashes on unscheduled assets

Looks like a recent commit broke viewer.py when there were unscheduled events.

$ python viewer.py Traceback (most recent call last): File "viewer.py", line 284, in <module> asset = scheduler.get_next_asset() File "viewer.py", line 66, in get_next_asset self.refresh_playlist() File "viewer.py", line 87, in refresh_playlist elif self.deadline <= time_cur: TypeError: can't compare datetime.datetime to NoneType

Analog Audio

Has anyone been able to get audio out of the analog port? I can get audio from HDMI.

Uploaded assets blank

There is a bug in server.py that results in all uploaded assets being zero length files.

The fix:

$ git diff
diff --git a/server.py b/server.py
index 63b06e4..030a060 100644
--- a/server.py
+++ b/server.py
@@ -202,11 +202,11 @@ def process_asset():
                 return template('message', header=header, message=message)

         if file_upload:
-            asset_id = md5(file_upload.read()).hexdigest()
+            asset_file_input = file_upload.read()
+            asset_id = md5(asset_file_input).hexdigest()

             local_uri = path.join(asset_folder, asset_id)
             f = open(local_uri, 'w')
-            asset_file_input = file_upload.read()
             f.write(asset_file_input)
             f.close()

Cheers.

Feature Requests

A couple feature requests....

1.) The ability to assign in a screenly config file a unique id for this device.
2.) Then several of these devices could "call home" to a public server to get their asset list and then begin playing them.

This will allow devices behind a firewall to be administered easily without having to poke holes in the firewall and hard code a server and viewer port for multiple Pi's at a location.

Think this is easily do-able?

Zack

force refresh playlist

As I understand it. If I set the duration to 1000. It will take 1000 seconds, before screenly notice any new changes to the playlist?

I would suggest a button somewhere in the web configuration tool, that will force sceenly to reread the playlist, and refresh the screen.

The usage i'm thinking of is this:
I have 2 webpages.
I want to only show webpage 1, so I set the duration to 10000 (or more).
Later on, I want to change to webpage 2, so I go to View Assets, and removes the start/end date from webpage 1.
The I go to Schedule asset, and sets the webpage 2 to be shown.

... but I still have to wait the 10000 seconds, before it updates... therefore a refresh-button would be nice :)

Create test image

We should create a test-image and bundle that with Screenly.

What I have in mind is something like this, but in 1920x1080. The image should also have clear indications for other common resolutions, such as 1280x720.

I found this one, but something more colorful and fun.

Screen Rotate

I have rotated the screen on my pi 90 degrees and was wondering if it would be possible to have a 1080x1920 display setting. Thanks, Adam

Add watchdog functionality to find frozen subprocesses

I've noticed at a few occasions that omxplayer freezes up, which in turn stops Screenly (since it is gently waiting for it to wrap up).

To avoid this, we need some kind of watchdog functionality that scans for omxplayer-processes that are older than n hours (where n should probably be a setting).

Add visual indicator on the front-page for asset type

At this point, there is no way to determine the asset type from the front-page (other than clicking edit). It would be great if one could easily determine this.

To solve this, let's add an indicator for this. Let's add the following (stock bootstrap) icons for this purpose:

  • Movie: 'icon-facetime-video'
  • 'Image: icon-picture'
  • 'Website': 'icon-globe'

We can simply add this icon to the left of the asset name.

Manual for downloading the git repository doesn't work like expected

When I let run the git clone command i get following error.

pi@raspberrypi ~ $ git clone [email protected]:wireload/screenly-ose.git ~/screenly
Cloning into '/home/pi/screenly'...
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

When I download the zip and extract it on the pi it worked.

Please give some information what i could do to use the git clone comman.

Thx and compliment

Tommy

Error when editing schedule

User "bostjan" reported:
I also found error trying to edit a schedule...some attribute error because of datetime...

configuration over wifi

Screenly doesn't think it recognizes my WiFi. The adapter is setup, resolves an IP, but Screenly reports trouble ("can't detect configuration" or whatever the splash-screen message is). However, if I got to <IP.address>:8080 it works fine. If I didn't know how else to look up my IP I'd be in trouble. It's a minor problem and not holding me up, but I thought I'd report it.

I plan to play almost entirely local content, and use the WiFi only for setup/management.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.