|  Developer
Updated on January 5, 2023

Item Value Source

  • The source field can be used to notify target gateway about the source of a value change. This field can be added to any variant of hub.item.value,set or hub.item.dictionary.value.set/add/remove, and for hub.ite,.dictionary.clear commands.
Edit

Fields: of a source object:

Field Type Required Description
source object Contains information about item value change source.
source.type string + Identifies known sources of value changes. Can be one of: house_mode, scene. Can contain any other string values to identify other WebSockets API clients or inner firmware services.
source.id string Optional. Some identifier related to item value change source.
source. any Optional. List of fields related to the source.
Edit
Edit
				
					{
    "method": "hub.item.value.set",
    "id": "<request_id>",
    "params": {
        "_id" : "5cf0dc8c7f000068d223e88a",
        "value" : true,
        "source": {
          "type": "house_mode"  
        }
    }
}				
			
Edit
				
					{
    "method": "hub.item.value.set",
    "id": "<request_id>",
    "params": {
        "_id" : "5cf0dc8c7f000068d223e88a",
        "value" : true,
        "source": {
          "type": "scene",
          "id": "{scene_identifier}"
        }
    }
}				
			
  • Note: the source parameter for house modes and Meshbots is only needed if the value set operation is a part of evaluation of a meshbot rule or a House Mode change. In the case of item value is changing by this mechanism inside the firmware, these parameters will be added to the command automatically.