How To Backup and Restore your Inventory Management System

There are two important sections of The Inventory Management System that need to be backup and/or restore. The system stores images that are uploaded in a directory within the source-code. Backup this directory or the entire application to a folder on your file system.

Example:

sudo cp -R /var/www/html/warehouse-inventory-system /home/pi/Downloads/

Backup and Restore Your Database

Export A Database

To Export a database, open up terminal, making sure that you are not logged into MySQL and type,

mysqldump -u [username] -p [database name] > [database name].sql

Backup your Inventory Management System

mysqldump -u'root' -p'password' oswa_inv > /path/to/oswa_inv.sql

The database that selected in the command will now be exported to a file.

Import

Log into mysql command-line interface:

mysql -u'username' -p'password'

If you are having difficulty logging into mysql please see the section below, How to Reset Your Password

WARNING! You are about to permanently delete ALL of your data.

DROP DATABASE oswa_inv;
CREATE DATABASE oswa_inv;
source oswa_inv < /path/to/oswa_inv.sql

Exit mysql.

How to Reset Your Password

When you first install MySQL, you have to set up your root password. However, should you forget it at any point, you can still recover it.

Step One—Shut Down MySQL

In terminal, stop the MySQL process

 /etc/init.d/mysql stop

Step Two—Access MySQL Safe Mode

In safe mode, you will be able to make changes within the MySQL system with a root password alone, without the need for MySQL root password.

sudo mysqld_safe --skip-grant-tables &

Once safe mode has started up, log into MySQL and when prompted, use your standard root password.

mysql -u root mysql

Step Three—Set Up a New Password

Finally, set up the new MySQL root password by typing the command below. Replace “newpassword” with the password of your choice.

update user set password=PASSWORD("newpassword") where User='root';

Be sure to reload everything:

 FLUSH PRIVILEGES;

and you now have a new root password.

More About Electronics:

More About hydroMazing:

More About Indoor Gardening:

Setup hydroMazing Smart Garden System

cropped-hydromazing_smart_garden_system

