[DEPRECIATED] BitBar V2: Display & Control SmartThings from the macOS Menubar

Oh, got it. I have the track description reduced to ‘9 point’ for showing extra long tracks, so I guess the Mac does some crazy interpreting finding a display font for that point…

Here is an example of a long track name.

1 Like

I had a feeling that was the reason. All good.

Awesome job as usual!

Thanks

1 Like

Hey @kurtsanders, It looks like you updated the ST app a few times since above. I have installed but I’m now getting:

java.lang.NullPointerException: Cannot get property 'displayName' on null object @line 633 (getMainDisplayData)

Trapped Error: colorRGBList = colorUtil.hexToRgb(RGBHex): RGBHex = [red:0, green:0, blue:0, white:0, hue:0.0, saturation:0.0, level:0, hex:#000000, name:black]

Trapped Error: colorRGBList = colorUtil.hexToRgb(RGBHex): RGBHex = [red:0, green:0, blue:0, white:0, hue:0.0, saturation:0.0, level:0, hex:#000000, name:black]

And it shows the unhappy face on my Mac.

Did the Python code change as well?

Yes, all the code changed for this major update…

You can update the BitBar SmartApp in the ST IDE using the Update from REPO. Then issue (copy/paste) this shell command below from the Mac Terminal.app which will update all the shell and Python files in the BitBar Plugin directory. This shell command will not overwrite your ST_Python_Logic.cfg which has your API strings.

curl -s -O -J -L "https://raw.githubusercontent.com/KurtSanders/STBitBarApp-V2/master/installation/STBitBarInstall.command" && sh ./STBitBarInstall.command

After this set finishes successfully, please enter the BitBar Output SmartApp on your mobile ST client to re-select devices for your Mac Main Menu Bar, along with verifying your other display preference settings.

If you still get an error, I can assist either with Facetime PC sharing or TeamViewer. This is a Beta release and all files need to be at version 4.0.0

The read.me file on the github has the details on the new features…

2 Likes

Right, but then I got notified that the ST SmartApp code in GitHub had further updates so I updated that code again. And since then it broke. It was working after the major update.

Anyhow, I’ll try and follow the other steps you mentioned.

1 Like

Can you run the sudo command above, and also you MUST re-select the devices in the BitBar Output App for the Main Menu to display.

Sure, after I’ve run a few errands.

Did that when I did the major update. Again, it was working just fine until I processed the latest ST app updates. Didn’t see you post anything about those here so I assumed it was minor.

Just doing this (again) resolved it, thanks. It seems if the ST SmartApp code changes at all you need to reset that option.

1 Like

News Announcement

ST BitBar V4.0.0 (Beta)

  • Can NOW display the sensor state of a Lock, Switch, Contact, Temperature and Smart Home Monitor in a rotating cycle in the Mac Main Menu Bar. Here is an example screenshot of Mac menu Bar with a Lock, Switch, temperature and SHM.

ezgif.com-gif-maker (1)

If you click on the ST BitBar icon and select the 1st line of the drop down BitBar menu, a text map of the icons and their status are displayed.


Please remember this 4.0.0 is a ‘work in progress’ beta release and if you choose to upgrade :radioactive:, you have to upgrade all the local shell and python files as well as the SmartApp in the IDE to version 4.0.0. After upgrading all the files, you MUST re-select devices to display on the Mac in the BitBar Output SmartApp. Failure to run the BitBar Output app to select devices causes the App to fail connecting to SmartThings.

An upgrade install script has been created to help one with auto downloading and updating the Mac BitBar plugin directory of the ST BitBar files. The Mac terminal command below must be run from the Mac’s Terminal.app console window on the Mac.

curl -s -O -J -L "https://raw.githubusercontent.com/KurtSanders/STBitBarApp-V2/master/installation/STBitBarInstall.command" && sh ./STBitBarInstall.command

If you are happy with the 3.2 release which only shows a temperature sensor in the menu bar, you do not need to upgrade.

2 Likes

Kurt,

I just noticed something although it may not be new (ie, related to V4.0.0).

My Sonos players all show in BitBar on the Mac but they are not selected in the BitBar SmartApp. In fact, they do not even show up in the SmartApp to be selected. I have other music player devices (Echo Speaks devices) that are available in the SmartApp and I can select them and they show up as expected on the Mac.

Dea @Nezmo,

Are you using the new or classic ST mobile client? ST BitBar app was developed for the legacy client but some ST users are testing it in the new client with some issues. I have yet to migrate to the new ST client since I have several SmartApps that also have not been fully migrated to the new API.

I am guessing that the new ST mobile client does not recognize ‘musicplayer’ as a capability for the Sonos players which the ‘musicplayer’ attributes/commands are a defined set of playback controls for track description, play, pause, skip, mute, volume control, etc?

Can you load the legacy ST mobile client on your phone and see if the Sonos players are listed like mine are? The blacked out area are my Amazon Echo devices

This is all in the Classic app. I do use the Connect app but in all this testing of BitBar I am doing everything via the Classic app.

In the Classic app my Sonos are not showing under Music Players, only my Echo Speaks devices are.

Note, I recently changed my Sonos handlers to the new Websocket handler. They are otherwise working everywhere else (and even show up in BitBar on the Mac lol). Just not showing in the Classic ST BitBar SmartApp.

1 Like

That might explain it! The webSocket handler for Sonos probably does not contain/register as a ‘musicplayer’ capability and therefore the BitBar, developed for the classic app, excludes them.

They are still active in BitBar because they were added to the variable that contains the list of musicplayers, but should you ever have to reload BitBar, you would not be able to add them back.

I will research the webSocket DTH and see what I might have to change to create a new section for WebSocket players…

1 Like

Makes sense Kurt, thanks!

I never followed this :new: Sonos WebSocket update procedure and all my Sonos players’ DTH are reflecting the legacy ‘LAN Sonos Player’…

They still work :innocent:, so I am reluctant to change when they are working as expected…

I will investigate to see what I can find out.

Yeah, I didn’t either for quite some time. I thought they were going to change automatically at some point but mine never did. BUT, I did it manually because the new DTH enables the Sonos to work properly with more functionality in the Connect app (even showing album art, for example) which we are all gonna have to move to eventually even if it’s done kicking and screaming.

Looks like this change affected more than just my app.

Yes, it has affected quite a bit.

For the record, I’m not particularly bothered by the Sonos issues (if you’re using Websocket DTH) in BitBar. I was actually trying to remove them when I realized they did not show up in the SmartApp to deselect. But I figured you’d want to know there was an issue.

1 Like

Thanks to @Nezmo for identifying an incompatibility in BitBar V4 for handling Sonos and other music players as a result of the :new: change in how SmartThings interfaces with Sonos (See ST Announcement below).

News Announcement (3/18/2020)

ST BitBar V4.0.0 (Beta)

  • Now uses the :new: ‘audioTrackData’ capability to interface with various music playback capable systems like Sonos™, Amazon Echo™, Google Home™, etc.

    • This new beta version has depreciated the previous legacy ‘mediaPlayback’ capability per the SmartThings announcement below for Sonos.
    • If you have not upgraded your Sonos devices to the :new: LAN Sonos Player Websocket DTH, please do not upgrade to this 4.0.0 version as these devices may cause unexpected results.
  • Identifies music metadata and manufacturer if provided by ST API

  • Album Cover Art

    • Click on the album, title, artist to display the album cover artwork in your browser.

Upgrade Requirements:

  1. Must perform an ST IDE ‘Upgrade from REPO’ for the BitBar Output SmartApp
  2. Must download & replace the ST_Python_Logic.py file in the BitBar plugin folder either manually or using the Mac Terminal.app application and copy/paste this command into the Terminal window:

curl -s -O -J -L "https://raw.githubusercontent.com/KurtSanders/STBitBarApp-V2/master/installation/STBitBarInstall.command" && sh ./STBitBarInstall.command

  1. Must execute the BitBar Output SmartApp and reselect your music players in the devices section of the preferences. Please verify all settings and save preferences. Refresh BitBar and verify functionality.


SmartThings Announcement for :new: Sonos Integration

2 Likes

So far so good with this update Kurt. Thanks!

1 Like