Isaksson / node-red-contrib-unifi

MIT License
52 stars 20 forks source link

Set site name from another input #7

Closed Isaksson closed 6 years ago

Isaksson commented 6 years ago

I would like to set site name from another input as calling command from function, I'm getting the same error NoSiteContext. image I even tried to add this to unifi.js but still no luck.

 if (msg.payload.site != null) {
       site = msg.payload.site;
}
Isaksson commented 6 years ago

Just to make sure that your sitename is correct, if you add the sitename to the config then everything works?

Isaksson commented 6 years ago

New version is now pushed to NPM, you could now add the site name like this: msg.payload = { site: "site name"}; And like this to send the command ClientDevices to the site default. msg.payload = { command: "ClientDevices", site: "default"};

Please let me know when you have tested this new feature.

Isaksson commented 6 years ago

I have tried to contact the person who requested this enhancement without any success, so this issue is now closed based on my tests.