Setup and Use hydroMazing

  • The Controller ( Arduino Nano ) uses 433MHz Transmitter to send codes to remote-controlled AC Outlets or can connect directly via a transistor, MOSFET, or relay.
  • Web Services Module ( Raspberry Pi ).
    • Optional Web-Camera ( USB Web-Camera ).
  • Optional  ( connect directly via a transistor, MOSFET, or relay.  Supports additional sensors: E.C., pH, Light Intensity, more floats and flow-rate sensors.

I liked the simple inventory management system application so much, I borrowed its web interface to improve hydroMazing:

hydroMazing snapshot

What are the steps needed to use hydroMazing?

  • Connect the Raspberry Pi to your local router using an Ethernet cable.
  • Plug in the hydroMazing Controller unit’s USB to the Raspberry Pi.
  • Optionally, plug in the USB webcam.
  • Power the Raspberry Pi.
  • Use a Power Squid ( Multiple Plugs ) to attach the Remote Controlled AC Outlet Modules to their corresponding appliance assignment according to the hydroMazing Smart Garden System’s settings.

Plug-in appliances to their corresponding remote controlled AC switch units.  Most growing environments can be configured as follows:

  1. Light
  2. Intake Ventilation Fan
  3. Exhaust Ventilation Fan
  4. Humidifier / Heater / Additional Lighting
  5. Pump(s)

Also see Controlling Appliances.

How to Access the Web Interface:

  • Use a wormhole service such as Dataplicity.io
  • Or, Discover the IP address that your router has assigned to the Raspberry Pi, running hydroMazing Services.
  • Or, use a DDNS service to update the dynamic address assigned to your router and directly access the web interface

 

  • Login to the web interface using the admin credentials provided.  Example URL of web interface http//[your-device].dataplicity.io/hydroMazing/
  • Click ~ Settings → Automatic Timezone → Update
  • Click ~ Settings → Email Notifications → [ enter your email address ] → Save
  • If your growing environment is not within an Ethernet cable distance away from the router then you will need to configure the WiFi.
  • Click ~ WiFi Settings → SSID → [ enter your router’s SSID ]

Passkey → [ enter your router’s WiFi password ] → Save

 

hydroMazing chart

 

More About Electronics:

More About hydroMazing:

More About Indoor Gardening:

 

 

Using a Raspberry Pi for your own Inventory Management System

Using a Raspberry Pi for your own inventory management system.

An open-source, inventory management system written in PHP with a MySQL database has no problem operating on a Raspberry Pi. Initially, you’ll only have local network access, but if you want to allow remote web access, you can.

In order to setup a web interface to access, view, and manage the content of your inventory management system you’ll need to set up a LAMP (Linux, Apache, MySQL, PHP) stack on your Raspberry Pi and configure it to work as a web server and set up a basic website which you can access on any device on the same network as your Pi. This is a link to a nice tutorial for setting-up a L.A.M.P. server on your Pi, the WordPress portion is optional, you can stop after installing PHP.

If you plan on having access to your Raspberry Pi through the Internet, you’ll need to configure your router and DDNS settings, or use a service such as dataplicity.io to wormhole to your pi through the web.

Next step is to use an open-source project found on GitHub to start your basic inventory management system.

“OSWA-Inv is a web based Inventory System, that will allow you to keep tracking of the quantity buying and selling price of the products existing in your warehouse or business. When creating a new products, you can set a quantity, buying and selling price.”

Included Features:

  • User Management: Groups, Basic Profile, and Change Password
  • Categories: For organizing products
  • Products: Basic product information, title, quantity, pricing.
  • Sales: Sales transactions are individual by product.
  • Reports: Daily, Monthly, and Ranged Dates Sales/Profit Report

InventoryProducts

Install the Basic Inventory Management System Web Application

After updating the Raspberry Pi and setting up the LAMP stack, installation of the inventory application is relatively painless.

Download the source-code package and then you’ll need to extract the contents to the folder. Either rename the folder to the base name now or after you move it to the web root for Apache Web Server found at /var/www/html/

Use the MySQL command line to import the database schema. Create a database named oswa_inv and import the schema included in the project directory oswa_inv.sql If you haven’t done so, installation is as easy as:

sudo mysql -uroot

mysql> CREATE DATABASE oswa_inv;
mysql> USE oswa_inv;
mysql> source /var/www/html/inventory/oswa_inv.sql

The directory containing the project, especially, the uploads directory, must have write permissions on the system and let the web application be run using the www-data account by executing the following commands from the project directory:

sudo chmod -R 775 uploads/
sudo chown -R www-data:www-data *

Edit the header.php file to suit the needs of your organization. e.g. change to logo
[project folder on server]/layouts/header.php
Same folder also contains the various menus used by the system.

Edit the CSS to reflect the needs of your organization. e.g. change background colors
[project folder on server]/libs/css/main.css

InventoryAdmin

Using the Inventory Management System

  • Secure the default accounts with a change password.
  • Create a user account for each person using the system, including yourself.
    Optionally upload a photo for the user.
  • Add Categories – you’ll need to add at least one category before you can add products.
  • Add Media before you Add Product if you want to associate a photo when you Add Product. Otherwise, you can elect to have no image and updated later.
  • Add Order – before you try to Add Sales.

Improvements

These are the improvements I’ve added for my own system

  • Delete confirmation popup before delete actions
  • Description column for products
  • Location column for products
  • View products by category
  • Add sales from list of products – remove selected from list.
  • Add/Edit/Delete Sales also updates product’s quantity available
  • Order Management for all sales – All sales must be associated with an order number
  • View Sales by Order calculate total
  • Delete Order: deletes all sales associated with order AND restores quantity/stock
  • Add/Edit/Delete Order also updates product’s quantity available
  • Stock: Inventory Management for all products – Log of increase/decrease stock
  • Add/Edit/Delete Inventory also updates product’s quantity available

Improved Version Source-Code

mmexport1472732631987

Support and More!

Basic Inventory Management System Web Application

I’ve spent a great deal of time searching for the right inventory management system for my work. I want the system to be relatively simple, straightforward, with only the necessary bells and whistles. Perhaps, even more important to me is the ability to modify the system to suit my needs. It’s rare to find an off-the-shelf product that can be modified or enhanced to suit needs. Fortunately, there are several open-source projects on GitHub related to Inventory Management System projects. I need to be able to customize the project to suit my needs. Similar to WordPress, the project I have selected is written in PHP and uses a MySQL database.

https://github.com/siamon123/warehouse-inventory-system

“OSWA-Inv is a web based Inventory System, that will allow you to keep tracking of the quantity buying and selling price of the products existing in your warehouse or business. When creating a new products, you can set a quantity, buying and selling price.”

Want more? Check-out the improvements I’ve made:

InventoryAdmin

Using a Raspberry Pi for your own Inventory Management System

Wired or Wireless?

Electricity replaces the sun, wind, and some natural processes as the dependency for plants to grow indoors.  

Starting a Smart Indoor Garden

The first glaring problem with the typical indoor garden is that extension wires are annoying and a potential safety hazard.  On the other hand, wireless communications can lack the reliability of the wired variant.  Going further, should the system be available to the local network or should it be connected to the Internet?

Since plants do not need Internet access in order to grow then we are potentially creating an additional dependency that the plant doesn’t want. The Internet is useful for providing access to your system, but security is questionable, how much control or data should be available?  A connection to the Internet can become another dependency if the system cannot operate without communication to a cloud-based or otherwise remote server. If something can fail; we should plan for the eventual occurrence of that possibility as best as possible. If a long electrical outage were to occur it would be prudent to have a backup generator, or solar rechargeable battery storage system.  If we can have better reliability with a wired connection, then it makes sense to use a combination of wired and wireless.

Next:  Getting Wired and Wireless

Communication options such as i2c, which is great for communicating with another microcontroller or Raspberry Pi and the many wireless options: WiFi, bluetooth, etc.

  • Remote Control using a RF 315MHz / 433MHz
  • Lightweight Bluetooth ( nRF24L01 )
  • Bluetooth ( HC-05 )
  • WiFi Module ( ESP8266 / CC3000 ) etc.

More Info:

Please share with friends and follow to receive a notification when I publish a new article.

 

Why DIY when you could buy?

You value the project because you are able to customize and experience the process of its creation, both physically and mentally.

Practical Reasons:

  • Integrity and dependency on specific vendor:  Complete packages are limited in capability and scalability, also they often include unwanted strings attached, i.e. Advertisements; company owns your data for purposes of profiting by selling for marketing purposes.  Mass produced products are typically not designed for longevity. Can the equipment be repaired or is it disposable?
  • People have complex preferences and want more customizable, possibly less expensive solutions, typically with the trade-off related to labor, can be improved or perform to preferred standards
  • Interest in learning and/or educating others:  You enjoy or have an interest in the activities associated with the process of a subject.
  • Necessity:  Resources and costs vary by region.
  • What else?

Cost considerations

Many items can be purchased locally or sourced from the Worldwide market through the Internet.  I don’t know about you, but I rarely have money to spend on projects and whenever possible reusing and re-purposing junk is ideal.  Many of my projects contain parts I’ve purchased at local dollar stores and items found through eBay online vendors. Online researching, reviewing, and sourcing materials

Time

It takes time to learn how to use tools and equipment successfully, let alone, have the time to actually make the project meet your expectations.  Will you take the time to safely use the equipment necessary to complete the project?  Are you able and willing to troubleshoot problems as they arise?

Time used for the project is time that could be spent with family, friends, learning something more important, etc.

Skill and Ability

Even though it may pain me to swallow my pride, I try not reinvent the wheel.  If I don’t have direct experience performing a task, I take the time to research how others have approached similar problems.  It is best to learn from others before making a serious mistake simply because I don’t want to appear stupid. Practice makes permanent. We cannot expect to become experts on a subject overnight, it’s okay not to know how to do something, try to find someone who can help, take small simple steps towards achieving the goal.

Resources for DIY Hacking Electronics:

For electronics projects, reliably wiring the hardware and designing the software to operate using an Arduino variant or Raspberry Pi, is a challenge.  Hacking Electronics – Simon Monk ( link to Amazon ).  Regardless of your experience level, this book is an excellent resource, what tools are needed, when and how to solder, and many basic fundamentals of working with modern electronics.  The second edition, includes Raspberry Pi.

More Info:

Please share with friends and follow to receive a notification when I publish a new article.