GithubHelp home page GithubHelp logo

timgrossmann / storagesystem Goto Github PK

View Code? Open in Web Editor NEW
238.0 13.0 22.0 125.29 MB

๐Ÿ—’๏ธ Personal Stock Control System

License: MIT License

Java 90.80% CSS 1.16% JavaScript 3.71% HTML 4.33%
javafx java-8 managaement javafx-application raspberry-pi maker gui stock

storagesystem's Introduction

StorageSystem

GitHub license built for RaspberryPi built with JavaFX

Personal Stock Control System

Don't you know the struggle with going to the grocery store and only then realizing you forgot to check what you still got at home and what you should buy. I had this problem quite often and ended up buying the stuff i already had, which led to me having 10 bottles of ketchup in my basement. The worst of it is, that i nearly always forgot to buy the stuff i needed. This ended up with me having to go for a second ride.
For a guy living in a rural area this is more than annoying.

img of finished system with link to youtube video

Note: This is just a temporary image until I get the time to make a image and video of the final, installed one

Features

  • Keep track of the products in stock
  • Add and Remove products by scanning their barcode
  • Print an overview of the products in stock with your default printer
  • Print a shopping list with all the products 0 left in stock
  • Built for RaspberryPi Model3
  • Pretty low cost system for your household
  • 3D printfile of the case
  • Easy web interface to search all your products by name, amount or categorie

Description

This is a "small" personal project where i'll use Java, JavaFX, the Gson-Libary, Apache-Web-Server, JSON-server and Outpan.com as Barcode libary to fix this problem for me.
You can keep track of the items you have, the ones that are running out and the ones that are already empty. You can print out an overview of the stocks or a list of items that are already out of stock. If you're on the go, you can VPN into your home network and check which item and how many of them are still in stock.

I'll try to keep the setup costs as low as possible, so it'll be a system everyone can build. I have to admit, that it got more expensive than i thought. (You could decrease the price by just buying a Pi (35โ‚ฌ) and a smaller screen (30-45โ‚ฌ) to about 100โ‚ฌ).

Physical parts are:

  • TaoTronics USB Laser-Barcodescanner (23โ‚ฌ)
  • RaspberryPI 3 StarterKit which includes: (100โ‚ฌ)
    • Raspberry Pi 3
    • Your Choice of Pibow 3
    • 8GB NOOBs microSD card
    • Chiclet Keyboard
    • Optical Mouse
    • Official Raspberry Pi 2A PSUn>
    • HDMI cable
    • Raspberry Pi Stickers
  • Tontec 7 inch High Resolution 1024 * 600 Screen Display LCD TFT Monitor(55โ‚ฌ)

Total costs: 178โ‚ฌ

alt tag

  • UI of the JavaFX App

alt tag

  • Very Simple but responsive WebPage of the Items

alt tag alt tag alt tag alt tag

1. Finished print, printed with an Objet30 3D printer.

2. The case still has the wax like support structure in the holes and a thin layer all around.

3. It's possible to remove the support material with the fingers. It's pretty crumbly.

4. The company has this stationary pressure washer.

5. There are two different hoses with different pressure.

6. With enough time you can get rid of all the support structure.

Documentation of the problems with solutions

Running JavaFX with Maven

The first small problem was to get JavaFX running with Maven. Since i wanted to use the Logging-Framework Log4J, Maven was pretty easy to use and a good choice.
Problem: Deploying JavaFX as .jar to be executed via the commanline
Solution: Using the "JavaFX Maven Plugin" from https://github.com/javafx-maven-plugin/javafx-maven-plugin and building the .jar file on a PC/MAC/Linux computer


Running the JavaFX .jar on PI

Starting a JavaFX Application on a RaspberryPi isn't that easy, since Oracle removed JFX from their ARM install.
Problem: Installing Java ARM and getting JavaFX seperately
Solution: Installing the latest Oracle Java ARM version, removing all the other Java installations (making sure the now installed one is used). Downloading the "JavaFX Embedded SDK" here: http://gluonhq.com/labs/javafxports/downloads/ and extracting the parts in the corresponding folders of the oracle Java version.


JavaFX GUI displaying black/wrong

On the first working startup of the .jar file on the Pi, the whole screen turned black. Only one or two buttons displayed with a completely different style than defined.
Problem: The graphics memory is too low, by default < 100.
Solution: Increase the graphics memory usage of your Pi to 512 in the settings. Or using the CLI edit /boot/config.txt (you might need sudo rights) from whatever gpu_mem says to gpu_mem=512. (I'm using RasperryPi 3 so you might need to use a lower gpu_mem setting)


GUI has black borders all around

The whole screen is smaller than your display (has black borders) and is shifted.
Problem: Overscan of your config is disabled
Solution: Uncomment the line #disable_overscan=0 (remove the #) in the /boot/config.txt and reboot your Pi.


Make the GUI resize for different screens without fullscreen

If the GUI should be the size of the full display, but without using the fullscreen option
Problem: Fullscreen makes the access to the Desktop harder, you might want to be able to access the Desktop while your GUI is runnign.
Solution: In your programcode, when setting up the primaryStage, set the size of your primaryScene to the dimensions of you display. You can do this with:

Rectangle2D displayDims = Screen.getPrimary().getBounds();
Scene primaryScene = new Scene(root, displayDims.getWidth(), displayDims.getHeight());

The Desktop on NOOBS is not the real Desktop path

If you want to save a File to the Desktop, in Java you can do it like this.

new File(System.getProperty("user.home") + "/Desktop")

Problem: On the Pi, the user.home/Desktop is not the Desktop you get displayed when starting up the Pi.
Solution: You can create a soft link of the file on the user.home/Desktop to the file you created on your visible Desktop. Once your programm changes the user.home/Desktop file, since you linked them, the one on your visible Deskotp will also be changed. This is done like this:

ln -s {target-filename} {symbolic-filename}   

PI is not using the right Resolution of your Display

If you realize, that your JavaFX Application is smaller and squished you should change the hdmi settings of the PI
Problem: The displayed resolution is smaller than the actual resolution your display is capable of
Solution: Take a look at https://www.raspberrypi.org/documentation/configuration/config-txt.md on how to change the displayed resolution. For me the solution was to change the hdmi_group -> 2 (since it's a monitor and not a TV) and then you just have to search the right resolution in the hdmi_mode table. For me it was hdmi_mode -> 16

storagesystem's People

Contributors

dependabot[bot] avatar timgrossmann 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

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.