Due to climate change, the need for weather information becomes more important nowadays. So we decided to create a console app in Python that will gather real time information regarding the current weather in my area using OpenWeatherMap. The weather will be detected by this API by the means of latitude and longitude information from KeyCDN. This console app will not only give real time information but also it notifies the user about the intensity of current weather base on the color of LED lights. Color GREEN led will light up if the weather is clear, YELLOW if it is cloudy, ORANGE if it is moderately raining and RED if it if extremely raining in a specific area. It also sends weather information to GMAIl account. When the weather information was successfully sent to email in the "Weather Status" labeled folder, IFTTT will send information to Samsung Artik Device.
First, there is a need to know the latitude and longitude of your location. By the use of KeyCDN you can get the device's latitude and longitude.
Next, sign up to OpenWeatherMap to use their API on getting weather information. To get the weather information from their API you need to use the key provided by the website and latitude and longitude provided by KeyCDN.
After the python console application got the weather information from the OpenWeatherMap API, the weather information will be send to email in the "Weather Status" labeled folder. The email by default has no "Weather Status" labeled folder. First you need to create a folder labeled "Weather Status".
Select a message from your inbox and click the button "More" and select "Filter messages like these"
Click "Create filter with this search" to proceed to apply the label "Weather Status" for this filter.
Click "Weather Status" in the "Apply the label" to transfer messages with a "Weather Status" subject to "Weather Status" label.
Information will be added to Samsung Artik Cloud when email was successfully sent and IFTTT is triggered.
Comments