Git Product home page Git Product logo

openframe's People

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

openframe's Issues

no start from command line

Hello,

I'm having issues while starting openframe from the command line. I get the error:

Traceback (most recent call last): File"/home/pi/.nvm/versions/node/v4.3.2/bin/glslLoader", line 24, in <module> with open (SHADER_PATH) as f: 10Error: No such file or directory: '$url'

If openframe is set to autostart, everything is working. Its also weird that when I quit openframe via ctrl+c there is no command line, just a black screen.

I use the raspberry 3 and I'm new to all this.

Images not displaying

I just installed on an RPi 2 and am having trouble displaying images. The image download seems to work fine but nothing displays onscreen:

openframe:image Artwork config:  {} +1m
// Loading /tmp/5d937477a38167076035bdeddrops--1868693889019328712-f240.jpg as the following uniform:
//    uniform sampler2D u_tex0; // loaded
//    uniform vec2 u_tex0Resolution;
Warnings while compiling vertex shader:
Compiled
Warnings while compiling fragment shader:
Compiled
Warnings while compiling vertex shader:
Compiled
Warnings while compiling fragment shader:
Compiled

issue pushing artwork to openframe

hi guys,

i have installed openframe on a raspberry pi 2. everything works perfect until I try to update the artwork displayed on the frame from the website. Nothing happens when I choose a new artwork from my collection unless I hit ctrl+C and restart openframe. Only then the new artwork is displayed.
Is this an issue? or is this the way it should always work? any advice on how to get this working would be greatly appreciated. thank you!

paulo

Use HTTPS

