Skip to content

Latest commit

 

History

History
139 lines (87 loc) · 6.05 KB

File metadata and controls

139 lines (87 loc) · 6.05 KB

Installation Guide (Ubuntu)

HIASBCH MQTT Blockchain Agent

Introduction

This guide will take you through the installation process for the HIASBCH MQTT Blockchain Agent.

 

Prerequisites

You will need to ensure you have the following prerequisites installed and setup.

HIAS Core

The HIASBCH MQTT Blockchain Agent is a component of the HIAS - Hospital Intelligent Automation Server. Before beginning this tutorial you should complete the HIAS installation guide ensure your HIAS server is online.

 

Installation

You are now ready to install the HIASBCH MQTT Blockchain Agent software.

Clone the repository

Clone the HIASBCH MQTT Blockchain Agent repository from the Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss Github Organization to your HIAS project root.

To clone the repository and install the project, make sure you have Git installed. Now navigate to your HIAS Core project root and then use the following command.

 git clone https://github.com/aiial/hiasbch-mqtt-blockchain-agent.git
 mv hiasbch-mqtt-blockchain-agent components/agents/hiasbch

This will clone the HIASBCH MQTT Blockchain Agent repository and move the cloned repository to the agents directory in the HIAS Core project (components/agents/hiasbch/).

 cd components/agents/
 ls

Using the ls command in your home directory should show you the following.

 hiasbch

Installation script

All other software requirements are included in scripts/install.sh. You can run this file on your machine from the HIAS project root in terminal. Use the following command from the HIAS project root:

 sh components/agents/mqtt/scripts/install.sh

 

HIAS Setup

This device is a HIAS IoT Agent and uses the HIAS iotJumpWay MQTT Broker to communicate with the HIAS network. To set up an IoT Agent on the HIAS network, head to your HIAS Server UI.

The HIAS network is powered by a context broker that stores contextual data and exposes the data securely to authenticated HIAS applications and devices. Each HIAS IoT Agent has a JSON representation stored in the HIASCDI Context Broker that holds their contextual information.

HIAS IoT Agent

A HIAS IoT Agent is a bridge between HIAS devices and applications, and the HIASCDI Context Broker & HIAS Historical Broker. The IoT Agents process incoming data using a specific machine to machine communication protocol and then converting into a format compatible with HIASCDI, before sending the data to HIASCDI to update the contextual information.

HIAS IoT Agents

You will now need to create your HIAS IoT Agent and retrieve the agent credentials. Navigate to IoT->Entities->Agents and click on + Create Agent to create a HIAS IoT Agent.

HIAS IoT Agent

Make sure to select MQTT as the protocol for your Agent. Once you have completed the form and submitted it, you can find the newly created AI Agent by navigating to IoT->Entities->Agents and clicking on the relevant Agent.

On the HIAS IoT Agent page you will be able to update the contextual data for the agent, and also find the JSON representation.

HIAS IoT Agent

You now need to download the credentials required to connect the agent to the HIAS network.

Click on the Agent Credentials section to download the credentials file. This should open your file browser, navigate to the HIAS-Core/components/agents/hiasbch/configuration/ directory and save the file as credentials.json.

The final configuration you have to do is in the configuration/config.json file.

{
    "agent": {
        "params": [],
        "api": {
            "content": "application/json"
        },
        "proxy": {
            "up": ""
        }
    }
}

You need to add the following:

  • agent->proxy: IoT Agent API Key

 

Services

You will now create the services that will run your Blockchain Agent. Making sure you are in the HIAS Core project root, use the following command:

sh components/agents/hiasbch/scripts/service.sh

 

Continue

Now you can continue with the HIAS usage guide

 

Contributing

Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss encourages and welcomes code contributions, bug fixes and enhancements from the Github community.

Please read the CONTRIBUTING document for a full guide to forking our repositories and submitting your pull requests. You will also find our code of conduct in the Code of Conduct document.

Contributors

 

Versioning

We use SemVer for versioning.

 

License

This project is licensed under the MIT License - see the LICENSE file for details.

 

Bugs/Issues

We use the repo issues to track bugs and general requests related to using this project. See CONTRIBUTING for more info on how to submit bugs, feature requests and proposals.