group_assignments Node-Red
-
when I make this group assigment request in order to switch all relays of unipi1.1 to on, only the last relay(8) is on, although all relays are clicking.
msg.url = "http://10.0.0.52:8080/bulk"; msg.headers = '{"content-type":"application/json"}'; msg.payload = '{"group_assignments": [{"device_type":"relay","assigned_values":{"value": 1}}]}'; return msg;
what is wrong with this request?
-
{"status": "success", "data": {"group_assignments": [[{"value": 0, "pending": false, "circuit": "1", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": false, "circuit": "3", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": false, "circuit": "2", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": false, "circuit": "5", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": true, "circuit": "4", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": false, "circuit": "7", "dev": "relay", "glob_dev_id": 0}, {"value": 0, "pending": false, "circuit": "6", "dev": "relay", "glob_dev_id": 0}, {"value": 1, "pending": false, "circuit": "8", "dev": "relay", "glob_dev_id": 0}]]}}```