Hi. This project looks really cool, and I was about to get started with it, but two things are preventing me:

  1. lack of HTTPS URL to download and install arbitrary code (https://github.com/OpenframeProject/Openframe/wiki/Openframe-User-Guide#21-install-openframe)

  2. Openframe.io itself doesn't use SSL. Not only is this not great for the privacy of Openframe users, but login/account pages aren't even protected by SSL, so usernames and passwords could leak out (e.g. http://openframe.io/login).

I really, really like what you all are doing with this project (I especially like the code of conduct here), and I'd like to be part of this community, but please consider using SSL. It's also never been easier to set up thanks to Let's Encrypt.

Debug-errors on changing artwork

The transitions between artworks on the screen seem fine but with DEBUG=* I get the following errors on the console.

Tested on current master with Pi3B.

After website:

    openframe:frame_controller endArt +2ms
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 95 requests (94 known processed) with 0 events remaining.
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 973 requests (973 known processed) with 0 events remaining.
[6323:6323:1012/130642.055488:ERROR:x11_util.cc(109)] X IO error received (X server probably went away)
[6257:6257:1012/130642.065691:ERROR:chrome_browser_main_extra_parts_x11.cc(62)] X IO error received (X server probably went away)
  openframe:frame_controller Error: Command failed: pkill -f X
  openframe:frame_controller 
  openframe:frame_controller     at ChildProcess.exithandler (child_process.js:206:12)
  openframe:frame_controller     at emitTwo (events.js:106:13)
  openframe:frame_controller     at ChildProcess.emit (events.js:191:7)
  openframe:frame_controller     at maybeClose (internal/child_process.js:877:16)
  openframe:frame_controller     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) +118ms
  openframe:frame_controller startArt +27ms

After image:

  openframe:frame_controller endArt +1ms
  openframe:frame_controller Error: Command failed: sudo pkill -f glslViewer
  openframe:frame_controller 
  openframe:frame_controller     at ChildProcess.exithandler (child_process.js:206:12)
  openframe:frame_controller     at emitTwo (events.js:106:13)
  openframe:frame_controller     at ChildProcess.emit (events.js:191:7)
  openframe:frame_controller     at maybeClose (internal/child_process.js:877:16)
  openframe:frame_controller     at Socket.<anonymous> (internal/child_process.js:334:11)
  openframe:frame_controller     at emitOne (events.js:96:13)
  openframe:frame_controller     at Socket.emit (events.js:188:7)
  openframe:frame_controller     at Pipe._handle.close [as _onclose] (net.js:498:12) +589ms
  openframe:frame_controller startArt +8ms
  openframe:processing copy sketch to parent folder +

After video:

 openframe:frame_controller endArt +0ms
  process_manager child 6927 closing code: null +135ms
  openframe:frame_controller Error: Command failed: sudo pkill -f omxplayer
  openframe:frame_controller 
  openframe:frame_controller     at ChildProcess.exithandler (child_process.js:206:12)
  openframe:frame_controller     at emitTwo (events.js:106:13)
  openframe:frame_controller     at ChildProcess.emit (events.js:191:7)
  openframe:frame_controller     at maybeClose (internal/child_process.js:877:16)
  openframe:frame_controller     at Socket.<anonymous> (internal/child_process.js:334:11)
  openframe:frame_controller     at emitOne (events.js:96:13)
  openframe:frame_controller     at Socket.emit (events.js:188:7)
  openframe:frame_controller     at Pipe._handle.close [as _onclose] (net.js:498:12) +25ms
  openframe:frame_controller startArt +3ms

How to set aspect ratio for videos?

I see on the OpenFrame-Video page:

"Artworks can pass arguments to omxplayer using the Artwork object's config property. Probably the most useful config argument is --aspect-mode, which allows an artwork to specify how it should size itself within the display."

Where do I set this config argument?

Rename Repository

The headline of this repository currently reads "Openframe Frame Controller". I find this current name misleading as I understand this repository more as the (Raspberry Pi) client of Openframe. The web app, on the other hand, feels like the controlling part to me.

Also, the repository URL is called "Openframe". In my opinion, this is not ideal either as this is only a small part of a larger system.

I suggest to rename it to "Openframe Client".
I also suggest changing the repository URL to "Openframe-Client".

glslViewer: error while loading shared libraries: libGLESv2.so

I installed openframe to RPi3 (Raspbian is installed by Noobs) and tried to start it but an error happened.

pi@raspberrypi:~ $ openframe

glslViewer /tmp/shader.frag
glslViewer: error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

No artwork is shown.

FYI, I also installed LCD driver into RPi3.

openframe won't start. Terminal being blacked out.

I'm on a fresh install of Raspbian Jessie on a RPi3. Once I install open frame I get these three errors on startup:

manpath: can't set the locale; make sure $LC_* and $LANG are correct
openfsetterm: terminal xterm-256color does not support --blank
setterm: cannot (un)set powersave mode: Inappropriate ioctl for device

and then the terminal is blacked out. nothing (that I can see) happens when I type the 'openframe' command
screenshot 2016-12-13 09 13 32

Someone else is having the same problem it looks like

Errors when loading content

I didn't manage to display anything on the screen yet. I'm getting the following errors.

When loading an image:
image

When loading a shader:
image

How can I fix this?

Thanks.

Enable/Disable autoboot via CLI

It would be handy to change autoboot settings without resetting the whole frame. Would be great to have this available via the CLI.

For example:
openframe -b could show a question asking if autoboot should be on or off.

Proposal to change artwork format and extension architecture

During the work on Processing extension in the past weeks I've tested, used and extended the Openframe platform a bit. The architecture is thought-through, comprehensive and has foundations for more great features that are not fully implemented yet. That's great! On the other hand, some small parts prevent extensibility and lead to confusion in some cases. I want to show what they are and propose some changes.

Decouple artwork formats from extension

Currently, artwork formats are internally referenced to by their extensions NPM package names:

Image (jpeg, png) = openframe-image
Website = openframe-website
Video (mp4) = openframe-video
Shader = openframe-glslviewer

I think this causes two main problems.

  1. Image and video formats, for example, are standardised. There is a multitude of software that can handle them. Currently, the end-user can't choose which extensions to use to display the artwork. The owner of the artwork decides on that without any knowledge of the client's setup or intentions.
  2. Extensions block the namespace of an artwork format even though they only support a subset of common artwork types.

Let's take the image extension as an example. Even though it was built with great intentions (high performance on slow device) in mind, it has its limitations. I can only deal with JPG and PNG image types and low resolutions. It would be nice to have an alternative extension that can handle more image types (like GIF) and open images of high resolutions too. A VLC or Chromium based extension could do that and would be easy to implement.

But currently, there is no way to tell the Openframe client to open the artwork with a different extension. The owner/creator of the artwork decides what extension is being used to display the artwork. I also found some cases, where the artwork uploaders didn't know about the limitations by their selected extension, leaving some artworks in the public stream broken. For example, there are a few artworks that have Youtube URLs but are associated with the video extension.

Furthermore, what should an alternative image extension be named? Openframe-image would already be taken up using a name that sounds like a very general extension but is, in my opinion, rather specialised and somehow limited. Of course, the extension as it exists is important and super useful. But I think the default image extension of an artwork display would ideally support a broader range of image types. But that's a different discussion actually.

The solution: a user preferences file on the client

I propose to introduce a user preferences file on the client that allows deciding what extension to use to display artwork. It's basically what most operating systems do as well. The user chooses what application is used to open a particular file extension — usually done through right-clicking on a file in the file browser.

The file could be structured like this, for example:

Artwork format = [extension1, extension2, …]

Video (.mp4) = [omxplayer, VLC, website]
Video (.mov) = [VLC]
Video (Youtube) = [VLC, website]

Image (.jpg/.jpeg) = [glslViewer, VLC, website]
Image (.gif) = [VLC, website]
Image (Instagram) = [Instagram]
Image (Twitter) = [Twitter]

Text (String) = [Text]
Text (.txt) = [Text]
Text (Twitter) = [Twitter]

Custom (Instagram-Account) = [Instagram]
Custom (Twitter-Account) = [Twitter]

When installing an extension, the extension would register itself in user prefs file with the artwork formats it supports. It would always put itself as first of the lists having highest priority. If the user, later on, decides to change back to a different extension, they could manually edit this file at any time, changing the order of the list or deleting an extension entirely.

If artworks were then pushed to the client, the client would check in the user preferences file which extension to use to display the artwork. For example in this case Image (.jpg/.jpeg) would resolve to glslViewer, whereas Image (.gif) would use VLC

Furthermore, I propose to write extensions more as bindings to an underlying application rather than displaying a certain type of artwork or file format. For example, as the video and image extension both use glslViewer I think they should then be merged into a single extension. Their code will be very similar, and the maintainer of that extension should easily be able to support all formats the underlying application can deal with. As another example, a VLC extension could display both videos and images and even Youtube URLs.

Decoupling the artwork format from the extension would make it easier to develop different clients in the future. A browser or Windows-based client, for example, might use other extensions compared to the Raspberry Pi client. These extensions would be catering for the opportunities or limitations their own environment brings.

Reuse extensions

I also recognised that a lot of extensions I would like to see on Openframe could be based on similar underlying applications. For example, a Twitter, Instagram, Text or even the .gif extension could be based on Chromium. It would be great if not every developer would separately have to maintain their strategies on how to open Chromium, deal with x server etc.

It would be great to extend/stack extensions instead. An example of how a Text (Twitter) artwork could be passed through three different extensions, each extending the functionality of the following one:

  1. Text (Twitter) format would be opened by the Twitter extension which extracts text from a tweet and passes the text to Text extension
  2. The Text extension would embed the text in a local web page, with some font and animation options and pass that web page to the website extension
  3. The website extension would then start that local web page Chromium in fullscreen

Thanks a lot for reading.

What are your thoughts on this?

Error loading web site

I'm getting an error when trying to push a web site to my frame:

openframe:frame_controller swapArt +5ms
openframe:frame_controller startArt +7ms
openframe-website [Function: _replaceTokens] /home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe-website/scripts/.xinitrc { '$url': 'http://jzlabs.com', '$flags': '' } +0ms
events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn xinit ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

NPM link problem

I keep getting errors while working on the Processing extension. I think they are related to npm link.

I set up everything as described in the dev guide. The Repos are located as follows:

~/Openframe/
~/Openframe-Processing/

I recognised that there must be another step after the end of the guide as Openframe yet needs to recognise and register the extension with the server and the local config file. So from within ~/Openframe/ I did node ./bin/cli.js -i openframe-processing.

I was then able to work for a while. Unfortunately, at some point, I got these errors when loading content of type openframe-processing:

The artwork format is not installed: openframe-processing 
(node:6870) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): undefined

