I want to update relayState property of a managed Object. ‘relayState’ property is inside ‘c8y_Relay’ property. I am using Analytics builder appilication to create a model which is using ‘Managed Object Output’ block but I am only able to update ‘c8y_Relay’ property and not ‘relayState’ property.
Product/components used and version/fix level:
Detailed explanation of the problem:
I want to update relayState property of a managed Object. ‘relayState’ property is inside ‘c8y_Relay’ property. I am using Analytics builder appilication to create a model which is using ‘Managed Object Output’ block but I am only able to update ‘c8y_Relay’ property and not ‘relayState’ property.
What should be the ‘Property Name’ inside ‘Managed Object Output’ block so that ‘relayState’ gets updated?
Error messages / full error message screenshot / log file:
Expecting to change value of “relayState” but only value of “c8y_Relay” is changing
“c8y_Relay”: {
“relayState”: “OPEN”
}
Question related to a free trial, or to a production (customer) instance?
You can only update top-level properties in a managed object. So you need to build the structure using the Set Properties block. If you need to retain some of the original fields, you would first need to run the Extract Properties block to retrieve the structure and then update whatever fields you want to update.
How to set nested property in “Set Properties” block and use this block to update particular Managed Object? In my case, “relayState” property is inside “c8y_Relay” property.
The parameter of the Constant Value block is “OPEN”, The “property 1” parameter of the Set properties block is “relayState” and the property name of the output block is “c8y_Relay”.