Rest API - Grid sensor data results

Hi!

I am looking for more resources on using the Pollination Rest API. The current issue is that I’m generating my own sensors before sending them to the Cloud. Here is an example from my HBJSON:

      "sensor_grids": [
        {
          "type": "SensorGrid",
          "sensors": [
            {
              "type": "Sensor",
              "pos": [612,225,0.8],
              "dir": [0.0,0.0,1.0],
              "identifier": "FGkiKXpn" # Custom id for the child sensor
            },
          ],
          "identifier": "ihTFzbB3", # Custom id for the parent grid
          "display_name": "Grid_ihTFzbB3" #Custom name
        },

When I get the data back, it seems my custom identifiers are ignored, and new ids are produced? This is an issue, because I need the ids to match, so that the rooms and data match up. Here is a sample result from the cloud run:

  {
    "count": 6,
    "name": "Grid_r7dkdi",
    "identifier": "Grid_8c4d55b0-5ed1-44bd-b089-34d9c4b09075",
    "group": "",
    "full_id": "Grid_8c4d55b0-5ed1-44bd-b089-34d9c4b09075",
...

I tried to look for the custom id in the resulting grids_info.json file, but it’s not there, which seems to indicate the the cloud run did not use my ids:

This is the recipe I am using, if that matters:
{‘owner’: ‘ladybug-tools’, ‘name’: ‘annual-daylight’, ‘tag’: ‘0.9.13’}

Hi @jriise,

A sensor cannot have an identifier. You can find the specific sensor using its index in the sensor grid.

https://www.ladybug.tools/honeybee-schema/model.html#tag/sensor_model

For the sensor grid, it looks like the identifier is automatically re-generated at some point in the workflow. What does your end-to-end workflow look like? And why do you need an identifier for the sensor?

1 Like