Skip to content

(1) The GUI (Graphical User Interface)

Zach Glenwright edited this page Feb 16, 2022 · 53 revisions

Prerequisites needed for the GUI: Bleak, PySide2

The default way to use NeewerLite-Python is through the GUI, a graphical look at the lights NeewerLite-Python can control, what their last set mode was, and the controls to change either individual or multiple lights' modes, color temperatures, brightness levels and more. To use the GUI, you need the PySide2 Python library installed.

Here is an overview of the GUI, from top to bottom:

The Scan/Rescan button

Tells NeewerLite-Python to scan for any lights in the range of your computer. If you've already run the scan once, the button text changes to "Re-scan", letting you scan for nearby lights again.

The Connect button

Forces a linking attempt for lights that may have not linked properly. If there is an error connecting to a light initially, clicking on this button will try to link the light (or lights, if you have multiple lights selected) another time. If you have a light that's already been linked and click on the Connect button, it will just report back that the light is already linked.

The Light Selector

The Light Selector lets you choose the lights you want to work with. You can select individual lights by clicking on one entry in the list, multiple lights by holding Ctrl down and clicking each one you want to control, or select all of them at once by hitting Ctrl-A (or Command-A, if you're on MacOS). Once you have your lights selected, you can hit the Connect button to try linking to each of the lights you have selected, or move the sliders in the various color modes to change the current color mode that the light is using.

The Custom Preset Buttons

The example above shows several types of presets - a custom snapshot preset, a custom global preset, another custom snapshot preset, a default (preset) global snapshot, another custom snapshot preset, 2 default (preset) global presets, and a custom snapshot preset.

The Custom Preset Buttons allow you to store and recall customized preset parameters to be used with one (or multiple) lights at the same time. By default, every one of the 8 preset buttons is assigned a default Global preset, which affects all lights that are currently selected in the same way. If no lights are selected when you click on a Global preset, all of the lights available to NeewerLite-Python will be auto-selected.

The standard default Global presets are:

1 - CCT mode / 5600K / 20% brightness
2 - CCT mode / 3200K / 20% brightness
3 - CCT mode / 5600K / 0% brightness (technically off in terms of brightness)
4 - HSI mode / 0º hue / 100% saturation / 20% intensity (RED)
5 - HSI mode / 240º hue / 100% saturation / 20% intensity (BLUE)
6 - HSI mode / 120º hue / 100% saturation / 20% intensity (GREEN)
7 - HSI mode / 300º hue / 100% saturation / 20% intensity (PURPLE)
8 - HSI mode / 160º hue / 100% saturation / 20% intensity (CYAN)

There are two different types of custom presets, Global presets (like the pre-defined ones mentioned above) and Snapshot presets. Global presets (they are Global because they effect everything selected in the same way) store one set of parameters that you can call up for multiple lights (for example, one preset might store CCT mode, 5200K, 100% brightness) and loads those parameters for every light that's currently selected in the light selector (or all of the lights currently available if none are selected). Snapshot presets (named that way because they store a snapshot of a bunch of configuration settings at once) are much more flexible, because they store multiple sets of light parameters in one preset - so, for example, if you have 2 different backlights using 2 different HSI values, a foreground light using a CCT value for a spotlight, as well as a 4th light that you want to turn off, you can save all of the light(s) parameters of all 4 lights in one Snapshot preset to recall all at once at a later time.

To store a new preset, right-click (or if you're on Mac and only have a one-button mouse, Control-click) and a dialog will ask you whether or not you want to save a Global preset, using the last parameters you've previously used or a Snapshot preset, which stores the last set parameter for each light individually. When saving a Snapshot preset, you can also choose to save parameters for either all of the lights currently available, or (if you have one or more lights selected) just the lights you currently have selected.

To erase a custom preset and revert it back to the default setting, hold ALT down while right-clicking/Control-clicking a preset button.

To recall a preset, left-click on the button that contains the preset you'd like to load. If you hover over a Snapshot preset, a tool tip will display the parameters for each light that preset will affect, along with highlighing the same lights in the light selector in light green. If a light is stored in a Snapshot preset, but is not currently available to NeewerLite-Python (if it's currently turned off, for example), the tool tip will show "---LIGHT NOT AVAIALBLE AT THE MOMENT---" instead of the name/type of light that would normally show.

The Mode Selector tabs - The mode selector tabs let you switch the light (or lights, if you have multiple ones selected) into the various color modes, CCT (for color temperature and brightness only), HSI (Hue Saturation Intensity, for full color gamut control of lights that allow it), and ANM (or SCENE) mode (for specialized animations that some lights allow) - click on a tab to change the light's mode to that mode, and then drag the sliders in the various modes to change the values of the light. Here are a look at the various color mode tabs -

The CCT Mode tab

The CCT mode tab allows you to change the color temperature (from 3200ºK, which is colder white, to 5600º*K, which is warmer white) and brightness in CCT mode (which is basically various shades of white, similar to a Frezzi with color temperature filters) - all Neewer lights with app control allow CCT mode, but some don't allow HSI mode, so this tab is always accessible. The Color Temperature slider adjusts the current color temperature you're sending to the light, with a gradient underneath showing an approximation of the color temperature you're selecting. The Brightness slider adjusts how bright the light is. You can also turn the light(s) on or off from this tab by clicking the Turn Light(s) On or Turn Light(s) Off buttons at the bottom.

* - In addition to the normal operation in this mode, several Neewer lights (such as the SL-80) let you set the color temperature to a higher value than the default highest temperature of 5600ºK - for example, the SL-80 can go as high as 8300ºK. So if you have the higher ranges turned on for the light you're controlling (settable in the Preferences tab, described below), NeewerLite-Python will attempt to send the higher color temp values once you slide past 5600ºK on the slider.

The HSI Mode tab

The HSI mode tab allows you to change hue, saturation and intensity for Neewer lights that allow HSI control. Bi-color lights (like the SNL-660) don't allow full color gamut control, so for lights that don't allow it, you can turn access to this tab on or off. The Hue slider adjusts the current base color you're sending to the light, with a gradient underneath showing an approximation of which color you're selecting. The Saturation control adjusts how "vibrant" the color is (so for slightly dimmer red, select a hue of 0 and adjust the saturation down a little bit.) The Intensity (Brightness) slider adjusts how bright the light currently is (so you can have, for example, full-on red, but slightly darker, adjust the hue slider to 0, and the saturation to 100%, but turn the brightness down a little bit.)

The Animation/Scene tab

The Animation/Scene mode tab allows you to load "scenes", which are pre-programmed animations for use with Neewer lights that support them. Along with lights like the SNL-660 that don't allow HSI mode, they also won't allow ANM/SCENE modes, because they can't display multiple colors. Most Neewer lights that support scenes let you use 9 separate ones, ranging from police sirens to lightning. Clicking on the scene button tells the light to play that scene. As before, the Brightness slider adjusts how bright the light is when displaying the scene.

The Light Preferences tab

The Light Preferences tab allows you to change preferences for individual lights. You can give lights custom names (like "Spotlight", "Behind set", "Side fill", etc.), and change operational parameters. Allow wider range of color temperatures for the CCT slider turns on the ability (for lights that support it, like the SL-80) to use a wider range of color temperatures with the CCT color temperature slider. This light can only use CCT mode does two things - it turns off the HSI and ANM tabs for that specific light, and it sends the CCT information in a slightly different way (Bi-color lights, like the SNL-660, send the color temp/brightness data to those lights differently), which allows it to work with bi-color-only Neewer lights. Saving the preferences creates a file with the same name as the MAC address (or, if you're on MacOS, the GUID) of that specific light, in a special folder called light_prefs in the directory that you have NeewerLite-Python installed in.

The Global Preferences tab

NOTE: - To save any preferences, you need to click on the Save Global Preferences button. If you don't click on this button, your preferences will not be saved.

The Global Preferences tab lets you set various settings that change how NeewerLite-Python operates, in GUI mode as well as in the CLI and HTTP modes. The preferences available are:

Scan for Neewer lights on program launch (Default: Enabled) - If this option is enabled, NeewerLite-Python will search for nearby lights when the program launches GUI mode. If you disable this option, the program will start as normal, but not look for any lights until you manually hit the Scan button at the upper right.

Automatically try to link to newly found lights (Default: Enabled) - If this option is enabled, NeewerLite-Python will automatically try to link to any lights it finds after a scan. If you disable this option, the program will find new lights, but not attempt to link to them until you hit the Connect button at the upper right.

Print debug information to the console (Default: Enabled) - If this option is enabled, NeewerLite-Python will print information to the Python console about what is currently happening (or "Background Thread Running" if it's waiting for something to do). If this option is diabled, NeewerLite-Python will greatly reduce the messages it sends to the console. Some messages, such as saving preferences and other cleanup operations will still write to the console, but the messages will be greatly reduced.

Remember the last mode parameters set for lights on exit (Default: Disabled) - If this option is enabled, NeewerLite-Python will write a preferences file in the light_prefs folder for each individual light (the filenames for each light are based on each light's individual MAC addresse/GUID) when quitting out that saves the last set parameters for that light, so the next time you launch the program, the light settings will be where you last left them. If this option is disabled, the program will not write those preference files, but if preferences files exist from a previous session, they will be loaded the next time NeewerLite-Python launches in GUI mode.

Save configuration of custom presets on exit (Default: Enabled) - If this option is enabled, NeewerLite-Python will write a custom preset preferences file (customLights.prefs) in the light_prefs folder. This preference file saves all of the custom presets you set up using the Custom Preset buttons. If this option is disabled, NeewerLite-Python will not save that preference file. As with the above option, if there is a preference file from a previous session, the program will read that when the program launches in GUI mode, even if you have this option disabled.

Maximum Number of retries (Default: 6) - This option sets how many times NeewerLite-Python attempts to do specific things (trying to connect to a light, send to a light [in CLI mode], etc.) before giving up.

Acceptable IPs to use for the HTTP Server - This option specifies which IP addresses the HTTP server will allow control of the program from. If the IP address of the machine you're making a request from isn't in the list, the server will send back an error. By default, the main list includes 127.0.0.1, as well as IP ranges 192.168.*.* and 10.0.0.* - to specify a wildcard IP range, leave the rest of the line blank - so to specify 192.168.*.*, type in 192.168. Every new entry in this list should be separated by a new line, so if you have 3 separate IP addresses to add, hit ENTER between each one of them.

Whitelisted MAC Addresses/GUIDs - This option specifies "whitelisted" MAC addresees or GUIDs that NeewerLite-Python will allow into the list of lights available, whether or not they have the word "NEEWER" in the device's name. This option was added by request for someone that had lights that were detected by NeewerLite-Python, but not allowed use of, because Bleak couldn't see the word "NEEWER" as part of the name. This option may come in handy later on, if there are lights that use the Neewer control schemes, but are from another brand.

Custom GUI Keyboard Shortcut Mapping - This section allows setting custom keyboard shortcuts for any of the normal keyboard shortcuts NeewerLite-Python allows. To set a keyboard shortcut, click on the old shortcut and type in a new key combination. To clear any shortcut and reset it to the default, click on the X to the right to the shortcut.

Click here for a list of the standard default keyboard shortcuts.

Reset Preferences to Defaults - Click this button to reset all preferences to their default values.

Save Global Preferences - Click this button to save your currently set preferences to a file in NeewerLite-Python's directory, NeewerLite-Python.prefs.

The Statusbar

The statusbar at the bottom of the screen shows the currently running operation (searching for lights, linking, etc.), or the current bytestring being calculated to send to the light.

Clone this wiki locally