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!



Smart Home Forum by FIBARO Team

Search the Community

Showing results for tags 'openweathermap'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie


  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL





Found 2 results

  1. Hello, iam implementing automated heating which would consider weather temperature forecast for heating. Unfortunatelly although everything works fine iam not able to get forecast from ope weather. Everything works when i send same request using browser but as soon as i send it through Lua. API returns 401 Invalid API key. See yourself: local openWeatherAPIKey = "xyxyxy" -- You need to fill this out function process_heating() -- inside here i have implementation of heating itself, not interesting... end local location = api.get("/settings/location") local lat = location.latitude or 0 local lon = location.longitude or 0 local locStr = "lat="..lat.."&lon="..lon local opts = "&units=metric&cnt=1&appid="..openWeatherAPIKey local fullRequestUrl = "http://api.openweathermap.org/data/2.5/forecast?"..locStr..opts fibaro.debug("topeni", fullRequestUrl) local http = net.HTTPClient() http:request(fullRequestUrl, { options = { checkCertificate = false, method = "GET", timeout = 5000 }, success = function(res) local openWeatherData = res.status == 200 and json.decode(res.data) local max_temp = 0 if openWeatherData then max_temp = openWeatherData.list[0].main.temp_max fibaro.debug("topeni", "Today max temp: "..temp_max.."C") elseif res.status == 401 then local resp = json.decode(res.data) fibaro.debug("topeni", "Unable to load weather data 401: "..resp.message) fibaro.debug("topeni", fullRequestUrl) else fibaro.debug("topeni", "Unable to load weather data "..res.status) end process_heating(max_temp) end, error = function(res) fibaro.debug("topeni", "Unable to load weather data: "..res) process_heating(0) end }) Script outputs final request URL in case of failure to console. When i run this it fails, when i copy that final URL to web browser i get data as expected. Any idea what could be wrong?
  2. jompa68


    Version 1.0.0


    -- Fetch data from OpenWeatherMap API -- Requires registration, free account. https://home.openweathermap.org/users/sign_up -- List of city ID city.list.json.gz can be downloaded from http://bulk.openweathermap.org/sample/ -- 2019-03-20 - Beta version You can use lang parameter to get the output in your language. OWM support the following languages that you can use with the corresponded lang values: Arabic - ar, Bulgarian - bg, Catalan - ca, Czech - cz, German - de, Greek - el, English - en, Persian (Farsi) - fa, Finnish - fi, French - fr, Galician - gl, Croatian - hr, Hungarian - hu, Italian - it, Japanese - ja, Korean - kr, Latvian - la, Lithuanian - lt, Macedonian - mk, Dutch - nl, Polish - pl, Portuguese - pt, Romanian - ro, Russian - ru, Swedish - se, Slovak - sk, Slovenian - sl, Spanish - es, Turkish - tr, Ukrainian - ua, Vietnamese - vi, Chinese Simplified - zh_cn, Chinese Traditional - zh_tw. Scene updates VD
  • Create New...