Results 1 to 2 of 2

Thread: Get data from USB and post to MySQL

  1. #1
    Join Date
    Aug 2010
    Beans
    39

    Get data from USB and post to MySQL

    I want to monitor through internet how much power the solar inverter is generating. The inverter has a USB port. I need your guidance, how to read data from the USB port and post to a MySQL server database using php. I can have another php page to get a report from the MySQL database.

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Get data from USB and post to MySQL

    I don't know about reading the data, but you can post to an SQL database using the DB's command-line client. For instance, with PostgreSQL I can run a command like:

    Code:
    psql -U username -c "insert into table_name (field1, field2) values('0730',100)" dbname
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •