|  Developer
Updated on March 29, 2023

hub.item.value.set (different items with different values)

Connection type:
Permissions:

  • Set different items with different values.
Edit
Field Type Required Description
items object + List of items and values for setting
items.{item_id} object + Key of this object is item id.
items.{item_id}.value depends on item type + New item value.
items.{item_id}.scale depends on item type New item value scale. If the scale field is present, the firmware will work with the obtained value in accordance with the specified scale. If the scale field is NOT present, the firmware will work with the obtained value in accordance with the scale from a hub configuration or an item.
source object Optional. Contains information about the operation source.
Edit
Edit
Broadcast Description
hub.item.updated Informs about item changed
Edit
Edit
				
					{
    "method": "hub.item.value.set",
    "id": "<request_id>",
    "params": {
        "items":{
            "5cf0dc8c7f000068d223e88a": {
                 "value":true
            },
            "5cf0dc8c7f000068d223e77b": {
                "value" : 36.6,
                "scale": "celsius"
            },
            "5cf0dc8c7f000068d223e88b": {
                  "value":10
             },

        }
    }
}				
			
Edit
				
					{
    "api": "1.0",
    "error": null,
    "id": "_ID_",
    "result": {}
}				
			
Edit
Situation Error code Description Error code
Item scale cannot be converted to target scale -32602 The specified scale cannot be used rpc.params.scale.invalid
Bus send message operation timeout -32602 Bus request timeout
Bus incorrect message size (more then 100K) -32602 Bus message is too long
Bus data transfer another error -32602 Bus internal error