Library for SmartSwitches (v2)