I think it happened when I installed another package like npm install --save request from within ~/Openframe-Processing/. Could this be the reason in combination with npm link? If so, how could I work around it?

Once the error is there, and I try node ./bin/cli.js -i openframe-processing again in order to register the extension another time I get this error:

[o]   Installing openframe-processing extension...
(node:7167) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token var

I did check the symlinks in the global node installations and the local packages node_modules folder. They are both active. I also checked ~/.openframe/frame.json – the extension property lists the openframe-processing extension:

…
"extensions": {
    "openframe-image": "*",
    "openframe-glslviewer": "*",
    "openframe-website": "*",
    "openframe-video": "*",
    "openframe-processing": "*"
  }
…

In the webapp the frame also show this extension as installed.

What's wrong? How can I solve this?

The only thing that helped last time was reflashing the SD card and starting from scratch.

Thanks a lot.

NPM link problem

I keep getting errors while working on the Processing extension. I think they are related to npm link.

I set up everything as described in the dev guide. The Repos are located as follows:

~/Openframe/
~/Openframe-Processing/

I recognised that there must be another step after the end of the guide as Openframe yet needs to recognise and register the extension with the server and the local config file. So from within ~/Openframe/ I did node ./bin/cli.js -i openframe-processing.

I was then able to work for a while. Unfortunately, at some point, I got these errors when loading content of type openframe-processing:

