{"id":18367104,"url":"https://github.com/synox/openweathermap-spark-lib","last_synced_at":"2025-07-21T03:33:13.809Z","repository":{"id":15568816,"uuid":"18304180","full_name":"synox/openweathermap-spark-lib","owner":"synox","description":"DISCONTINUED: openweathermap.com implementation for Spark-Core","archived":false,"fork":false,"pushed_at":"2016-04-26T13:09:50.000Z","size":13,"stargazers_count":16,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T16:39:52.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-31T18:51:19.000Z","updated_at":"2021-11-29T21:42:31.000Z","dependencies_parsed_at":"2022-09-12T06:50:51.628Z","dependency_job_id":null,"html_url":"https://github.com/synox/openweathermap-spark-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synox/openweathermap-spark-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synox%2Fopenweathermap-spark-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synox%2Fopenweathermap-spark-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synox%2Fopenweathermap-spark-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synox%2Fopenweathermap-spark-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synox","download_url":"https://codeload.github.com/synox/openweathermap-spark-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synox%2Fopenweathermap-spark-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266235438,"owners_count":23897180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T23:20:00.468Z","updated_at":"2025-07-21T03:33:13.775Z","avatar_url":"https://github.com/synox.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Weather Library for Spark-Core\n=============\n\n\n*You should use the web-hook used in the project https://github.com/pkourany/RGBPongClock rather than this library. There it is much easier. There you just need to strip of the stuff you don't need. Good luck.* \n\n\nThis is a simple library to load weather information from openweathermap.com, made for spark core (http://spark.io) (Arduino compatible).\n\nIt's free, you just have to sign up for an api-key at: http://openweathermap.org/appid\n\n\u003e This library should be considered **alpha** tested software. Please report any problems, I am happy to help. \n\n## Installation\n* You have to download the ``HttpClient.cpp``/``HttpClient.h`` files from [HttpClient library](https://github.com/nmattisson/HttpClient) to your project. \n* As well download the Parser library https://github.com/bblanchon/ArduinoJson with the ``.cpp`` and ``.h`` files.\n* Download the files ``.cpp``/``.h`` files from this project page. \n\nIf you are building locally, change the file ``build.mk`` and add the ``.cpp`` files. \n\n\n## Usage\nSee the following code, replace the location and the api key. \n\n\t\t\n```c++\n#include \"openweathermap.h\"\n#include \"HttpClient.h\"\n\n\nWeather* weather;\nHttpClient* httpClient;\n\nvoid setup() {\t\t\n\thttpClient = new HttpClient();\n\tweather = new Weather(\"London,UK\", httpClient,\n\t\t\t\"INSERT your api key here!\");\n\tweather-\u003esetCelsius();\n\t// or weather-\u003esetFahrenheit();\n}\n\nvoid loop() {\n\tweather_response_t resp = weather-\u003ecachedUpdate();\n\tif (resp.isSuccess) {\n\t\tSerial.print(resp.temp_low);\n\t\tSerial.print(\"-\");\n\t\tSerial.print(resp.temp_high);\n\t\tSerial.println(resp.descr);\n\t}\n}\n```\n\n\nThere is also a non-cached method, if you want to handle caching yourself: \n\n```c++\n\t\tweather_response_t resp = weather-\u003eupdate();\n```\n\n\nAlso see the example in the project directory. \n\n\n## Weather data\nCurrently the library loads the high and low temperature for today, including a short description. You can see the list of Condition-Codes at: http://openweathermap.org/wiki/API/Weather_Condition_Codes\n\n\n### Can I extend it to include other data?\nSure! Look at the data: http://api.openweathermap.org/data/2.5/forecast/daily?q=London\u0026mode=xml\u0026units=metric\u0026cnt=2\n\nthen change the method ``Weather::parse`` and extend the ``weather_response_t``. \n\n\n## How could I help? (TODO)\n* test in Spark web ide\n* make two distribution files (cpp and h) including everything, to make it easier to include in a project\n\n\n\nHave fun! Share!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynox%2Fopenweathermap-spark-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynox%2Fopenweathermap-spark-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynox%2Fopenweathermap-spark-lib/lists"}