IoT Pinger

From WandoraWiki
Jump to: navigation, search
Iot 7.png
The IoT (Internet of Things) pinger is a general purpose API consumer intended to aggregate data from several different sources providing data via HTTP. The IoT Panel is found in the Wandora menu bar and presents most of the pinger's configuration options. The Pinger searches the current Topic Map for topics with an occurrence with Source Occurrence Type. Those topics are expected to correspond to an API endpoint defined by corresponding occurrence data. The pinger queries each endpoint every specified time interval and saves the response as an occurrence with Target Occurrence Type. The pinger process can be configured to stop at a set time using the Expires toggle. Save on tick saves the current Topic Map in the specified folder after each tick of the pinger in the form iot_yyyy_mm_dd_hh_mm_ss.jtm.

Iot 1.png

The log window lists starts, stops, runs and any errors the pinger might encounter.

Iot 2.png

In addition to ordinary web APIs the pinger supports several special local endpoints with special sources

Return the current time. The time is formatted using the parameter format.
Return the topic and association counts for the current Topic Map in the format
   "num_topics": <num_topics>,
   "num_associations": <num_associations>;
Return the current location in the form <latitude>, <longitude>

All these special endpoints implement and are listed in You can add your own by simply implementing the interface and appending the source to the sources list.


A prepared sample Topic Map with appropriate occurrence type and endpoint topics is useful in demonstrating the functionality of the IoT Pinger.


The IoT Source Type and IoT Target Type topics are general occurrence type topics used to signal the pinger that the topic is an endpoint. The time topic simply uses the special time endpoint to fetch the current timestamp. The date topic uses the same service to fetch the current date. The stats and geolocation topics in turn use the respective services to fetch data.

To separate text and binary data, two separate pinger instances are used. The first one fetches text data for the before-mentioned topics. The second instance is used to fetch binary image data for the Wandora logo. Note the selected "is binary" toggle for the binary pinger instance.

Iot 3.png

Iot 4.png

The first pinger will process each topic containing a HTTP source occurrence with the appropriate source type. The pinger will then load text data from the given topics to their respective target occurrence fields.

Iot 5.png

The binary pinger operates in a similar fashion. However, the source is now defined to be binary and the pinger treats it as such. The image data is handled appropriately and presented as an image in the appropriate occurrence field.

Iot 6.png

The pinger also saves a snapshot of the current Topic Map on each tick if the "save on tick" option has been selected. Each snapshot is timestamped in the format of yyyy_mm_dd_hh_mm_ss.

Iot 8.png
Personal tools