FarmHubFarmHub
Support
Sparky CLI
Sensors
Components
Dashboard
Mobile App
Support
Sparky CLI
Sensors
Components
Dashboard
Mobile App
  • Command Line

    • Introduction
    • Getting Started
    • Sources
    • Targets
    • Links
    • Server
    • Import

Targets

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

Tips

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 dashboard 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 dashboard.

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

sparky target import

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.

Caution

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

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 Authority 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
Prev
Sources
Next
Links