The artwork format is not installed: openframe-processing 
(node:6870) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): undefined

I think it happened when I installed another package like npm install --save request from within ~/Openframe-Processing/. Could this be the reason in combination with npm link? If so, how could I work around it?

Once the error is there, and I try node ./bin/cli.js -i openframe-processing again in order to register the extension another time I get this error:

[o]   Installing openframe-processing extension...
(node:7167) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token var

I did check the symlinks in the global node installations and the local packages node_modules folder. They are both active. I also checked ~/.openframe/frame.json – the extension property lists the openframe-processing extension:

…
"extensions": {
    "openframe-image": "*",
    "openframe-glslviewer": "*",
    "openframe-website": "*",
    "openframe-video": "*",
    "openframe-processing": "*"
  }
…

In the webapp the frame also show this extension as installed.

What's wrong? How can I solve this?

The only thing that helped last time was reflashing the SD card and starting from scratch.

Thanks a lot.

login-popup login failure: ofsdk.js 404

When exporting a shader from editor.thebookofshaders.com, when I click the "LOG IN" button, nothing occurs, and the console reads:

http://openframe.io/js/ofsdk.js Failed to load resource: the server responded with a status of 404 (Not Found) 
login-popup:67 clicked
login-popup:69 Uncaught ReferenceError: OF is not defined

screen shot 2016-07-07 at 4 54 54 pm

