Command Line Tools

The command lines tools are wrappers around libMIO, which can be used to realize all of the functionality of MIO from the command line (e.g., creating/deleting event nodes, publishing/subscribing to event nodes, scheduling, user authentication, etc). The web portal, for instance, delivers all of its functions through these command line tools.

Basic Publish Subscribe Operations

mio_authenticate
mio_actuate
mio_item_query
mio_item_query_stanza
mio_node_create
mio_node_delete
mio_node_register
mio_publish_data
mio_subscribe
mio_subscribe_listener
mio_subscriptions_query
mio_unsubscribe

Meta Data

mio_meta_add
mio_meta_geoloc_add
mio_meta_geoloc_remove
mio_meta_property_add
mio_meta_property_remove
mio_meta_query
mio_meta_remove
mio_meta_transducer_add
mio_meta_transducer_remove

Scheduling

mio_schedule_event_add
mio_schedule_event_remove
mio_schedule_query

Access Control

mio_acl_publisher_add
mio_acl_affiliations_query

References and Collections

mio_collection_child_add
mio_collection_child_remove
mio_collection_children_query
mio_collection_node_create
mio_collection_parents_query
mio_reference_child_add
mio_reference_child_remove
mio_reference_query

System Utilities

mio_node_type_query
mio_password_change

mio_acl_affiliations_query


"./mio_acl_affiliations_query" Command line utility to list all current affiliations of a JID or event node. If no node is specified, the user's affiliations will be listed.
Usage: ./mio_acl_affiliations_query [-event event_node] <-u username> <-p password> [-verbose] [-stanza]
Usage: ./mio_acl_affiliations_query -help
    -event event_node = name of node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info
    -stanza = only print the affiliations stanza


Example outputs:

./mio_acl_affiliations_query -u myusername -p mypassword
MIO Affiliations Packet:
    Affiliation: metaexample
        Type: Owner
    Affiliation: refchild1
        Type: Owner
    Affiliation: refchild2
        Type: Owner
    Affiliation: refchild3
        Type: Owner
    Affiliation: refparent1
        Type: Owner
    Affiliation: refparent2
        Type: Owner
    Affiliation: testevent
        Type: Owner

mio_acl_publisher_add


"./mio_acl_publisher_add" Command line utility to add a JID as a publisher of an event node
Usage: ./mio_acl_publisher_add <-event event_node> <-publisher publisher_JID> <-u username> <-p password> [-verbose]
Usage: ./mio_acl_publisher_add -help
    -publisher publisher_JID = Full JID of publisher to add
    -event event_node = name of node to add publisher to
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_actuate


Usage: ./mio_actuate <-event event_node> <-value transducer_typed_value> <-u username> <-p password> [-int interface] [-id transducer_id] [-rawvalue transducer_raw_value] [-verbose]
Usage: ./mio_actuate -help
    -event event_node = name of event node to publish to
    -value transducer_typed_value = typed value to actuate
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -id transducer_id = id (name) of transducer within message
    -int interface = interface to write data to
    -rawvalue transducer_raw_value = raw value to actuate
    -help = print this usage and exit
    -verbose = print info

mio_authenticate


