tobykurien / rpi_lcars

Star Trek LCARS interface for Raspberry Pi using Pygame
MIT License
658 stars 145 forks source link

Sliders, Graphs, configuration management, integrations, and customizations #7

Open wolfspyre opened 8 years ago

wolfspyre commented 8 years ago

Hi there.

First: This is simply badass. Thank you for your work.

Second: I don't see a slider implementation. I figure that's a piece that is sorta crucial to the interface and you probably have an implementation in mind.

Third: I'd like to see an example of how you'd like integrations submitted. There are plenty of different things... dynamic graphs from monitoring systems, camera feeds, light controls, terminal data, actual weather systems, traffic maps, heat maps, environmental charts, multimedia controls, etc.

not sure how these things would best be integrated such that custom configuration could be deployed alongside the app, and integrations people write could be easily utilized so as to not re-invent the wheel.

Is screenblanking a thing you want to manage?

Would a chef cookbook to deploy this be helpful? it seems that having many LCARS terminals around a location would be cool, however manually configuring everything would likely become painful quickly.

Roughd1433 commented 8 years ago

Would love a cookbook. looking at integrating a pi on a custom bike build and the lcars interface would look great.

tobykurien commented 8 years ago

Thanks for comments! Indeed, there is no slider or radio button or checkbox or any number of other widgets. My laziness! (And I don't know if LCARS has a slider component) Also, I find that just using images, text, and buttons makes for a nice simple user interface that is closer to what you see in movies :)

I don't quite understand what you mean by "integrations". I limit my integrations to GPIO control and images/text. For example, the weather image can be pulled from a website (or generated from SVG or similar) and then blitted to the screen. For camera feeds, I grab JPG/PNG images off the camera via an HTTP GET request, then blit that to the screen. If I need to show the status of something (e.g. are lights on or off?) I pick one of two images representing either state and then blit that to the screen. You get the idea.

I'm not sure why a cookbook would be useful, as I have a setup.sh that you can run to set things up on Raspbian or Ubuntu. To add this to your own project, simply copy everything in app into your project and copy the code in lcars.py into your application's main file. An example of this being done is this project: https://github.com/tobykurien/pi-tracking-telescope where I'm going for an Iron Man look :) Haven't implemented any widgets yet, but they would simply be images, animated gifs and text. I do grab camera images (either RPi camera od USB camera) and blit that to the screen over the UI.

wolfspyre commented 7 years ago

Hm.. well,

It might be nice to, for example, have a nice way to interact with different streams of data which don't conform well to representation simply by swapping out pictures.

a few examples: One might want to be able to interact with homekit devices via this UI, Many of which require more nuance than I think would be elegantly represented by selecting different images.

or perhaps have a stream of mqtt events represented as cards, which could be hard-ish to do consistently, given the data could contain very different shapes it would be hard to have an image be the best container for that data.

I could see myself wanting to display a video stream, or graphs of telemetry...

I think there's value in the ability to create these in an abstract fashion so that others could use them, without reinventing the wheel in the context of rigging them to the UI, or littering the codebase with disconnected mechanisms for interacting with similar things...

does that make sense? sorta... a way one can contribute an action stream to others using this UI to configure for themselves... that allows for custom config to sit alongside the mainline codebase easily.

tobykurien commented 7 years ago

Totally makes sense and I agree with you. I sort-of did this with the https://github.com/tobykurien/pi-tracking-telescope project, where https://github.com/tobykurien/pi-tracking-telescope/blob/master/app/modules/camera.py abstracts cameras (at least between USB webcam and RPi official camera). This could be the start of the integration modules you were thinking of. Pull requests welcome :)

Silverfire9 commented 6 years ago

I came for a different issue, but I noticed the talk about whether LCARS has a slider component, I feel it's safe to say it does, as the Transporter control makes quite famous use of it. Not that I expect it to really make a difference to when it happens... I DO need one for a dimmer control on my implementation, however, so I could share it once I get it working. It would very likely need some serious polishing though, as I"m using this project to learn python!

wolfspyre commented 3 years ago

@Silverfire9 make any progress on that?