HUB
Sign inSign up

2smartdev/yahoo-weather

By 2smartdev

•Updated over 5 years ago

Image
0

574

2smartdev/yahoo-weather repository overview

⁠Virtual device - Weather station

This is a virtual device for the 2smart-cloud platform, it retrieves weather data for entered city from Yahoo Weather API and publishes it to sensors

⁠Instruction to configure and start the device

⁠Create a config file

Create a file with the name "config.json" and paste the next template to it:

{
    "userEmail": "",
    "token": "",
    "productId": "",
    "mqttUri": "",
    "deviceId": "",
    "yahoo": {
        "appId": "",
        "consumerKey": "",
        "consumerSecret": "",
        "apiUrl": ""
    }
}
⁠Create Yahoo App

Create your Yahoo App following steps by the link: https://developer.yahoo.com/weather/⁠ and write down received "App ID", "Client ID (Consumer Key)" and "Client Secret (Consumer Secret)" for the next steps

⁠Setup config file

Fill each field according to next descriptions:

  • userEmail - email related to your account
  • token - 2smart-cloud access token
  • productId - a product ID
  • mqttUri - production or sandbox 2smart-cloud app URI
  • deviceId - a device ID, leave it empty if your entered production MQTT URI, it will be generated automatically
  • yahoo:
⁠Start application

In the directory where you created the config.json file run the next command:

docker run -d -v "${PWD}:/config" 2smartdev/yahoo-weather:cloud
Tag summary
Recent tags
Content type
Image
Digest
Size
53.2 MB
Last updated
over 5 years ago
docker pull 2smartdev/yahoo-weather:cloud