Seen on Mac OS X, Chrome 51. (The popup doesn't appear at all in FF and Safari)

Test and update to a current Node.js version

The Openframe install script currently installs Node.js 6. Node.js 6 has reached EOL in April 2019 and is no longer receiving maintenance updates. We should update. Current Node.js versions are 12 and 13.

  1. First, someone would have to test if there are any issues with the latest Node.js versions. In case that fails, we could at least try to update to some other version higher than 6.
  2. As a second step, the script the install script can be updated. Should be easy.

Display captions with author and title

Following up from #44 and https://groups.google.com/forum/#!topic/openframeio/Zz6hGQ_6GO8

Let's use this thread to discuss if there are any options to display captions with author and artwork title.

This should be easy in the website extension as we could wrap the content in an iframe and overlay it with a container for captions.

Such layering is not easy to do in other extensions. Though, I was wondering, if there was anything like transparent windows and layering of windows in x server? That would allow rendering captions in a separate window that could be overlayed over the native application used by the extension? Does anyone know more about this?

Allow installing extensions from Github repo

I'm close to getting a working Processing extension ready. I would like to find an easier way ( other than the way described in the dev docs) to share it with other users for testing. Also, I'm not the owner of the original repo and can't easily push releases to the corresponding npm package.

So I came up with the idea of allowing to install extensions also from Github in this style:
openframe -i github:jvolker/Openframe-Processing

I've tried to implement it here:
jvolker@d4f7114

I think it should work, but I'm getting errors and don't know where they come from. On my development version of Openframe (installed at ~/Openframe) when installing jvolker/Openframe-Processingextension I get:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'openframe-processing'

I've applied the same code also to the globally installed version. I don't get an error but it doesn't seem to have installed it.

I might be confused as to where the extensions get installed to. I might also have broken my Openframe installations somehow which is causing those errors.

Could someone please have a look and try it? @jmwohl any idea?
What do you think about this idea/solution in general?

Thanks.

Rapidly triggering new artworks is causing multiple parallel downloads

As described in #64 if downloads are triggered rapidly causes in multiple simultaneous downloads and leads to chaos. The same issue can occur if the frame looses and reestablishes the connection to the pubsub server: #64 (comment)

There a partial fix available in #65 (comment):

0cce2a5 fixes some of #64 (comment). It covers situations where the frame has started a download and cancels if a new download is requested. But it doesn't cover situations where the new download has been requested so quickly that the first download hasn't even started yet.

So it's not entirely fixed yet and needs some more work.

Artwork settings/options property name differs from API

The client currently uses a property of artwork called settings whereas the API returns options. Those need to be aligned. Because of this, it's currently not possible to forward options/settings to an extension.

@jmwohl could you please give direction on which one of them should be used? I am happy to do those changes.

Does Openframe work on Raspbian Wheezy or Jessie?

I seem to be getting a bunch of errors when trying to install Openframe on Wheezy with Pi2. At first I thought maybe the problem was related to me running gcc-4.6.3 but now I'm thinking maybe it has to do with the operating system in general. I'm able to go through all of the installation steps except the script fails when I get to [email protected] install: node-gyp rebuild. Any help is much appreciated! Thanks!

Error in console says:

npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the mmmagic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mmmagic
npm ERR! There is likely additional logging output above.

Slideshow, rotator, or gallery

How would one push a scheduled series of updates to an openframe? For example, looping over a series of images, shaders, or videos (A, B, C, A, B, C), with a change every 60 seconds?

The documentation focuses on using the web app to push manual updates. I'm wondering if there is a way that is scriptable -- either through web app API, or through a script running on the frame.

TypeError: pm.init is not a function

now i tried DEBUG=* npm test .

TypeError: pm.init is not a function
at Context. (test/plugin-manager.spec.js:18:8)

I think plugin-manager version is not correct?
(before one problem, apeared message can not find plugin-manager, so I changed plugin-manager.spec.js header pm = require('../plugin-manager'); to pm = require('plugin-manager');
and npm install plugin-manager --save)

Error when pushing shader artwork

When attempting to push any shader, receive the following error message:

glslViewer: src/app.cpp:250: void initGL(int, char **): Assertion 'surface != ((EGLSurface)0)' failed.

Running on a Rasp Pi Model B (hardware revision 000e), linux 4.1.19, latest version of raspbian jessie

Images seem to work just fine, only currently happening with any shaders I try

Raspberry Pi 4 support

I've just tested Openframe on the Raspberry Pi 4 running 2019-07-10-raspbian-buster.

Video

okay

Website

okay, after running sudo apt-get install xserver-xorg-legacy

Images

Error: * failed to add service - already in use?

Shader

Error: * failed to add service - already in use?

The image and shader extensions are based on glslViewer which has been reported not to support Raspberry Pi 4 currently. patriciogonzalezvivo/glslViewer#141 (comment)

This will need a some deep work. The solution will imply transitioning to this > https://github.com/eyelash/tutorials/blob/master/drm-gbm.c

That said, installing GLFW and compiling it for X11 windows manager works

I've also successfully tested WebGL on the Raspi 4, which means shaders could run in Chromium.

What is the best way to go from here? Two basic options:

  • wait until glslViewer supports Raspi 4
  • find alternatives for the image and shader extensions that work on the Raspi 4 and update the extensions. This could, for example, be based on GLFW or Chromium. Would it be worth checking if GLFW works on all Pis or would it be better to run glslViewer if supported and Chromium otherwise?

It sounds like it's going to be a while until a fix for glslViewer is available. I think it is important to fix the extensions and choose alternatives to be independent of glslViewer. Chromium seems like an easy fix as a there is a working codebase for it in the website extension. I could imagine this might also fix the issue people are having with TFT/SPI/GPIO screens. I could give it a shot.

Taking this even further, basically, all default formats (image, video, shader, website) could run in Chromium. This would also make it easy to display captions with author and title as an overlay. Also, it might offer the possibility to create smooth transitions between artworks. Not sure if using Chromium is generally a good idea for performance reasons on slower Pis, but it seems like it could have other advantages.

Some artworks crash Openframe during download

I was testing using latest Raspian Buster on a Pi 3B and installed Openframe from the current master branch using a modified install script:
bash -c "$(curl https://gist.githubusercontent.com/jvolker/7be85a005b98fbd40b793d13b7250a44/raw/)"

Started Openframe with debugging on: DEBUG=* openframe

Two artwork examples that cause similar errors during download. Obviously the artwork configurations are faulty. Those artworks can't be downloaded. Looks like we need to catch this.

https://openframe.io/artwork/5d234ab4a38167076035bc65

  openframe:downloader downloading https://youtu.be/njSSoyCUEpE +2ms
/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/pretty-bytes/index.js:46
        throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
        ^

TypeError: Expected a finite number, got object: null
    at module.exports (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/pretty-bytes/index.js:46:9)
    at Request.<anonymous> (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/src/downloader.js:75:85)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at reportState (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/request-progress/index.js:83:21)
    at call (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/throttleit/index.js:28:16)
    at Object.throttled [as reportState] (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/throttleit/index.js:20:26)
    at onData (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/request-progress/index.js:44:36)
    at emitOne (events.js:101:20)
    at IncomingMessage.emit (events.js:188:7)

https://openframe.io/artwork/5e4701aba38167076035c034

 openframe:downloader downloading https://opensea.io/assets/0x8ed70b10e67a207f8caa4433b83b962550ba81ee/23 +2ms
  openframe:pubsub pubsub client connected +650ms
/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/pretty-bytes/index.js:46
		throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
		^

TypeError: Expected a finite number, got object: null
    at module.exports (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/pretty-bytes/index.js:46:9)
    at Request.<anonymous> (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/src/downloader.js:75:85)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at reportState (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/request-progress/index.js:83:21)
    at call (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/throttleit/index.js:28:16)
    at Object.throttled [as reportState] (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/throttleit/index.js:20:26)
    at onData (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe/node_modules/request-progress/index.js:44:36)
    at emitOne (events.js:101:20)
    at IncomingMessage.emit (events.js:188:7)

Error: spawn xinit ENOENT when pushing website to frame.

After a fresh install of Openframe on a Raspberry Pi 3 running Stretch Lite, I wanted to push a website to my frame and get this:

events.js:160
   throw er: //Unhandled 'error' event

Error: spawn xinit ENOENT
   at exports._errnoException (util.js:1022:11)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
   at onErrorNT (internal/child_process.js:359:16)
   at _combinedTickCallback (internal/process/next_tick.js:74:11)
   at process._tickCallback (internal/process/next_tick.js:98:9)

Any idea where it could be coming from? I tried different websites and rebooting.

javascript and canvas?

I had hoped to explore some webGL stuff, but it appears that may not be working for some of the different websites I tried.
https://threejs.org/examples/webgl_shader.html
I then tried some websites with canvas driven artwork.
http://www.kevs3d.co.uk/dev/plasma/
http://glimr.rubyforge.org/cake/demos/fireworks2.6rt.html
(this should be a chromium-specific site)
http://www.sketchpatch.net/livecodelab/index.html#bookmark=springysquaresDemo
Those don't work either.

is there anyway to tell what 'will' work with a website? I know you use Chromium (I'm assuming the Chromium which is included on the raspberry pi)

There are various error codes having to do with images or simple messages like "terminated" when I try some of these things.

Is there a list I am missing on what 'will' work and what will not when one uses a website? I would like to consider a simple slideshow of images and perhaps text, but I am limited in terms of how much time I can spend experimenting.

Make it possible to run on the EO hardware

Now that Electric Objects has discontinued their hardware business, there are likely to be people with the existing devices who are interested in doing new things with them. Also, while Giphy is supporting the EO service, we shouldn't assume they will do so forever. Also, it would be neat! :-)

@dariusk wrote up an article a while ago about hacking the EO1:

https://feeltrain.com/blog/hack-your-eo1/

… which may have some relevant information. Also, he's indicated interest in working on this feature, but I'll let him speak for himself on that front!

I probably can't be of much help, but consider me an interested party!

Allow to pass functions to the `end_command` in extensions

Sometimes it's necessary to do some cleanup tasks after finishing to show some artwork.

While it's currently possible to run a shell script by passing a string via the end_command property, it would be nice to do this directly in Node.Js by passing a function instead. Just like it's possible forstart_command.

I had a quick look into the code, and it seems it's only necessary to copy a few lines of code to allow this.

Thanks.

Show errors for `artwork offline` and `extension not installed`

Currently, the user doesn't get good feedback in two common situations.

1. Artwork not online:

I had a look into downloader.js, and it seems we don't check for the HTTP status code. For example:

Artwork id: 5af67510a38167076035b504
Url: https://scontent-syd2-1.xx.fbcdn.net/v/t31.0-8/20616863_1597372166939729_3032648662710310262_o.png?_nc_cat=0&_nc_eui2=AeHfPJw3QWw9JoLBXOPCTHAZJFrKKpDj8auySrrwmSMTJa-QSqI5WCMYiVzTyOzfzTcwvWmdB1OJliW2mwBNMk_iukcET8r60DNL1vOSgbGrkg&oh=536e01039e345a913ccbd5187bb354b5&oe=5B950E0A
Replies with: 403

There is no error displayed. That makes it really hard to understand what the problem is especially now when the public stream is full of offline artworks.

I was wondering if there is a specific reason why curl is spawned instead of using a native node module like request? It would be easy to check for status codes with request.

2. Extension for artwork format not installed:

If the extension of the requested artwork format is not installed the current error message is:
(node:1737) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'download' of undefined

This one might be easier to understand but could be improved too.

Errors/Blank Screen - Raspberry Pi 4

@jvolker I tried downloading both your image itself and running the install script you created on the newest version of Buster. In both cases, when I set openframe to run on startup I'm getting a black screen with no art coming up. I'm on a Raspberry Pi 4 with 1Gb memory. I'm also getting the black screen (Issue #42 ) on SSH. When I run openframe from console I get a lot of errors when displaying art randomly. Any ideas on what could be happening? I'd be happy to do further testing on the Pi 4!

Thanks for your contribution to this project! I got pretty excited when Raspberry Pi 4 support was added - then 4k becomes possible, which is a huge step forward!

trigger openframe in python?

is it possible to launch openframe in a python script?

I don't know, maybe a sensor triggers the default artwork in my collection?

A

Only displaying shaders Raspi 2

It seems that my install of Openframe is operating fine, but it can only display shaders. When I attempt to load an image, jpg or other, it only displays a blank grey screen. I have installed it on a raspberry pi 2, so I'm wondering if I have an issue with memory?

Below is an image of the console. It loads shaders fine, and when I try and display a jpg it does nothing but show a blank grey screen.
https://goo.gl/photos/7JtGxaQnycXtwjXQ9

Improvement: Show original source file and line number on errors

Follow up from #56. Sometimes during development you get errors like the following:

(node:6870) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): undefined
(node:7167) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token var

It's hard to understand where they come from as they don't mention the original source file and line number. Is there any way to display the original source file and line number?

Thanks.

Why an account?

Hi. Congratulations for the project, i just installed it on a Raspberry Pi and think the whole idea sounds quite cool, but i don't understand the need for an account (mandatory). This looks like a serious compromise for an open source project. What is this account supposed to be used for? Thanks

Image/glslviewer extensions: How to switch between Pi 4 and other versions

Image extension and glslviewer extensions use different drivers for the graphics card depending on what version of the Pi they are installed. For example if you installed Openframe on a Pi 4 and want to switch to another Pi (using the same SD card or image) those extensions don't work anymore. Is there a way to reinstall/reconfigure the extensions to make them work on a different version of the Pi?

Ideally, the extensions (or Openframe) would recognise this automatically and switch to the right version.

Thanks.

Blank screen - server can't be found

Hi! I had my openframe off for the last couple weeks since I grabbed the rPi USB cord for something else. I plugged it back in the other day, I think after the update was rolled out, and only got a black screen instead of any graphics output.

I ran the update just now, and am still getting the same thing.

I ssh'd into the rPi and when I try to run openframe I get this output in the console:
[o] ERROR: The server is not available.

I'm running on an rPi 1 model B, which had some issues previously loading images or video, but worked fine for shaders.

NPM link problem

I keep getting errors while working on the Processing extension. I think they are related to npm link.

I set up everything as described in the dev guide. The Repos are located as follows:

~/Openframe/
~/Openframe-Processing/

I recognised that there must be another step after the end of the guide as Openframe yet needs to recognise and register the extension with the server and the local config file. So from within ~/Openframe/ I did node ./bin/cli.js -i openframe-processing.

I was then able to work for a while. Unfortunately, at some point, I got these errors when loading content of type openframe-processing:

The artwork format is not installed: openframe-processing 
(node:6870) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): undefined

