Configuration with json

Could anyone help with how to download the current setting file and upload the modified setting file?

I read from Ruuvi documentation that Ruuvi Gateway is configured by gw_cfg_default.json. This file could be read/write to by HTTP. However, the documentation does not tell to what address/location/URL to send or query the json file. Could anyone help?

Hello,

The remote configuration through JSON is a feature that we’ll introduce in v1.12 release. We’re currently testing a release candidate and are aiming to release the update in September. You can install the development releases in GUI by using Artifacts of ruuvi_gateway_esp-PR #717 : /build [Jenkins] as the update URL.

The documentation is a work in progress, here is the JSON specification: https://docs.ruuvi.com/gw-data-formats/gateway-configuration. The example JSON object is in the bottom.

The configuration supports both Gateway-specific and general configuration,

If you specify a folder name, it will first attempt to read the configuration file for this Gateway from <GW_MAC>.json (for example, AABBCCDDEEFF.json). If that file fails, an attempt will be made to read the overall configuration from gw_cfg.json.

Also, the configuration file can be generated dynamically by the server, for this the server must analyze the HTTP header 'ruuvi_gw_mac', which contains MAC address in the format XX:XX:XX:XX:XX:XX.

Server to download configuration from is defined in this screen after firmware update:

The polling interval of configuration is defined by “remote_cfg_refresh_interval_minutes”: 0.

If you’re planning to place a large order, we can configure the Gateways at factory to use the remote configuration URL by default at boot.

Great, thanks a lot for your help.
I have one more question related to the configuration: If I want to use Ruuvi tags together with third party BLE sensors (for example some iBeacons)with Ruuvi Gateway, I could make the json setting as below, couldn’t I?

“company_use_filtering”: true,
“company_id”: [1177, 76],
“scan_coded_phy”: false,

Or do I have to turn off the Ruuvi Gateway filter and filter the mac addresses on the relay server?

The company ID does not support array, I’m not sure what exactly would happen but it would not work to filter two companies.

You need to put "company_use_filtering": false and then filter on the backend to receive payloads with two different manufacturer IDs.

Thanks again Otso for your help. Two more questions:

  1. Is it possible to add “filter by company_ids” (an array of company ids) in the future?
  2. Is it possible to edit this configuration .json file locally? and how? So far I could only find the documentation to configure via web-UI.

Probably not, the filtering is done on Bluetooth chip level and that chip has really constrained resources.

We are considering adding an allowlist of tags, that could allow user to configure specific tags per gateway to send.

You need to put the JSON to server which the Gateway can access, any text editor will do for editing. The Gateway will then try to download the configuration.