"./mio_authenticate" Command line utility to authenticate a JID
Usage: ./mio_authenticate <-u username> <-p password> [-verbose]
Usage: ./mio_authenticate -help
    -u username = JID to authenticate (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_authenticate -u myusername -p mypassword

Authentication successful

mio_collection_child_add


"./mio_collection_child_add" Command line utility to add a child to a collection node
Usage: ./mio_collection_child_add <-parent collection_node> <-child event_or_collection_node> <-u username> <-p password> [-verbose]
Usage: ./mio_collection_child_add -help
    -parent collection_node = jid of the parent collection node
    -child event_or_collection_node = jid the child event or collection node
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_collection_child_remove


"./mio_collection_child_remove" Command line utility to remove a child node from a collection node
Usage: ./mio_collection_child_remove <-parent collection_node> <-child event_or_collection_node> <-u username> <-p password> [-verbose]
Usage: ./mio_collection_child_remove -help
    -parent collection_node = jid of the parent collection node
    -child event_or_collection_node = jid the child event or collection node to remove
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_collection_children_query


"./mio_collection_children_query" Command line utility to retrieve the children of a collection node
Usage: ./mio_collection_children_query <-collection collection_node> <-u username> <-p password> [-verbose]
Usage: ./mio_collection_children_query -help
    -collection collection_node = jid of collection node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_collection_node_create


"./mio_collection_node_create" Command line utility to create a collection node
Usage: ./mio_collection_node_create <-collection collection_node> <-u username> <-p password> [-name collection_node_name] [-verbose]
Usage: ./mio_collection_node_create -help
    -collection collection_node = jid of collection node to create
    -name collection_node_name = name of collection node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_collection_parents_query


"./mio_collection_parents_query" Command line utility to retrieve the parents of a collection or event node
Usage: ./mio_collection_parents_query <-node collection_or_event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_collection_parents_query -help
    -node collection_or_event_node = jid of collection or event node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_item_query


"./mio_item_query" Command line utility to read most recent data item from an event node
Usage: ./mio_item_query <-event event_node> [-max max_items] [-id item_id] <-u username> <-p password> [-verbose]
Usage: ./mio_item_query -help
    -event event_node = name of node to get data from
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -max max_items = maximum number of items to retrieve if no item_id is specified
    -id item_id = item id of the item to be retrieved
    -help = print this usage and exit
    -verbose = print info

mio_item_query_stanza


"./mio_item_query_stanza"Command line utility to query the payload of an item and print out the raw XML
Usage: ./mio_item_query_stanza <-event event_node> <-item item_id> <-u username> <-p password> [-verbose]
Usage: ./mio_item_query_stanza -help
    -event event_node = name of node to query
    -item item_id = ID of the item to retrieve
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_add


Usage: ./mio_meta_add <-event event_node> <-name meta_name> <-type meta_type> [-info meta_info] <-u username> <-p password> [-verbose]
Usage: ./mio_meta_add -help
    -event event_node = name of event node to publish to
    -name meta_name = name of meta information to add
    -type meta_type = type of meta information to add: either "device" or "location" 
    -info meta_info = description of the meta information to add
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_meta_transducer_add -event metaexample -name brightness -unit lux -max 1000 -u myusername -p mypassword
Request successful

mio_meta_geoloc_add


Usage: ./mio_meta_geoloc_add <-event event_node> <-d_name device_name or -t_name transduce_name> [-accuracy accuracy] [-alt altitude] [-area area] [-bearing bearing] [-building building] [-country country] [-country_code country_code] [-datum datum] [-description description] [-floor floor] [-lat lattitude] [-locality locality] [-lon longitude] [-zip zip_code] [-region region] [-room room] [-speed speed] [-street street] [-text text] [-tzo time_zone_offset] [-uri map_uri] <-u username> <-p password> [-verbose]
Usage: ./mio_meta_geoloc_add -help
    -event event_node = name of event node to publish to e.g. "-07:00" 
    -t_name transduce_name = name of transducer to add geoloc (if no transducer is specified, geoloc will be added to device registered with the event node)
    -accuracy accuracy = horizontal GPS error in meters (decimal) e.g. "10" 
    -alt altitude = altitude in meters above or below sea level (decimal) e.g. "1609" 
    -area area = a named area such as a campus or neighborhood e.g. "Central Park" 
    -bearing bearing = GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north (decimal) e.g. "-07:00" 
    -building building = a specific building on a street or in an area e.g. "The Empire State Building" 
    -country country = the nation where the device/transducer is located e.g. "United States" 
    -country_code country_code = the ISO 3166 two-letter country code e.g. "US" 
    -datum datum = GPS datum e.g. "-07:00" 
    -description description = a natural-language name for or description of the location e.g. "Bill's house" 
    -floor floor = a particular floor in a building e.g. "102" 
    -lat latitude = latitude in decimal degrees north (decimal) e.g. "39.75" 
    -locality locality = a locality within the administrative region, such as a town or city e.g. "New York City" 
    -lon longitude = longitude in decimal degrees East (decimal) e.g. "-104.99" 
    -zip zip_code = a code used for postal delivery e.g. "10118" 
    -region region = an administrative region of the nation, such as a state or province e.g. "New York" 
    -room room = a particular room in a building e.g. "Observatory" 
    -speed speed = the speed at which the device/transducer is moving, in meters per second (decimal) e.g. "52.69" 
    -street street = a thoroughfare within the locality, or a crossing of two thoroughfares e.g. "350 Fifth Avenue / 34th and Broadway" 
    -text text = a catch-all element that captures any other information about the location e.g. "Northwest corner of the lobby" 
    -tzo time_zone_offset = the time zone offset from UTC for the current location e.g. "-07:00" 
    -uri uri = a URI or URL pointing to a map of the location e.g. "http://www.esbnyc.com/map.jpg" 
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_geoloc_remove


Usage: ./mio_meta_geoloc_remove <-event event_node> [-t_name transducer_name] <-u username> <-p password> [-verbose]
Usage: ./mio_meta_geoloc_remove -help
    -event event_node = name of event node to remove geoloc from
    -name transducer_name = name of transducer to remove geoloc from (if not specified, geoloc will be removed from device registered to event node)
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_property_add


Usage: ./mio_meta_property_add <-event event_node> <-name property_name> <-value property_value> <-u username> <-p password> [-verbose]
Usage: ./mio_meta_property_add -help
    -event event_node = name of event node to publish to
    -name property_name = name of property to add
    -value property_value = value of property to add
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_property_remove


Usage: ./mio_meta_property_remove <-event event_node> <-name property_name> <-u username> <-p password> [-verbose]
Usage: ./mio_meta_property_remove -help
    -event event_node = name of event node to remove property from
    -name property_name = name of property to remove
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_query


"./mio_meta_query" Command line utility to query the meta information of an event node
Usage: ./mio_meta_query <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_meta_query -help
    -event event_node = name of node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_remove


Usage: ./mio_meta_remove <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_meta_remove -help
    -event event_node = name of event node to remove property from
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_transducer_add


Usage: ./mio_meta_transducer_add <-event event_node> <-name transducer_name> [-type transducer_type] [-unit transducer_unit] [-enum_names enumeration_unit_names] [-enum_values enumeration_unit_values] [-min transducer_min_value] [-max transducer_max_value] [-resolution transducer_resolution] [-precision transducer_precision] [-accuracy transducer_accuracy] [-serial transducer_serial_number] [-manufacturer transducer_manufacturer] [-info transducer_info] [-interface transducer_interface] <-u username> <-p password> [-verbose]
Usage: ./mio_meta_transducer_add -help
    -event event_node = name of event node to publish to
    -name transducer_name = name of transducer to add
    -type transducer_type = type of transducer to add
    -unit transducer_unit = units of output of transducer to add
    -enum_names enumeration_unit_names = comma separated names of enum unit values e.g. "red,green,blue" 
    -enum_names enumeration_unit_values = comma separated values of enum unit values e.g. "0,1,2" 
    -min transducer_min_value = minimum output value of transducer to add
    -min transducer_max_value = maximum output value of transducer to add
    -resolution transducer_resolution = resolution of output of transducer to add
    -precision transducer_precision = precision of output of transducer to add
    -accuracy transducer_precision = accuracy of output of transducer to add
    -serial transducer_serial_number = serial number of the transducer to add
    -manufacturer transducer_manufacturer = manufacturer of the transducer to add
    -info trans_info = description of the transducer to add
    -interface trans_interface = interface of the transducer to add
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_meta_transducer_remove


Usage: ./mio_meta_transducer_remove <-event event_node> <-name transducer_name> <-u username> <-p password> [-verbose]
Usage: ./mio_meta_transducer_remove -help
    -event event_node = name of event node to remove property from
    -name transducer_name = name of transducer to remove
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_node_create


"./mio_node_create" Command line utility to create an event node
Usage: ./mio_node_create <-event event_node> [-title node_title] [-access_model access_model_model] <-u username> <-p password> [-verbose]
Usage: ./mio_node_create -help
    -event event_node = name of event node to create
    -title node_title = title of event node
    -access access_model = access model of the node, either "open", "whitelist", "presence" or "roster" 
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_node_create -event test_create_node_data -u myusername -p mypassword

Request successful

mio_node_delete


"./mio_node_delete" Command line utility to delete an event node
Usage: ./mio_node_delete <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_node_delete -help
    -event event_node = name of event node to create
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_node_register


"./mio_node_register" Command line utility to register an event node with the creation node
Usage: ./mio_node_register <-event event_node> <-creation creation_node> <-u username> <-p password> [-verbose]
Usage: ./mio_node_register -help
    -event event_node = name of event node to create
    -creation creation_node = name of creation node to contact for registration
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_node_type_query


"./mio_node_type_query" Command line utility to query the type of a node
Usage: ./mio_node_type_query <-node node> <-u username> <-p password> [-verbose]
Usage: ./mio_node_type_query -help
    -node node = name of node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_password_change


"./mio_password_change" Command line utility to change the password of a JID
Usage: ./mio_password_change <-np new_password> <-u username> <-p old_password> [-verbose]
Usage: ./mio_password_change -help
    -np new_password = new password to set
    -u username = JID (give the full JID, i.e. user@domain)
    -p old_password = Current JID user password
    -help = print this usage and exit
    -verbose = print info

mio_publish_data


Usage: ./mio_publish_data <-event event_node> <-id transducer_reg_id> <-value transducer_typed_value> <-rawvalue transducer_raw_value> <-u username> <-p password> [-verbose]
Usage: ./mio_publish_data -help
    -event event_node = name of event node to publish to
    -id transducer_id = id (name) of transducer within message
    -value transducer_typed_value = typed value to publish
    -rawvalue transducer_raw_value = raw value to publish
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_publish_data -event test_create_node_data -id 1000 -value 99.99 -rawvalue 9999 -u myusername -p mypassword

Request successful


mio_reference_child_add


Usage: ./mio_reference_child_add <-parent parent_event_node> <-child child_event_node> <-child_type child_node_type> <-parent_type parent_node_type> [-add_ref_child] <-u username> <-p password> [-verbose]
Usage: ./mio_reference_child_add -help
    -parent parent_event_node = name of parent event node to add to child
    -child child_event_node = name of child event node to add to parent
    -add_ref_child = adds a reference to the parent at the child node if possible
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_reference_child_remove


Usage: ./mio_reference_child_remove <-parent parent_event_node> <-child child_event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_reference_child_remove -help
    -parent parent_event_node = name of parent event node to remove child from
    -child child_event_node = name of child event node to remove from parent
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_reference_query


"./mio_reference_query"Command line utility to query the references of an event node
Usage: ./mio_reference_query <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_reference_query -help
    -event event_node = name of node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_schedule_event_add


Usage: ./mio_schedule_event_add <-event event_node> [-t_name transudcer_name] [-t_value transducer_value] [-time time] [-recurrence interval] [-info description] [-r_freq recurrence_frequency] [-r_int recurrecne_interval] [-r_count recurrence_count] [-r_until recurrence_until] [-r_bymonth recurrence_bymonth] [-r_byday recurrence_byday] [-r_exdate recurrence_exdate] [-id event_id] <-u username> <-p password> [-verbose]
Usage: ./mio_schedule_event_add -help
    -event event_node = jid of event node to containing the transducer to actuate
    -t_name transducer_name = name of transducer to actuate
    -t_value transducer_value = value to set transducer to
    -time time = time and date when transducer should be actuated
    -recurrence interval = recurrence interval
    -info description = description of event to schedule
    -id event_id = ID of existing event to merge with
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_schedule_event_remove


Usage: ./mio_schedule_event_remove <-event event_node> <-id event_id> <-u username> <-p password> [-verbose]
Usage: ./mio_schedule_event_remove -help
    -event event_node = name of event node to remove property from
    -name transducer_name = name of transducer to remove
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_schedule_query


"./mio_schedule_query" Command line utility to query the meta information of an event node
Usage: ./mio_schedule_query <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_schedule_query -help
    -event event_node = name of node to query
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info

mio_subscribe


"./mio_subscribe" Command line utility to subscribe to an event node
Usage: ./mio_subscribe <-event event_node> <-u username> <-p password> [-verbose]
Usage: ./mio_subscribe -help
    -event event_node = name of node to add subscriber to
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_subscribe -event test_create_node_data -u myusername -p mypassword

Request successful

mio_subscribe_listener


"./mio_subscribe_listener" Command line utility to login as a JID and print any received messages
Usage: ./mio_subscribe_listener <-u username> <-p password> [-verbose]
Usage: ./mio_subscribe_listener -help
    -u username = JID to authenticate (give the full JID, i.e. user@domain)
    -p password = JID user password
    -help = print this usage and exit
    -verbose = print info


Example outputs:

./mio_subscribe_listener -u myusername -p mypassword
MIO Data Packet:
    Event Node:test_create_node_data
        TrasducerValue:
            Name: (null)
            ID: 1000
            Raw Value: 9999
            Typed Value: 99.99
            Timestamp: 2014-09-24T22:15:28.700226-0400
MIO Data Packet:
    Event Node:test_create_node_data
        TrasducerValue:
            Name: (null)
            ID: 1000
            Raw Value: 9999
            Typed Value: 99.99
            Timestamp: 2014-09-24T22:15:28.700226-0400
MIO Data Packet:
    Event Node:test_create_node_data
        TrasducerValue:
            Name: (null)
            ID: 1000
            Raw Value: 9999
            Typed Value: 99.99
            Timestamp: 2014-09-24T22:15:28.700226-0400

...

mio_subscriptions_query


"./mio_subscriptions_query" Command line utility to list all current subscribers of a JID or event node
Usage: ./mio_subscriptions_query <-u username> <-p password> [-event event_node] [-verbose]
Usage: ./mio_subscriptions_query -help
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -event event_node = name of node to query, if this parameter is not specified, the subscriptions of the username JID will be queried
    -help = print this usage and exit
    -verbose = print info

mio_unsubscribe


"./mio_unsubscribe" Command line utility to remove a JID as a subscriber of an event node
Usage: ./mio_unsubscribe <-event event_node> <-u username> <-p password> [-subid] [-verbose]
Usage: ./mio_unsubscribe -help
    -event event_node = name of node to add subscriber to
    -u username = JID (give the full JID, i.e. user@domain)
    -p password = JID user password
    -subid = subid of the node to unsubscribe
    -help = print this usage and exit
    -verbose = print info