This app is Unsupported by the devloper who now uses Hubitat. The new SmartThings mobile client and platform is unreliable and buggy.
-
5.0x (Alpha)
-
4.01 (Stable) (zip file)
- Integration of Hubitat™ and SmartThings into a reduced code stream multi-platform release. Both Hubitat™ and SmartThings™ BitBar apps can run together or independently depending on if you have one or both hubs.
- Integration of hubitat-packagemanager for the App Code install on the the Hubitat™ platform. The remaining manual install of the macOS files and scripts are still required and documented below in the Hubitat Section Installation.
Monitor and control SmartThings and Hubitat™ devices, sensors, Smart Home Monitor, Modes & Routines from the Apple MacOS Menu Bar. This application is controlled via the SmartThings Mobile Client named BitBar Output App. Selected program scripts and configuration files are installed locally on the Apple Mac in the BitBar plugin folder.
The STBitBarApp-V2 application works with the macOS BitBar application as a custom BitBar Plugin and is controlled via the BitBar Output App. STBitBarApp-V2 displays thermostat information, temperature, relative humidity, event-log statistics, contacts, music players, presence devices, locks, lights, and motion sensors. It can also control color control (RGB) device levels, switch/dimmer level devices, locks and also thermostat control via the MacOS menubar. The Mac menubar icon can be a thermostat reading, contact sensor, lock sensor or switch sensor and upon clicking the displayed state icon, renders more detailed information on all the SmartThings selected in the SmartApp GUI.
One can click on any controllable SmartThings or Hubitat device, mode or routine in the Mac's BitBar display to invoke the default action for that device, mode or routine. Non-controllable devices (eg. presence sensors, motion sensors, temperature sensors) can show their event history.
Sensor battery levels can be displayed for devices that have a battery capability by depressing the Apple {option} key as the BitBar menu is activated {being displayed}.
- Apple macOS 10.x with Python 2.7
- BitBar Software Installed and Preferences set as 'Open at Login' and BitBar plugin folder designted *Freeware*
- SmartThings Hub & Devices or Hubitat™ Hub & devices
- Knowledge of installing and configuring software on macOS and either Hubitat and/or SmartThings IDE
- Member of the SmartThings Community or Hubitat Community for support and new release information.
- Note: Mat Ryer's BitBar core app lets one put the output from any macOS script or program right in your macOS menu bar. And it's completely free. An impressive number of other plugins have already been contributed by a wide range of developers, and his website makes it easy to find them.
- This STBitBarApp-V2 plugin is uniquely specific to users of SmartThings™ and Hubitat™ and the installation and configuration are well documented below.
-
Download and Install BitBar Core Software *Freeware*
- Download BitBar-v1.9.2.zip to your Downloads folder.
- Launch Finder and navigate to your Downloads folder
- Double click the BitBar-v1.9.2.zip file to unzip the file contents.
- Drag/Move the BitBar.app into your Mac's Applications folder
- Launch BitBar.app from your Mac's Application folder
- Locate the BitBar icon displayed in the Mac's Top Menu Bar. Click the BitBar icon to display preferences dialogue menu.
- In the Mac Menu Bar, click the BitBar Icon and set BitBar preferences to:
- √ Open at Login
- Select the 'Plugin Folder' on the Mac (.ie
/Users/smith/BitBar
)
-
Launch the Terminal.app from the Mac Applications 'Utility' SubFolder
-
In the terminal console window, enter the following:
cd ~\Downloads
-
Press Return
-
Select, copy and paste one of the following entire string into the Mac's Terminal Console Window.
curl -s -O -J -L "https://raw.githubusercontent.com/KurtSanders/STBitBarApp-V2/master/installation/STBitBarInstall.command" && sh ./STBitBarInstall.command
curl -s -O -J -L "https://raw.githubusercontent.com/KurtSanders/STBitBarApp-V2/master/installation/HEBitBarInstall.command" && sh ./HEBitBarInstall.command
-
Press Return
-
Read install/upgrade messages from the script.
-
Your BitBar Plugin's directory has been created or upgraded to the latest BitBar-V2 release.
*These instructions are ONLY for SmartThings Hub. If you are installing for the Hubitat™ Hub platform, specific instructions are here
The recommended approach for BitBar SmartThings installation on the Mac is to use the integration of your SmartThings IDE and GitHub so that updates to the BitBar Output SmartApp are visual and easier.
A new Install or Version Updates to the shell scripts and Python source code located on your MacOS is either by STBitBarInstall.command script or a manual method by downloading the source code from the Github repository. This manual will not go into detail about setting up your SmartThings IDE with GitHub as that is documented in the SmartThings GitHub Documentation.
-
Setup the SmartApp: Find your SmartThings IDE Link
-
Find the My SmartApps link on the top of the page.
-
Find the Settings button at the upper-right corner of your SmartThings IDE page (this will only appear after you have configured with GitHub).
-
Clicking this button will open the GitHub Repository Integration page. To find the StBitBarApp SmartApp code, enter the information below:
Name Value Owner kurtsanders Name: STBitBarApp-V2 Branch master -
Close the GitHub Repository Integration page by clicking the Save button.
-
Click the Update from Repo button at the upper-right corner of your SmartThings IDE and select STBitBarApp-V2 (master) from the list.
-
In the right-hand column you will see smartapps/kurtsanders/stbitbar.src/stbitbar.groovy, select this using the checkbox.
-
At the bottom-right corner of the Update from Repo page, select Publish using the checkbox and then click Execute Update.
-
When done syncing, the new SmartApp should now appear in your IDE.
-
If they ever change color, that indicates a new version is available.
-
Enable OAuth: Back at the My SmartApps page, click the little edit icon for the BitBar Output App, then click OAuth section, then click Enable OAuth in SmartApp.
-
Skip to Section 2 below
- Setup the SmartApp: Find your SmartThings IDE Link
- Click My SmartApps > then New SmartApp (top-right green button)
- Click the From Code tab and paste the SmartApp code from GitHub then click Create.
- Enable OAuth: Back at the My SmartApps page, click the little edit icon for the BitBar Output App, then click OAuth section, then click Enable OAuth in SmartApp.
- Now for actually installing the SmartApp: On your mobile device in the SmartThings app > tap Automation > SmartApps > + Add a SmartApp (at the bottom). Go down to My Apps > select BitBar Output App.
- Open the IDE in a separate browser tab.
- In the mobile client, tap to Enable the API then tap Done.
- Your secret URL and API secret is displayed in the Live Logging screen tab when you exit the ST BitBar SmartApp on the mobile phone.
- :New: One can also select 'Send API to a Mobile Device' in the 'API Setup'. This will send the two secret strings to a mobile phone as SMS message. Indicate a USA mobile phone number and select send to mobile phone.
- Copy/Save these two lines to input in the ST_Python_Logic.cfg in the step ahead. Use Textedit.app to edit the ST_Python_Logic.cfg on the Mac. Input the two secret strings exactly as the template shows, using double quotes.
- Launch the ST BitBar Output SmartApp in mobile SmartThings client and you should now see local file version information if your local Mac setup is completed correctly. You may complete/customize your BitBar Top menu by:
- Selecting Devices: choose the devices you want to display/control then tap Done.
- Selecting Display Options: select the display options for the MacOS menu. Please note that some option values are required.
In Version V4, these manual steps below are now automated in Section 1 Installation. If you prefer the manual install method, follow the steps below.
-
Required: You must download and install the core BitBar app on your Mac. This program is required to allow ST BitBar SmartApp to access the top menubar on the Mac.
-
After downloading and installing the BitBar App & moving the BitBar App file to your applications folder, launch the BitBar App so that you can set the path for your Plugin directory.
IMPORTANT: When selecting a plugin directory where the plugins will reside, make sure you create one that does not contain spaces. There were issues in an older release of BitBar if the path contained spaces, but supposedly it’s fixed, but I still had issues in some cases. If there were no spaces, it always worked.
-
In the BitBar application menu, the last option is labeled 'Preferences', make sure you select 'Open at Login' and specify the Plugin directory where you will place the plugin files from this Github in the next step.
-
Download the ST plugin from GitHub. Copy ONLY the ST.5m.sh file to the plugin directory you specified along with the ST subfolder containing the Python script and the ST_Python_Logic.cfg (make sure these two files stay in the folder named ST). These files should be the only files in the plugins directory and the ST subfolder.
-
Launch the SmartThings BitBar Output App on your mobile device. Select API Setup and Activate. Follow the screen instructions and record the SmartThings URL and secret strings. One can view the ST IDE Live Logging screen to copy the strings when launching and exiting the BitBar Output App on your mobile screen.
- Note: You can also choose to have your API strings send unencrypted to a mobile device with a USA phone number. This will allow one to copy and paste these into your ST_Python_Logic.py file from the Mac messaging app.
-
Add your URL and secret to the ST_Python_Logic.cfg file without any quotes: Open the ST_Python_Logic.cfg with a text editor of your choice (eg. textedit). Put the URL that was displayed in step 5 in the smartAppURL variable and Secret in the secret variable without any quotes.
-
Save the ST_Python_Logic.cfg file in the ST subfolder.
-
Ensure execution rights for the plugins:
- Launch the MacOS Terminal Application
- Navigate to your BitBar Plugins directory (eg. cd)
- Issue the admin commands on the following files:
- chmod +x ST.1m.sh
- chmod +x ST_Python_Logic.py
- Exit the MacOS Terminal
-
Start the BitBar app and you should see your SmartThings devices and status’ in the MacOS menubar!
Install the App Code to your Hubitat platform via the hubitat-packagemanager. Do NOT select to launch BitBar Output App after hubitat-packagemanager completes. The BitBar application is listed in hubitat-packagemanager under the categories of “Utility”, “Control”, “Convenience” and the tags of “Integrations”, “Monitoring”, “Dashboards”, “Tools & Utilities”.
After install of the BitBar Output App Code on Hubitat, you will need to follow the rest of the manual file & scripts install below where it is specific to Hubitat. After all macOS files & scripts are installed, you may then return to Hubitat™ web page and launch the BitBar Output App You will need to authorize the Oauth and record the two API strings, add these two API strings to the HE_Python_Logic.cfg file and configure the BitBar Output App preferences for devices and display options.
- Please make sure that the core BitBar application is installed and configured per the instructions above.
- Launch the BitBar Output App. Select API Setup and activate it. Follow the on screen instructions and record the Hubitat URL and secret strings.
- Add your Hubitat URL and secret to the HE_Python_Logic.cfg file without any quotes: Open the HE_Python_Logic.cfg with a text editor of your choice (eg. textedit). Put the Hubitat URL that was displayed in step 1 in the smartAppURL variable and Secret in the secret variable without any quotes.
- Save the HE_Python_Logic.cfg file in the ST subfolder.
- Ensure execution rights for the plugins:
- Launch the MacOS Terminal Application
- Navigate to your BitBar Plugins directory (eg. cd)
- Issue the admin commands on the following files:
- chmod +x HE.5m.sh
- chmod +x HE_Python_Logic.py
- Exit the MacOS Terminal
- Select the 'BitBar Output App' from the Hubitat Web Page 'Apps'.
- Complete/customize your BitBar Top menu preferences by:
- Selecting Devices: you must choose the devices you want to display/control then tap Done.
- Selecting Display Options: you must select the display options for the MacOS menu. Please note that some option values are required.
- Exit the BitBar Output App and refresh the BitBar menu Bar on the macOS
- You should see your Hubitat™ devices and status states’ in the MacOS menubar!
- Dimmer and Color Controls in BitBar Sub-Menus
- The BitBar App is capable of cycling through multiple status bar items. However, this ST BitBar Plugin is designed to only display a ** temperature sensor, contact sensor, lock status, or switch sensor** at the top with the rest of the sensors displayed in the dropdown.
- The SBitBar app only allows a selection of one temp, lock, contact or switch sensor or a default 'BitBar' title. It is not recommended to use the full sensor name since menubar real estate is top dollar.
- There is no hortizontal alignment supported by BitBar so it’s all done by character spacing, which means using Apple system monospace fonts for data content. Menlo is the default font, but feel free to change it in the ST BitBar App in the mobile client Display Options.
- Selection of a proportional spaced font, pitch and color can be used for all other text areas of the display, like the ST Categories and the ...more... sections. Be aware that some fonts, colors and sizes may cause the menu to become illegible. Blank field defaults in the options fields will return the display to normal.
- Most areas of the menu will accomodate extended ascii character sets, but there might be areas that not. If so, please rename these devices with US ascii characters and send a PM to me on the SmartThings Community Forum.
- Be mindful of the # of devices selected, event history days/number settings as the SmartThings Computing Cloud has implemented strict SmartApp rate runtime limits that will prevent the BitBar Output App SmartApp from execution. When a client application exceeds the rate limits for a given SmartThings API, the SmartThings API responds with the standard HTTP 429 (Too Many Requests) error code.
- Hold the Option key while the BitBar menu is open to display battery information for devices that can report battery level status.
- The max items per sensor category can be set in BitBar Output SmartApp Menu Options (if you want to save space but still have access to the sensors)
- Use Command-R while viewing the STBitBarApp-V2 menu to Refresh the devices, otherwise it will automatically refresh every 5 minutes.
- You can download the latest version of the Python code at the bottom of the STBitBarApp Menu under STBitBarApp Action & Shortcuts
- Emoji short-names are special graphical icons that can be displayed for custom device status. Please note that these short naming convention is ':xxxxx:' and the name must be entered exactly as they are named on the Emoji Website Valid Names List
- Many other display options are provided and activated in the STBitBarApp SmartApp and are either optional or required.