A modular plugin for N.I.N.A. (Nighttime Imaging 'N' Astronomy) that integrates smart home switches into your astrophotography workflow.
The Smart Switch Manager allows you to control power relays and IoT switches as native N.I.N.A. equipment. This enables manual control via the Equipment tab and automated power management within the Advanced Sequencer.
| Provider | Hardware Generations | API Type | Status | Hardware Timer |
|---|---|---|---|---|
| Shelly | Gen 2 / 3 (Plus, Pro) | RPC | Lab & Field Tested | Yes |
| Shelly | Gen 1 | HTTP | Lab Tested | Yes |
| Tasmota | All (ESP8266/ESP32) | HTTP | Lab Tested | No |
| Home Assistant | Entities / Switches | REST | Lab Tested | No |
| ESPHome | web_server components |
REST | Lab Tested | No |
- Shelly: Supports Basic/Digest auth. Hardware timers are ideal for PC shutdown or cooling workflows.
- Tasmota: Reliable sequential request enforcement. See the Tasmota Documentation for important hardware/template tips.
- Home Assistant: Requires a Long-Lived Access Token (LLAT).
The Toggle SmartSwitch instruction in the Advanced Sequencer has a built-in safety check:
- Normal Toggle (Delay = 0s): NINA will wait (up to 10s) until the device physically confirms the state change before moving to the next instruction.
- Hardware Timer (Delay > 0s): NINA will continue immediately once the device acknowledges the command, while the timer runs autonomously on the hardware.
- Equipment Integration: Appears in the Equipment → Switch tab.
- Discovery: Scanners for Shelly and Tasmota to identify device details and channels at a given IP address.
- Sequencer Instructions:
- Smart Switch Set: Integration into the N.I.N.A. Advanced Sequencer.
- Architecture: Decoupled backend-provider structure with attribute-based capability discovery.
As the plugin is currently in beta and not yet in the official N.I.N.A. store, you can add this repository to install and receive updates:
- Open N.I.N.A.
- Go to Options → General → Plugin Repository.
- Click the + button under Extra Repositories.
- Paste this URL:
https://github.com/DIYAstro/NINA.Plugin.SmartSwitchManager/releases/latest/download/manifests.json? - Go to Plugins → Available and search for Smart Switch Manager.
- Download the latest release DLL (
NINA.Plugin.SmartSwitchManager.dll). - Navigate to your N.I.N.A. plugins directory:
%localappdata%\NINA\3\Plugins\. - Create a folder named
SmartSwitchManager. - Copy the DLL file into that folder.
- Restart N.I.N.A.
- Configuration:
- Go to Plugins → Installed → Smart Switch Manager.
- Select your provider (e.g., Shelly).
- Use the Device Scanner or Add Switch Manually to configure your devices.
- Set custom names (e.g., "Mount Power", "Dew Heater") and credentials if required.
- Manual Control:
- Go to Equipment → Switch, select Smart Switch Manager and click Connect.
- Toggle your switches directly from the Switch panel or the Imaging tab (Smart Switches window).
- Automation:
- In the Advanced Sequencer, search for the Smart Switch Set instruction.
- Drag it into your sequence and select the desired switch and state.
If you want to add support for a new smart switch ecosystem (like Tasmota or Home Assistant), please refer to the ADD_NEW_PROVIDER.md guide.
Requires .NET 8.0 SDK.
dotnet build NINA.Plugin.SmartSwitchManager.sln -c ReleaseLicensed under the MPL-2.0 License.
This software is provided "as is", without warranty of any kind, express or implied. The author and contributors are not responsible for any damage to equipment or data resulting from its use. Use at your own risk.