I think it happened when I installed another package like npm install --save request from within ~/Openframe-Processing/. Could this be the reason in combination with npm link? If so, how could I work around it?

Once the error is there, and I try node ./bin/cli.js -i openframe-processing again in order to register the extension another time I get this error:

[o]   Installing openframe-processing extension...
(node:7167) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token var

I did check the symlinks in the global node installations and the local packages node_modules folder. They are both active. I also checked ~/.openframe/frame.json – the extensions property lists the openframe-processing extension:

…
"extensions": {
    "openframe-image": "*",
    "openframe-glslviewer": "*",
    "openframe-website": "*",
    "openframe-video": "*",
    "openframe-processing": "*"
  }
…

In the webapp the frame also show this extension as installed.

What's wrong? How can I solve this?

The only thing that helped last time was reflashing the SD card and starting from scratch.

Thanks a lot.

Processing sketch not working

I tried pushing this Processing sketch to my frame and it gave this error:

 openframe:frame_controller ready +5s
  openframe:frame_controller changeArtwork { title: 'Flocking by Daniel Shiffman',
  is_public: true,
  url: 'https://www.dropbox.com/s/me3pm1lv3tx3pg9/Flocking.zip?dl=1',
  thumb_url: 'https://i.ibb.co/4PbMpt7/image.png',
  author_name: 'J',
  required_extensions: {},
  format: 'openframe-processing',
  id: '5d8546bfa38167076035bd5e',
  ownerId: '5d51eb67a38167076035bca6',
  created: '2019-09-20T21:38:07.626Z',
  modified: '2019-09-20T21:38:07.626Z',
  is_author: true } +20ms
  openframe:frame_controller details undefined undefined { title: 'Flocking by Daniel Shiffman',
  is_public: true,
  url: 'https://www.dropbox.com/s/me3pm1lv3tx3pg9/Flocking.zip?dl=1',
  thumb_url: 'https://i.ibb.co/4PbMpt7/image.png',
  author_name: 'J',
  required_extensions: {},
  format: 'openframe-processing',
  id: '5d8546bfa38167076035bd5e',
  ownerId: '5d51eb67a38167076035bca6',
  created: '2019-09-20T21:38:07.626Z',
  modified: '2019-09-20T21:38:07.626Z',
  is_author: true } { name: 'openframe-processing',
  display_name: 'Processing (pde)',
  download: true,
  start_command: [Function: start_command],
  end_command: 'pkill -f X && pkill -f java',
  xinitrcTplPath: '/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe-processing/scripts/.xinitrc.tpl' } +18ms
  openframe:frame_controller download +33ms
  openframe:downloader downloading https://www.dropbox.com/s/me3pm1lv3tx3pg9/Flocking.zip?dl=1 +11ms
  openframe:pubsub pubsub client connected +1s
  openframe:downloader Artwork downloaded +2s
  openframe:frame_controller swapArt +10ms
  openframe:frame_controller startArt +7ms
  openframe:processing unzip sketch +0ms
  openframe:processing Extracted file 1 of 10 +890ms
  openframe:processing Extracted file 2 of 10 +21ms
  openframe:processing Extracted file 3 of 10 +21ms
  openframe:processing Extracted file 4 of 10 +222ms
  openframe:processing Extracted file 5 of 10 +6ms
  openframe:processing Extracted file 6 of 10 +6ms
  openframe:processing Extracted file 7 of 10 +6ms
  openframe:processing Extracted file 8 of 10 +6ms
  openframe:processing Extracted file 9 of 10 +7ms
  openframe:processing Extracted file 10 of 10 +6ms
  openframe:processing Finished extracting +16ms
  openframe:processing wrapped directory exists > move files +9ms
  openframe:processing hideBackground +113ms
  openframe:processing clone template +157ms
  openframe:processing extend tokens +108ms
  openframe:processing replace tokens +10ms
  openframe:processing [Function: _replaceTokens] /home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/openframe-processing/scripts/.xinitrc { '$url': 'https://www.dropbox.com/s/me3pm1lv3tx3pg9/Flocking.zip?dl=1',
  '$id': '5d8546bfa38167076035bd5e',
  '$filepath': '/tmp/5d8546bfa38167076035bd5eFlocking.zip',
  '$filename': 'Flocking.zip',
  '$tmpSketchPath': '/tmp/Flocking',
  '$flags': '' } +7ms
  openframe:processing build command +485ms
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn xinit ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

I tried downloading the zip file locally and it builds/runs in Processing.

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.