Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Data Logger with webserver

datalogger webserver database

  • Please log in to reply
5 replies to this topic

#1 Lingue

Lingue
  • Members
  • 27 posts

Posted 05 March 2014 - 01:34 AM

hi.. i have question . im using ue9 python 

 

 

how to save datalogger(temperature) to database and then this data want to show to webserver on beaglebone for webserver ?

thx



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 05 March 2014 - 02:15 PM

We do not provide database or webserver software, but here's a BeagleBone web server installation guide and a MySQL Python interface I found doing a web search to help get you started. After getting the temperature from the UE9 you can insert (log) the reading into your database:

 

http://www.element14...ql-installation

http://dev.mysql.com...ctor-python/en/



#3 Lingue

Lingue
  • Members
  • 27 posts

Posted 05 March 2014 - 07:40 PM

We do not provide database or webserver software, but here's a BeagleBone web server installation guide and a MySQL Python interface I found doing a web search to help get you started. After getting the temperature from the UE9 you can insert (log) the reading into your database:

 

http://www.element14...ql-installation

http://dev.mysql.com...ctor-python/en/

thankyou ljsupport



#4 Lingue

Lingue
  • Members
  • 27 posts

Posted 05 March 2014 - 11:46 PM

We do not provide database or webserver software, but here's a BeagleBone web server installation guide and a MySQL Python interface I found doing a web search to help get you started. After getting the temperature from the UE9 you can insert (log) the reading into your database:

 

http://www.element14...ql-installation

http://dev.mysql.com...ctor-python/en/

i have question, how to insert datetime python into database ?
i got the datetime but i don't know how to insert into database
can anyone help me?
this code:
 
    >>> from time import gmtime, strftime
    >>> strftime("%Y-%m-%d %H:%M:%S", gmtime())
    '2009-01-05 22:14:39'


#5 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 06 March 2014 - 01:00 PM

Using MySQL, first you will need a table to insert the data into. Then you use the INSERT statement to insert your data into your database's table.

 

Refer to the second link I provided as it provides MySQL and Python documentation. Section 5 of the developer guide provides example code for creating tables and inserting rows into the tables. The examples have tables that use the DATE type, but you will want the DATETIME type for both the date and time. The DATETIME type uses the 'YYYY-MM-DD HH:MM:SS' format, so your date string looks good.



#6 Lingue

Lingue
  • Members
  • 27 posts

Posted 10 March 2014 - 02:20 AM

Using MySQL, first you will need a table to insert the data into. Then you use the INSERT statement to insert your data into your database's table.

 

Refer to the second link I provided as it provides MySQL and Python documentation. Section 5 of the developer guide provides example code for creating tables and inserting rows into the tables. The examples have tables that use the DATE type, but you will want the DATETIME type for both the date and time. The DATETIME type uses the 'YYYY-MM-DD HH:MM:SS' format, so your date string looks good.

yes, i need to install phpmyadmin for database, it works. thanks ljsupport





Also tagged with one or more of these keywords: datalogger, webserver, database

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users