Announcement

Collapse
No announcement yet.

Do_More Forecast

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Garry
    replied
    BRX PLC HTTP JSON Instructions
    I have done a post on this instruction for the BRX PLC. It will get weather conditions from the internet for Atlanta.
    https://accautomation.ca/brx-plc-http-json-instructions
    Video
    https://youtu.be/MrCt1STwILU
    Let me know what you think.
    Thanks,
    Garry

    Leave a comment:


  • Bolt
    replied
    Originally posted by BASINT View Post
    FYI, since the free Weather Underground API shutdown I've switched my personal webapp to the DarkSky API.
    This seems to be a good substitute API for WU.
    I too switched over to the DarkSky API. It works good, easier to get all my data in 1 (simple) request, I would say the data is a little more accurate/localized, and I can poll it more frequently. Win, win, win.

    Leave a comment:


  • pbw
    replied
    Originally posted by BASINT View Post
    FYI, since the free Weather Underground API shutdown I've switched my personal webapp to the DarkSky API.
    This seems to be a good substitute API for WU.
    Thanks for the update.

    Leave a comment:


  • BASINT
    replied
    FYI, since the free Weather Underground API shutdown I've switched my personal webapp to the DarkSky API.
    This seems to be a good substitute API for WU.

    Leave a comment:


  • BobO
    replied
    Originally posted by ControlsGuy View Post

    Cool! Will that be a v3 thing?
    DmD 2.4. Next month.

    Leave a comment:


  • ControlsGuy
    replied
    Originally posted by BobO View Post
    Y'all gonna like what's coming. HTTPCMD will reduce the web query to a single box. Output from query is then fed into one or more JSONPARSE instructions to access content. The web server tools will make it easy to push info back out too. Neat stuff coming.
    Cool! Will that be a v3 thing?

    Leave a comment:


  • Bolt
    replied
    FYI, don't work on this specific API, as the weather underground API service will be dead at the end of the year.

    But the concept will work with other API's just the same. I have not found one for my use yet.
    We’re contacting you today to tell you about some upcoming changes to the Weather Underground (WU) API and what these changes mean for you. The WU API h...

    Leave a comment:


  • pbw
    replied
    Thanks Bolt. Will look at this.

    Leave a comment:


  • BobO
    replied
    Y'all gonna like what's coming. HTTPCMD will reduce the web query to a single box. Output from query is then fed into one or more JSONPARSE instructions to access content. The web server tools will make it easy to push info back out too. Neat stuff coming.

    Leave a comment:


  • Bolt
    replied
    The file on my server looks like this:
    Code:
    <?php 
    $json = file_get_contents("http://api.wunderground.com/api/abcdefghijkl/conditions/q/12345.json");
    $json_data = json_decode($json,true);
    echo "[epoch]";
    echo($json_data[current_observation][observation_epoch]);
    echo "[tempf]";
    echo($json_data[current_observation][temp_f]);
    echo "[humid]";
    echo($json_data[current_observation][relative_humidity]);
    echo "[windd]";
    echo($json_data[current_observation][wind_degrees]);
    echo "[winds]";
    echo($json_data[current_observation][wind_mph]);
    echo "[windg]";
    echo($json_data[current_observation][wind_gust_mph]);
    echo "[dewpt]";
    echo($json_data[current_observation][dewpoint_f]);
    echo "[feels]";
    echo($json_data[current_observation][feelslike_f]);
    echo "[weathdone]";
    ?>
    abcdefghijkl being your API login, 12345 being your zip code.

    The BRX does a scheduled STREAMOUT (no more than once every 3 minutes to stay within terms of API) to the WebServer,
    Code:
    GET http://serverip/weather.php$0D$0A
    This returns a string,
    Code:
    [epoch]1539700907[tempf]41.7[humid]83%[windd]23[winds]4[windg]0[dewpt]36[feels]39[weathdone]
    This can be used with STRFIND and STRSUB and STR2INT, etc to get the values into a variable.

    I got a lot of help in this post:

    Leave a comment:


  • pbw
    replied
    Originally posted by Bolt View Post
    Hey pbw, I just noticed this post. I have done (almost) exactly what you are doing on a BRX. Only I am grabbing current conditions. Forecast wouldn't be much different. I did it all through api.wunderground.com, the only catch is that for simplicity, I am parsing the data into simpler output on a web server local to the PLC's network. It could be any PC or server on the network, it's really quite simple once I got it all figured out. Let me know if you want more info.
    Yes, I do want to know more!
    I decided to put it off for a while and wait for the up coming Do-More release, but if you're willing to point me in the right direction, I'd gladly start with grabbing the current condition and then work up to the forecast.

    Leave a comment:


  • Bolt
    replied
    Hey pbw, I just noticed this post. I have done (almost) exactly what you are doing on a BRX. Only I am grabbing current conditions. Forecast wouldn't be much different. I did it all through api.wunderground.com, the only catch is that for simplicity, I am parsing the data into simpler output on a web server local to the PLC's network. It could be any PC or server on the network, it's really quite simple once I got it all figured out. Let me know if you want more info.

    Leave a comment:


  • MikeN
    replied
    That's awesome.

    Leave a comment:


  • mls061
    replied
    Version 2.3 of Do-more can do an MQTT subscribe to a weather service that could get you the data. The returned data will be in a String; you can then parse the data using the other String functions.

    The ability to do an HTTP Get(), Head(), Put(), Post(), and Delete(), and the ability to parse & build JSON-formatted records is coming in the next release.

    Leave a comment:


  • g.mccormick
    replied
    Do you need to get current conditions? If so it may be easier to put in an outdoor sensor. You can get analog (4-20MA for temp and RH) or you can get then either serial or ethernet. The serial/ethernet can be setup to just udp stream values to an iport of your choosing. I have used devices from omega, vaisala, and rotronic before.
    At my house I have an ACI analog outdoor temp/RH probe.

    Leave a comment:

Working...
X