IBM / satellite-tracker

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.

Home Page:https://developer.ibm.com/patterns/track-an-object-in-space/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

CASIS Satellite Tracker

Read this in other languages: 한국어, Español.

In this Code Pattern, we will build a satellite tracker using Node-RED and IBM Watson. A flow will be created for connecting a Watson Assistant Chatbot with a node-red-contrib-satellites node, as well as a web UI and worldmap node.

When the reader has completed this Code Pattern, they will understand how to:

  • Build a complex flow and web UI using simple Node-RED tools.
  • Implement a chatbot with Watson Assistant and embed it on a web page with Node-RED.
  • Get satellite information for the International Space Station (ISS) and use it in a web app.

Flow

  1. User interacts with Web UI to query the chat bot "Where is the ISS?".
  2. Web UI communicates with Node-RED running on IBM Cloud.
  3. Node-RED app running on the cloud processes info and performs HTTP requests.
  4. The Node-RED app communicates with Watson Assistant to extract intents and entities.
  5. Satellites orbiting the earth send position info which is streamed to Node-RED module.

Included components

  • Watson Assistant: Create a chatbot with a program that conducts a conversation via auditory or textual methods.

Featured technologies

  • Node-RED: Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.
  • Artificial Intelligence: Artificial intelligence can be applied to disparate solution spaces to deliver disruptive technologies.
  • Node.js: An open-source JavaScript run-time environment for executing server-side JavaScript code.

Steps

  1. Clone the repo

  2. Create Watson services with IBM Cloud

  3. Import the Watson Assistant workspace

  4. Get the Watson Assistant credentials

  5. Create a Node-RED Workspace

  6. Get a LocationIQ API key

  7. Install additional nodes and Perform either 7a or 7b

    7a. Build the Node-RED flow manually

    7b. Import the completed flow

  8. Configure credentials

1. Clone the repo

Clone the casis-satellite-tracker locally. In a terminal, run:

$ git clone https://github.com/IBM/casis-satellite-tracker

2. Create Watson services with IBM Cloud

Create the Watson Assistant service by providing a name of your choice and clicking Create.

Once created, you'll see either the credentials for username and password or an IAM apikey, either of which you should copy down to be used later. (Click Show to expose them).

3. Import the Watson Assistant workspace

Once you have created your instance of Watson Assistant, click Launch Tool, then click the Workspaces tab. Import the workspace by clicking the upload icon:

Click Choose a file and navigate to data/AssistantWorkspace/sat-tracker-workspace.json in this repo. Click Import.

Get the Workspace ID by clicking the 3 vertical dots on the Workspaces tab. Save this for later.

4. Get the Watson Assistant credentials

The credentials for IBM Cloud Watson Assistant service can be found by selecting the Service Credentials option for the service. You saved these in step #2.

The WORKSPACE_ID for the Watson Assistant workspace was saved in step #3.

5. Create a Node-RED Workspace

From the the IBM Cloud Catalog navigate to Platform -> Boilerplates and choose Node-RED Starter. Choose a name and click Create.

Once the App has deployed, click on Visit App URL

Follow the instructions to Secure your Node-RED editor and Browse available IBM Cloud nodes. Click Finish and then click Go to your Node-RED flow editor.

6. Get a LocationIQ API key

You will need an API key from LocationIQ for the reverse geocoding function in this app.

  • Visit the LocationIQ website and scroll down to Excited?! Get a developer token!. Input your name and email and follow the instructions to get an API token. Save this for later, when you configure the credentials node.

7. Install additional nodes

You will need to install the following additional nodes:

Click the menu icon in the upper right and then Manage palette.

Click the Install tab and enter the name of the node you wish to install into the search bar, then click install.

7.a Build the Node-RED flow manually

Follow these instructions to Build the Node-RED flow manually.

7.b Import the completed Flow

We will walk through the steps to build the Node-RED flow, but you can import the completed Flow. Copy the flow to your machine's clipboard by navigating to data/NodeRED/.

A flow can be moved to a Mac OS clipboard with:

$ pbcopy < flow.json

On Windows use:

$ cat flow.json | clip

On Linux use:

$ cat flow.json | xclip

Once the flow.json is on your clipboard, Click the upper-right menu icon and choose Import -> Clipboard. Paste the contents of your clipboard and click Import.

8. Configure credentials

  • Click on the ISS Assistant node and fill in either the username and password or the API Key, depending on which was part of your Watson Assistant credentials from Get the Watson Assistant credentials.

  • Click on the Credentials node and put the locationIQ API key from Get a LocationIQ API key in the field private.

NOTE: After any changes, you will need to click the Deploy button to make them live.

Sample output

Use the running app by going to <Node-RED_URL>/bot

Troubleshooting

Links

Learn more

  • Artificial Intelligence Code Patterns: Enjoyed this Code Pattern? Check out our other AI Code Patterns.
  • AI and Data Code Pattern Playlist: Bookmark our playlist with all of our Code Pattern videos
  • With Watson: Want to take your Watson app to the next level? Looking to utilize Watson Brand assets? Join the With Watson program to leverage exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

About

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.

https://developer.ibm.com/patterns/track-an-object-in-space/

License:Apache License 2.0


Languages

Language:HTML 69.4%Language:JavaScript 22.3%Language:Shell 8.3%