Channel Management
The platform goes a step further beyond data delivery, allowing for the creation of Channels which can be used to read data values and graphically plot over time. These channels are linked to a Thing, whereby multiple channels can be created for a single Thing.
There are a series of endpoints for managing Channels.
Note: Thing Channels are automatically created and reconfigured when a Thing sends a message for a channel that does not exist or is misconfigured. A user doesn't have to pre-create channels if the device is configured to start sending data for channels it doesn't already have.
Get Thing Channel
Retrieve a Thing Channel
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)
Insight/GetThingChannel?channel=XXX
{
"channel": {
"unit": "units",
"precision": 0,
"name": "Channel 1",
"icon": "🔌",
"description": "Automatically created channel for channel number 1",
"handle": null,
"id": "dYrLZzemNQwPagBmmxByOqXbvMVjAoDG",
"type": "ANALOG_INPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
}
}
Endpoint: Insight/GetThingChannel
Get Thing Channels (By Account)
Retrieve Thing Channels across all Things in the Account
Insight/GetThingChannels
{
"channels": [
{
"unit": null,
"precision": 0,
"name": "Channel 1",
"icon": "🔌",
"description": "Automatically created channel for channel number 1",
"handle": null,
"id": "RoDmGzOePxrJZKWAONBagyQXlpAkvMwj",
"type": "DIGITAL_OUTPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
},
{
"unit": null,
"precision": 0,
"name": "Channel 2",
"icon": "🔌",
"description": "Manually created channel for channel number 2",
"handle": null,
"id": "pjvzwyOMVbPZgeBPVqWaYqQDAJGxkKLr",
"type": "ANALOG_INPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
}
]
}
Endpoint: Insight/GetThingChannels
Get Thing Channels (By Thing)
Retrieve Thing Channels for a given Thing
thing- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)
Insight/GetThingChannelsForThing?thing=XXX
{
"channels": [
{
"unit": null,
"precision": 0,
"name": "Channel 1",
"icon": "🔌",
"description": "Automatically created channel for channel number 1",
"handle": null,
"id": "RoDmGzOePxrJZKWAONBagyQXlpAkvMwj",
"type": "DIGITAL_OUTPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
},
{
"unit": null,
"precision": 0,
"name": "Channel 2",
"icon": "🔌",
"description": "Manually created channel for channel number 2",
"handle": null,
"id": "pjvzwyOMVbPZgeBPVqWaYqQDAJGxkKLr",
"type": "ANALOG_INPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
}
]
}
Endpoint: Insight/GetThingChannelsForThing
Update Thing Channel
Update a Thing Channel
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)name- String name for the channeldescription- String description for the channelicon- String unicode emoji icon for the channelunit- String unit of measurement for the channel (e.g. degrees Celsius, litres)type- String channel type (e.g.ANALOG_INPUT,DIGITAL_OUTPUT)precision- Decimal number of decimal places to round values to
Channel Types:
ANALOG_INPUTANALOG_OUTPUTDIGITAL_INPUTDIGITAL_OUTPUT
Insight/UpdateThingChannel?channel=XXX&name=XXX&description=XXX&icon=XXX&unit=XXX&type=XXX&precision=XXX
{
"channel": {
"unit": "units",
"precision": 0,
"name": "Channel 1",
"icon": "🔌",
"description": "My new description for channel 1",
"handle": null,
"id": "dYrLZzemNQwPagBmmxByOqXbvMVjAoDG",
"type": "ANALOG_INPUT",
"account": "ejoGRxQrXpzkPJngbjBydwYZbqmDagNA"
}
}
Endpoint: Insight/UpdateThingChannel
Set Digital Channel Output
Set Digital Channel Output Value
Note - this endpoint is only available for Digital Output Channels.
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)value- boolean value to set the channel to
Insight/DoSetDigitalChannel?channel=XXX&value=XXX
Endpoint: Insight/DoSetDigitalChannel
Set Digital Channel Output (Advanced)
Set Digital Channel Output Value (Advanced)
Note - this endpoint is only available for Digital Output Channels.
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)value- boolean value to set the channel totimePeriod- integer time valueoneShot- booleanmark- double mark value
Insight/DoSetDigitalChannelAdvanced?channel=XXX&value=XXX&timePeriod=XXX&oneShot=XXX&mark=XXX
Endpoint: Insight/DoSetDigitalChannelAdvanced
Configure RockBLOCK RTU Thing Channel
Configure a RockBLOCK RTU Thing Channel over the air
Note - this endpoint is only applicable to RockBLOCK RTU devices. For RockBLOCK and RockBLOCK Pro see Configure RockBLOCK Thing Channel.
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)mode- String channel modeupperTrip- double upper trip valuehysteresis- double hysteresis valuelowerTrip- double lower trip valuetimeSensitivity- String time sensitivity valuecovSensitivity- integer cov sensitivity valuesamplingPeriod- String sampling period valuegroupTransmissionSize- integer group transmission sizeunit- String RTU unit value
Channel Modes:
CHANNEL_MODE_DIGITAL_INPUT_ALERT_DISABLEDCHANNEL_MODE_DIGITAL_OUTPUTCHANNEL_MODE_ANALOGUE_INPUT_0_TO_10_VCHANNEL_MODE_ANALOGUE_INPUT_4_TO_20_MACHANNEL_MODE_DIGITAL_INPUT_ALERT_ENABLEDCHANNEL_MODE_OFFCHANNEL_MODE_BATTERYCHANNEL_MODE_RAW
Time Sensitivities:
TIME_SENSITIVITY_INSTANTTIME_SENSITIVITY_2XTIME_SENSITIVITY_3xTIME_SENSITIVITY_4x
Sampling Periods:
SAMPLING_PERIOD_2_SECONDSSAMPLING_PERIOD_5_SECONDSSAMPLING_PERIOD_10_SECONDSSAMPLING_PERIOD_15_SECONDSSAMPLING_PERIOD_20_SECONDSSAMPLING_PERIOD_25_SECONDSSAMPLING_PERIOD_30_SECONDSSAMPLING_PERIOD_45_SECONDSSAMPLING_PERIOD_1_MINUTESAMPLING_PERIOD_2_MINUTESAMPLING_PERIOD_3_MINUTESAMPLING_PERIOD_4_MINUTESAMPLING_PERIOD_5_MINUTESAMPLING_PERIOD_10_MINUTESAMPLING_PERIOD_15_MINUTESAMPLING_PERIOD_20_MINUTESAMPLING_PERIOD_30_MINUTESAMPLING_PERIOD_60_MINUTESAMPLING_PERIOD_90_MINUTESAMPLING_PERIOD_120_MINUTESAMPLING_PERIOD_180_MINUTESAMPLING_PERIOD_240_MINUTESAMPLING_PERIOD_360_MINUTESAMPLING_PERIOD_480_MINUTESAMPLING_PERIOD_720_MINUTESAMPLING_PERIOD_COV_TRIGGEREDSAMPLING_PERIOD_NEVER
RTU Units:
UNIT_VOLTSUNIT_MILLIAMPSUNIT_DIGITALUNIT_PERCENTUNIT_RAW
Insight/DoConfigureP6ThingChannel?channel=XXX&value=XXX&timePeriod=XXX&oneShot=XXX&mark=XXX
Endpoint: Insight/DoConfigureP6ThingChannel
Configure RockBLOCK Pro Thing Channel
Configure a RockBLOCK Pro Thing Channel over the air
Note - this endpoint is only applicable to RockBLOCK Pro devices. For RockBLOCK and RockBLOCK Pro see Configure RockBLOCK Thing Channel.
channel- Cloudloop Thing Identifier (e.g.dYrLZzemNQwPagBmmxByOqXbvMVjAoDG)mode- String channel modefilter- String filter valueioLevel- double io level valuehysteresis- double hysteresis valuereportPeriod- integer report period value
Channel Modes:
PEBBLE_IO_MODE_INPUTPEBBLE_IO_MODE_OUTPUTPEBBLE_IO_MODE_INT_RISINGPEBBLE_IO_MODE_INT_FALLINGPEBBLE_IO_MODE_INT_CHANGEPEBBLE_IO_MODE_VOLTAGE_INPEBBLE_IO_MODE_CURRENT_INPEBBLE_IO_MODE_OUTPUT_CONFIRMEDPEBBLE_IO_MODE_OUTPUT_ONE_SHOTPEBBLE_IO_MODE_OUTPUT_PWMPEBBLE_IO_MODE_COUNTER_RISINGPEBBLE_IO_MODE_COUNTER_FALLINGPEBBLE_IO_MODE_COUNTER_CHANGE
Filters:
PEBBLE_IO_CHANNEL_FILTER_LOWPEBBLE_IO_CHANNEL_FILTER_MEDIUMPEBBLE_IO_CHANNEL_FILTER_HIGH
Insight/DoConfigurePebbleThingChannel?channel=XXX&value=XXX&timePeriod=XXX&oneShot=XXX&mark=XXX
Endpoint: Insight/DoConfigurePebbleThingChannel