Вы здесь
M3-Weather: A Smart-M3 Forecast Widget for Mobile Users
World weather web servers are widely-spread today; let us mention Weather.com as an example. From the client point of view an important problem is receiving up-to-date weather information regularly. In this case, the well-known browser-based approach is not convenient, especially when the users are mobile. Such users prefer smarter (or simpler) scenarios; weather data are displayed on user’s mobile device in accordance with the current geographical location of the user. In particular, the popularity of mobile world-weather clients increases, e.g., OMWeather applet for Nokia 770/n800/n810/n900 devices.
Smart spaces is a paradigm for constructing distributed smart applications. Many mobile users can cooperate proactively with many services according with non-trivial customized business logic. Smart-M3 is an open-source development platform for implementing smart space applications. M3-Weather is a world-weather tourist application implemented in Smart-M3.
M3-Weather client is a desktop widget on Nokia N900 device.
Widget
GPS module detects the current coordinates. Web service Geonames.org provides names of the nearest cities. Web service Weather.com provides weather forecast and other weather-related data. M3-Weather widget looks as shown in the following picture.
You can set IP address of SIB by editing field "Server IP". If new IP address is not valid, it is not saved and the message "Incorrect IP address" appears. After changing the IP address you can set default IP address of SIB by pressing button "Reset IP". Also client UUID can be edited in field "Client ID". You can restart connection with SIB or turn ON/OFF GPS by pressing appropriate buttons.
Architecture
The Smart-M3 architecture of M3-Weather as a distributed application is presented in the next picture. It consists of five KPs: KP-GUI, KP-GPScoords, KP-City, KP-Weather, and KP-coords. The latter KP does not participate in the basic use case, hence the KP is not presented in the scheme.
These agents run on user's mobile device:
-
KP-GPScoords receives coordinates from GPS module and publishes them to SIB
-
KP-GUI receives weather data and city names from SIB and displays then on the screen of device
These agents can run on dedicated servers if the device capacity is low:
-
KP-City receives the current city name from the service and publishes it into SIB.
-
KP-Weather receives current weather data form the server and publishes them into SIB.
A special KP called KP-Coords is mostly for testing. Instead of using GPS, user manually inputs arbitrary coordinates and the KP publishes them into SIB.
Installation instruction and other details are available in M3-Weather manual.
Ontology
Smart space content is structured with ontology. The M3-Weather ontology is shown below. There are three basic classes: Coords, City, and Weather.
Class Coords describes current position of the mobile device. The class has one property pos that is latitude and longitude. One individual of the class represents one device. Class City represents knowledge about a city. It has properties name, cityid, and processed. The former two are a conventional city name and a city ID on the weather service. The latter is an indicator of data actuality. Class Weather has data properties temp, icon, and caption to store the temperature, the number of preinstalled pictures of weather, and short description of weather, respectively.
The M3-Weather ontology is simple and can be easily extended. For example, such extension can describe 5-day weather forecast. Several personal smart spaces can be combined to provide weather data of one user to another.
Project supervision: Dmitry Korzun (PetrSU), Kirill Kulakov, PhD (PetrSU)
Developers:
- Pavel Borovinskiy, bachelor student (PetrSU)
- Ivan Galov, bachelor student (PetrSU)
- Anna Samoryadova, bachelor student (PetrSU)
February-March 2010: Write plan of the project and requirements specification.
April 2010: Analysis of Smart-M3 platform. Design all the components of the project (KP). Coding.
May 2010: Testing and debuging. Finish the first iteration of the project.
Summer 2010: Second iteration of the project. Create external repository. Download packages for mobile device in Maemo extras-devel repository. Launching KP-City and KP-Weather as daemons on demo server.
September 2010: Testing and debugging. Attracting volunteers for testing. Сompletion of documentation.
October 2010: Prepare for the 8th FRUCT seminar. Finish the second iteration of the project.