Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Apr 2018
    Posts
    3
    Member #
    58809

    Creating website to display weather graphs

    Hi,

    I am an experienced C++ programmer, but have never worked with web design before.

    I have a weather station outside mye house logging wind, temperature, humidity, etc.The data is stored in a file on my computer.

    I want to create a web-site where the data is displayed in real time as graphs. But I have no idea how to get started. Could someone please recomment which tools ect. I should use to make my web-site. I think I'm able to create a web server, so it's the web site itself I need help with.

    Thanks a lot in advance!

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    What is the model / make of your weather station? How does it connect to PC?

    With an Arduino, Raspberry Pi, or Electric Imp, all data can be immediately sent to a remote website using WiFi. You won't even need your PC. The issue would be how the weather station transmits its data.

    The website would be using PHP and an SQL database. There are probably existing JQuery weather station GUI's that could be used. PHP would grab data from database (as that is where your data would be stored) and dynamically generate a webpage.

    Something like that. I make it sound simple, but it probably isn't.


  4. #3
    Junior Member
    Join Date
    Apr 2018
    Posts
    3
    Member #
    58809
    Thanks a lot, mlseim! All I hoped for was a point in the right direction, and your answer seems to have given me just that.
    I'ts a home made weather station and I'm reading the sensors directly on an old PC I had laying around.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    Describe the electronics. What the sensors go to, as they attach somehow to your old PC.

    I might have some hardware ideas for you ... as in Arduino. Not very expensive either.


  6. #5
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Member #
    58446
    The transition from C++ to PHP is fairly easy. I would recommend outlining how you would plan to do it in C++ using psuedo code and then "translate" that to PHP. You'd be surprised how similar the languages feel.

    On a super high level I'd use PHP to read the text file and dump it into a MySQL database (run this php script on a minutely cron or whatever makes sense for data refresh times.) Then I'd use a php based site to pull from the database and display it in a graph.

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,772
    Member #
    5580
    Liked
    723 times
    You can get your own website w/domain name for only $40 for the first year. After that, it's like $60?
    www.cleverdot.com is one of the cheap webhosts I'm describing.

    I mention a paid webhost because they have all of the PHP and MySQL database you need. You can do all of your scripting online and best of all, you can use your website for other things ... not just a weather station. Free webhosts are not really "free". And they limit use of databases and some don't allow PHP scripting. You also want your own domain name, which comes with the $40 cost for the first year.

    Connecting your weather station hardware to a micro-controller that is connected to your home WiFi, the data gets uploaded automatically. You don't need to use your PC, except to visit your website. View your weather data from anywhere.

    You'll have a learning curve though ... not only the micro-controller with WiFi, but the PHP scripting, the graphic user interface (web page) and the database.

    But we're here to help.


  8. #7
    Junior Member
    Join Date
    Apr 2018
    Posts
    3
    Member #
    58809
    Thanks again to both of you. I really appreciate the input. I will start reading up on PHP, MySQL and JQuery for now, and probably ask more questions later on

    The reason I have the sensors connected to a PC is that I had it just laying and wanted to put it to use, both for reading the sensors (RS232) and for hosting a web server. So I think I will stick to that for now, and maybe do an arduino-upgrade at a later stage. If there is one thing I have learned from earlier projects, it is not to be too ambitious from the start


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com