Isaksson / node-red-contrib-unifi

MIT License
50 stars 19 forks source link

Set enablePoePort for multiple ports of a device #134

Closed JosepFarreLlados closed 2 months ago

JosepFarreLlados commented 2 months ago

Hello, This is not an issue, is a question related with the unifi syntax. I would like to use "enablePoePort" command for multiple ports instead to send a "msg.payload" for each port.

I'have tested the following syntax and not works: msg.payload = { command: "enablePoePort", device_id: "xx", port: ["1","2"], poe_mode: "off" };

Is possible turn on/off multiple ports of the same device using a single "msg.payload" command? Thanks in advance. Best regards

JosepFarreLlados commented 2 months ago

solved, using: msg.payload = { command: "setPortProfiles", device_id: "xx", port_overrides: [ {"port_idx": 1, "poe_mode": "off" }, {"port_idx": 2, "poe_mode": "off" } ] };

Isaksson commented 2 months ago

Great that you found the solution before I had the time to answer :)