Targets

A target is the location where you want your Source data. Targets consist of notebooks and sensors from your Aquaponics AI account.

TIP

You must be at least a manager of the project in order to create a sensor. This will need to be done on your cloud dashboardopen in new window before continuing.

Importing a Target

In order to import a target you must create a sensor in your project. You must also associate a notebook with the sensor which gives this sensor permission to write to this notebook. These actions can only be done on your dashboardopen in new window.

Once you've done that, importing your sensors and logs is as easy as:

sparky target import
1

It will ask you which project and which sensor you're wanting to import. It will also ask you if you want to replace the SSL certificate for the sensor. This saves you the added hassle of importing the certicate you received when you created the sensor in the dashboard.

DANGER

You can only have one SSL certificate per sensor. By regenerating a certificate you are canceling the other certificate's access to the MQTT endpoint.

Importing an Existing Certificate

Sometimes you'll have a sensor that is already working with SSL certificates already in production. If you need to use an existing certificate (instead of regenerating the certificate) you can run the following command to copy your existing certificate into your configuration.

sparky target import-cert --directory ./path/to/certfiles
1

Please make sure you have the following files in your directory:

  • Certificate file (usually named with .cert or .pem)
  • Private key (usually named with .key)

sparky will also download the AWS Root Certificate Authorityopen in new window file from AWS directly.

Syncing Your Configuration

If you need to make updates to a sensor on your dashboard, then you'll need to syncronize your configuration to make sure everything has been updated locally as well.

sparky target sync       # this will ask you which sensor to update
sparky target sync --all # this will update all your local configruations
1
2
Last Updated: 3/27/2022, 4:26:47 AM
Contributors: Jonathan Reyes