Retrieve temperature readings from notecard/carrier remotely

I have a notecard/carrier setup and running continuously with a battery and a solar panel setup. I want to retrieve data from the notecard such as voltage and temperature. In notehub I can see some of this data as a graph under the device summary page. However, this data only gets sent when there is a brownout or a reference node that is connected to the gateway receives a button press.

I do have a reference node connected to this gateway and I receive data from that which shows up in the events page but I want the data from the notecard/carrier specifically since they are in separate locations.

I am wondering is there a way to have this data sent to notehub either periodically or manually from a remote location? Or do I need to connect my computer to it and change a setting through the web based json editor.

Hey @Jperks03,

And welcome to the Blues community!

You can enable the reporting you’re looking for by issuing two different requests to your Notecard.

  1. card.temp

The card.temp request will enable automatic temperature reporting using the Notecard’s onboard temperature sensor. You can enable it with the following request.

{"req":"card.temp","minutes":60}

The minutes argument controls how often the Notecard should take temperature readings, and you can configure it to be whatever makes sense for your project.

Each reading is stored in a _temp.qo Note, and that Note will also include your device’s voltage.

  1. hub.set

You can use the hub.set request to put your device in periodic mode, and use the request’s outbound argument to control how often your Notecard should sync the _temp.qo Notes up to Notehub.

{"req":"hub.set","mode":"periodic","outbound":60}

The example above sets the Notecard up to sync every 60 minutes, but again you might want to change this depending on your project.

Or do I need to connect my computer to it and change a setting through the web based json editor.

The easiest way to send these two requests to your Notecard is to connect the Notecard to your computer and send them through the In-Browser Terminal.

If you’re communicating with the Notecard through a host you can also use one of the Notecard’s firmware libraries.

Let me know if that helps.

TJ

1 Like