Virtual Switch on NSPanel Pro

Hi All,

I previously could create a virtual switch on iHost but am trying to do the same with an NSPanel but I keep getting errors. I followed the same structure that previously worked but am getting an invalid parameter error. I need to send a signal into nodered from the NSPanel to control non-Sonoff devices like my lock for example.