Updating Tracker Configuration

Hi there,

I am trying to update the configuration for both the product of my devices and the corresponding devices. From the documentation, these are two individual steps.

Every time I am changing one of the configuration values in the Particle Console "Asset Tracker Settings", I am getting an error saying:

Configuration updates failed some sections: {"temp_trig":-19,"mine":-19} These sections were successful: location,store,imu_trig,rgb,sleep,tracker,monitoring,geofence

No changes were made to the temperature fields of the schema in config-schema.json but I am also wondering why the customized schema mine I added also throws an error.

Here is how I proceeded

  1. For uploading the schema to my product, I went over to https://docs.particle.io/reference/tracker/tracker-configuration/#schema-editor, selected the desired product, pasted the contents of my config-schema.json file, enabled Edit full schema and clicked on Upload schema to product. It replied with Schema uploaded to product.

  2. For the device side, I used the following cURL command:

curl -X PUT 'https://api.particle.io/v1/products/:productId/config/:deviceId?access_token=:accessToken' -H  'Content-Type: application/schema+json' -d @config-schema.json

of course with the correct :productId, :deviceId and :accessToken (access token obtained from the event tab in the console). The reply was the old schema as a text and a HTTP Code 200, indicating success.

I am using deviceOS 4.1.0 and tracker-edge v18.

To confirm the correct schema, here is the temp_trig excerpt:

"temp_trig": {
	"$id": "#/properties/temp_trig",
	"type": "object",
	"title": "Temperature",
	"description": "Configuration for temperature thresholding.",
	"default": {},
	"properties": {
		"high": {
			"$id": "#/properties/temp_trig/high",
			"type": "number",
			"title": "High temperature threshold (Celsius)",
			"description": "Publish location once if temperature is greater than or equal to threshold. The temperature will be required to be less than the high threshold minus hysteresis to clear event, when latching, or publish again when latching disabled.  Hysteresis must be valid.",
			"default": 150.0,
			"examples": [
				65.0
			],
			"minimum": -40.0,
			"maximum": 150.0
		},
		"high_en": {
			"$id": "#/properties/temp_trig/high_en",
			"type": "boolean",
			"title": "High temperature monitoring",
			"description": "If enabled, compare current temperature against high threshold.",
			"default": false,
			"examples": [
				true
			]
		},
		"high_latch": {
			"$id": "#/properties/temp_trig/high_latch",
			"type": "boolean",
			"title": "High temperature event latching.",
			"description": "Enable latching of high temperature trigger event until temperature has fallen below hysteresis level; otherwise, generate one high temperature event.",
			"default": false,
			"examples": [
				true
			]
		},
		"low": {
			"$id": "#/properties/temp_trig/low",
			"type": "number",
			"title": "Low temperature threshold (Celsius)",
			"description": "Publish location once if temperature is less than or equal to threshold. The temperature will be required to be more than the low threshold plus hysteresis to clear event, when latching, or publish again when latching disabled. Hysteresis must be valid.",
			"default": -40.0,
			"examples": [
				0.0
			],
			"minimum": -40.0,
			"maximum": 150.0
		},
		"low_en": {
			"$id": "#/properties/temp_trig/low_en",
			"type": "boolean",
			"title": "Low temperature monitoring.",
			"description": "If enabled, compare current temperature against low threshold.",
			"default": false,
			"examples": [
				true
			]
		},
		"low_latch": {
			"$id": "#/properties/temp_trig/low_latch",
			"type": "boolean",
			"title": "Low temperature event latching.",
			"description": "Enable latching of low temperature trigger event until temperature has risen above hysteresis level; otherwise, generate one low temperature event.",
			"default": false,
			"examples": [
				true
			]
		},
		"hyst": {
			"$id": "#/properties/temp_trig/hyst",
			"type": "number",
			"title": "Hysteresis temperature threshold (Celsius)",
			"description": "Hysteresis threshold applied to high and low thresholds to allow further temperature publishes. 0.0 for unused.",
			"default": 0.0,
			"examples": [
				10.0
			],
			"minimum": 0.0,
			"maximum": 190.0
		}
	}
}

Any idea what could cause the issue or how to get mine working?

Update

I figured out the error of module mine. Looking at the console output of the Tracker One, it said

[app] ERROR: set_cfg_cb: unexpected module: mine

I noticed that I had renamed the module at some point and only updated the config-schema.json but not the firmware. In the config the module was called mine but in the firmware it was still called test.

However, the module temp_trig is still throwing an error even though the temperature_init is called from the Tracker::init() function. Because I don't use the temperature class, I can not be bothered to look further into it.

The most common reason is that the schema you used to create your custom schema was forked from the official one before temperature was added. The easiest solution is to copy the temperature section from the current config schema and paste it into yours.

Since the schema is a complete replacement, not a merge, that will happen if new items are added into Tracker Edge assuming that the schema is also added into the configuration schema. When you're using the default that is true, but if you have a custom schema you need to also update your schema.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.