Isaksson / node-red-contrib-unifi

MIT License
51 stars 20 forks source link

Special Commands - Can't get it to work #47

Closed kgalilio closed 3 years ago

kgalilio commented 3 years ago

Using UDM Pro Controller v.5.14.22 with Firmware v.1.8.0.2888 and HASSIO in Docker environment. I managed to connect to the UDM pro using this node all the built-in UI commands works fine. Trying to change any AP LED light does not work for me. I injected a string type payload with the following contents: { command: "setapled", device_id: "01:23:45:67:89:00", mode: "off" }; return msg; but the AP LED status doesn't change and the debug window shows the results of whatever command selected in the unifi node.

Would appreciate an example of what exactly need to be selected in the unifi node in order to get the special commands to work. And if the node selection doesn't matter, how can I override the debug output to reflect the response to the special command?

Isaksson commented 3 years ago

Hello. If you paste this into a function node msg.payload = { command: "setapled", device_id: "24 char device id", mode: "off/on/default" } return msg;

change 24 char device id to the device id of the AP, (its not the MAC address) and then select the mode you want.

kgalilio commented 3 years ago

Hello. If you paste this into a function node msg.payload = { command: "setapled", device_id: "24 char device id", mode: "off/on/default" } return msg;

change 24 char device id to the device id of the AP, (its not the MAC address) and then select the mode you want.

Thanks @Isaksson It worked after selecting the message payload format to JSON. For some reason it didn't like the 'string' format.