Wiser Weather Station - using Power Meters for your own data

Discussion in 'C-Bus Wiser 1 Controller' started by bmerrick, Jan 11, 2012.

  1. bmerrick

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    Hi All,

    As a follow on to the thread about consolidating 2 solar inverter outputs into a single Wiser Power Meter channels using a 'Virtual Channel' config -see http://www.cbusforums.com/forums/showthread.php?t=7297

    I experimented a little further and found a good config for displaying your own data utilising the Power Meter widget.

    Enter the Wiser Weather Station!!! see jpg1

    The best chance for a good looking output seemed to be using the CO2 setting as the kWh setting did not display all the digits of small numbers. By 'scaling' using the CO2 setting under the Power Meter Manager-Other tab (see jpg 2), you could get the actual real number displayed without it being 0.03kWh on the meter. So using this 1000kg CO2/kWh setting, small numbers would display on the meter, and even sub-decimals. You can see the data in the Power Meter Manager (jpg 3).

    The widget config for 'Pressure' is jpg4. Logic is jpg5.

    I used SystemIOs to bring in the data for the 4 channels but these variables could also be populated from either a text file from your weather station by using ReadLn method, something like:
    AssignFile(file1, 'weather.txt');
    ReadLn (file1,Temperature,Humidity,WindSpeed,Pressure);
    etc

    or by parsing a weather text file from the website your station writes to using something starting like:
    once (Second = 50) then
    begin
    GetHTTPData('http://192.168.0.89/weather/current.lst');
    delay(5);
    ReadHTTPData(WeatherCurrent);
    TempStartPos := pos(WeatherCurrent,'[outdoor_temperature]');
    SetRealSystemIO("TempStartPosition", TempStartPos);
    etc.

    You will need to get the data into the variables yourself based on text parsing your particular weather stations output file. These parsing methods may have to be done on another touch screen (eg cTouch, Schedule PLus or Homegate).

    I created extra 'rooms' for the 4 meters to give it the nice horizontal look or it normally stacks meters vertically in one room or function group.

    So you can display data other than just Power Meter output using your Power Meter widget.

    Enjoy,

    Brad
     

    Attached Files:

    Last edited by a moderator: Jan 11, 2012
    bmerrick, Jan 11, 2012
    #1
  2. bmerrick

    arrikhan

    Joined:
    Oct 16, 2011
    Messages:
    48
    Likes Received:
    6
    Location:
    Australia
    I can't believe no one has replied to this .... :eek:

    I love it !!

    I wish I had come across it sooner. I'm busily trying to get the code to work as we speak and I'm sure I will ask some questions. Are you still using it?

    I'm assuming with this method you get access to hours/days worth of data as a result? ....and the graphs might even show up on the App that connects to the Wiser! :cool:

    I'm curious if anyone has parsed current weather and forecast info from BOM directly from their FTP site to add to this great Weather Station! Seems to be a bit of coding involved with multiple hops between servers to make this a reality (ie: run own web server) which I could do on my QNAP but not really great for customer installs.


    BenC
     
    arrikhan, Jan 12, 2014
    #2
  3. bmerrick

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    Hi Ben,

    Gee, thanks for your kind words and glad you can see some use in it. It was just an experiment more than anything I actually required. I put in a request to the developers to release a 'generic' version of the Wiser meter widget that we could use for logic output, with a system IO text etc for meter name (instead of displaying CO2/KWH/$), but I think nothing ever came of that. Maybe in Wiser 2! It's probably feature request 2 million. :p

    The meters show up almost the same as the PC GUI in the iPhone/iPad version and work fine.

    The main work for you is just parsing your particular weather station's text file, putting the data into variables in logic and outputting via the virtual measurement channel. Luckily the Wiser code now supports GetHTTPData which it didn't at the time on my original post so you should be able to get it going within the Wiser unit itself without a CTC/Homegate/SP etc.

    No, it was just a fun 'plaything' for a while. My actual weather station output is still online at Weather Underground and as www.lanecoveweather.com.au among other feeds.

    In Logic on a Schedule Plus / Homegate touch screen, I parse my weather station's output text file for wind speed which is used for outside Sun-Blind retraction in high wind. I also display temperatures (Min/Max/Trend etc) on some screens and the GUIs, but now find it easier to just use the 'gauges' I created for the lanecoveweather site in an html widget on touch screens.


    The data is stored by the Wiser in the same way as the power meter data is normally stored, but of course it gets redacted for monthly totals so may not be that useful unless you output it every so often.

    It's just page parsing once again from an external HTTP source until you get it sent to the meters.

    No one's done it as far as I know, so give it a shot yourself and let us know back how it looks/goes. Kjayakumar had most of the heavy lifting parsing done in this post which will help you no end.

    Good Luck and glad you found it helpful,

    Brad
     
    Last edited by a moderator: Jan 12, 2014
    bmerrick, Jan 12, 2014
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.