Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

LUA script and weather


Question

Posted

Hi,

I want a LUA script for get the weather conditions in the HC2? Is it possible? Any function in the API?

PD: I dont want a external request (WU, Yahoo, etc)

Thanks.

5 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this link.

  • 0
  • Inquirer
  • Posted

    Please login or register to see this link.

    Thanks Jompa68, but i want a script to get this information in local variables!

    • 0
    Posted

    There you go:

    Please login or register to see this code.

    or any other name field that you can find from:

    HCIP/api/device?id=3

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    pfff. why didn't I think of this any earlier. I use many scripts which do the same way as jompa suggested

    Please login or register to see this image.

    /emoticons/default_tongue.png" alt=":P" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
  • Inquirer
  • Posted
    There you go:

    Please login or register to see this code.

    or any other name field that you can find from:

    HCIP/api/device?id=3

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    pfff. why didn't I think of this any earlier. I use many scripts which do the same way as jompa suggested

    Please login or register to see this image.

    /emoticons/default_tongue.png" alt=":P" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Woooow very easy!! Thanks

    • 0
    Guest berga_s
    Posted

    The parameters that could be used are:

    • "ConditionCode":"30",
      "Humidity":"78",
      "PreviousConditionCode":"20",
      "PreviousHumidity":"73",
      "PreviousTemperature":"21",
      "PreviousWeatherConditionConverted":"fog",
      "PreviousWind":"8.05",
      "Temperature":"19",
      "WeatherCondition":"rain",
      "WeatherConditionConverted":"cloudy",
      "Wind":"9.66",
      "saveLogs":"1",
      "TemperatureUnit":"C"

    What "ConditionCode" mean and which value can get?

    Which is the difference between "WeatherCondition" and "WeatherConditionConverted"? Which value they can get?

    ConditionCode, Humidity, Temperature, WeatherCondition, WeatherConditionConverted, and Wind are the actual values o the forecast for the day?

    I would like to buld a dynamic string with the forecast for the day to be sent to Sonos speaker and play in the wake up scene... any one already done?

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...