[Release] Samsung Multiroom WiFi Audio

One of the buttons in the button interface is preset create. It is button 8 and is an arm/unarm button. The first arms the preset create. The next selection you make will create the preset unless you select the button 8 again.

See my new page below. The "not armed" is the preset create button.

I think I'm having a "thick day" Dave. I just cant grasp what I need to do.

I updated the code again, after installing the old code (so I could get my presets back). Then updated to the later code. I did manage to set a Preset_1, although by mistake, so now I have two of the same station lol. But most are working as intended.

I think I have it! I'm having a play and will update :wink:

update Got it :+1:

1 Like

I have updated the version on GitHub to add back in the following commands to the explicit and callable interface:

command "presetPlay", ["NUMBER"]
command "presetCreate", ["NUMBER"]
command "groupStart", ["NUMBER"]
command "groupCreate", ["NUMBER"]
command "groupStop"

Note that there is no presetDelete or groupDelete. By creating a new preset, it will overwrite the previous preset.

Dave

1 Like

Cheers Dave, much appreciated :+1:

NEW VERSION AVAILABLE:

A new version is available on GitHub (see original post for link).

04.06.2019. Update to version 2.1. Added

  1. TTS Queuing
  2. Capability Audio Volume
  3. Button Implementation (finalized).
  4. Test Queue command.

Upgrade:
For soundbars:

  • Add the new device driver "Samsung Soundbar.groovy" to the device driver page.
  • In the Devices Page, update the device type to Samsung Soundbar.
  • Run Preferences

For speakers:

  • Replace the existing device driver with "Samsung Speaker.groovy".
  • Run preferences.

Application:

  • Replace existing code with the new code. This is only necessary if you are going to add new devices. The only change is in the installation routine.

Button Implementation and example Dashboard:

Cheers: Dave.

2 Likes

First ... many thanks for your work on this functionality over the last few years ... it sure made this HA insanity a lot easier for a lot of folks!
Just wanted to let you know that I just spent about 4 hours trying to get the latest release to work with my R1 speakers. I'm just now starting to move things over to HE from ST and it was my first try with the driver and BigTalker app on HE; so I thought I was doing something wrong. Then I saw that it's a new release and tried with the version you released back in January. That worked fine ... so maybe there is a bug in the new version? I kept getting null pointer errors and assumed I wasn't initializing something correctly.

Hi, Dave. I upgraded to your latest (speaker code) and tested with a speak text command from the device handler. I'm seeing:

 09:48:07.654 pm [error](http://192.168.1.140/device/edit/1155)java.lang.IllegalArgumentException: argument type mismatch on line 500 (speak)

What did I do wrong?

It was me. Not you.

Updated driver to correct your problem.

1 Like

@djgutheinz

Error when using as a music player and/or speech device looks like similar errors. Also the Queuing errors for the first time when device is installed. I captured it at the bottom. Once I did a "test" in the driver itself the line 490 error went away.

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:29.007 am [error](http://10.0.2.38/device/edit/346)java.lang.IllegalArgumentException: argument type mismatch on line 500 (speak)

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:29.005 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_RadioInfo

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:28.933 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /CPM?cmd=%3Cname%3EGetRadioInfo%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:28.922 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: playTrackAndResume: trackUri = [duration:1, uri:http://10.0.2.38/tts/2f9b24bc688d5c29cd940aa6b6aef5c6.mp3], Volume = null, playingTTS = false

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:28.909 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: playTextAndResume: Text = test, Volume = null

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:28.907 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: speak: text = test

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:24.692 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_PlayStatus

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:24.590 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /CPM?cmd=%3Cname%3EGetPlayStatus%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:24.585 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: getPlayStatus: source = wifi, submode = cp

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:19.632 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_RadioInfo

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:19.535 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /CPM?cmd=%3Cname%3EGetRadioInfo%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:19.531 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: setTrackDescription: source = wifi

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:17.613 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_AcmMode

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:17.525 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /UIC?cmd=%3Cname%3EGetAcmMode%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:17.181 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_VolumeLevel

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:17.021 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /UIC?cmd=%3Cname%3EGetVolume%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.574 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: generalResponse_CurrentFunc

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.511 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /UIC?cmd=%3Cname%3EGetFunc%3C/name%3E, Action = generalResponse, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.509 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: finishRefresh

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.497 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: pollingResponse_MuteStatus

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.328 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: sendCmd: Command= /UIC?cmd=%3Cname%3EGetMute%3C/name%3E, Action = pollingResp, host = 10.0.2.33:55001

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.323 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: refresh, unreachableCount = 0

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.303 am [debug](http://10.0.2.38/device/edit/346)Samsung M3, 2.1.01: setRefreshRate: refresh rate = 5

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:45:16.244 am [info](http://10.0.2.38/device/edit/346)Samsung M3 updating: refresh = 5, debug = true

[dev:346](http://10.0.2.38/logs#dev346)2019-04-07 08:44:54.749 am [error](http://10.0.2.38/device/edit/346)java.lang.NullPointerException: Cannot invoke method leftShift() on null object on line 490 (speak)

There was an error corrected this AM that should fix the problem. Please in the future, send some log information so I see the error.

Thanks for the logs.

  • Driver updated on GitHub to correct typo not caught in final release.
  • Added Test Queue command that will play three messages.
  • Added "Run Preferences" to update instructions.
1 Like

Audio notifications are working again which is a plus.

Question...how big is the TTS queue? I attempted to run the TTS queue test and while it was announcing I opened some doors which have TTS notification to the device driver. Those did not announce. :frowning:

just tested on my R1. Worked OK; however.......

  1. try just opening some doors without the test queue. See if it works.

  2. try test queue again and see if it works.

I am right now modifying Test Queue to run all possible commands that can cause text-based audio notification (there are four). This will test all available external inputs.

So the TTS queue works fine if I open a couple doors. TTS is spoken in correct order. When using the test queue those same actions with a couple of doors are not registering with the queue. Just wanted to make sure you knew.

Yes. I think there is a collision in the code. Probably not a worry unless you are running Test Queue.

Thanks!!!!!

@djgutheinz

Weird error coming from app. Shows as null in logs. I discovered it was the Samsung app by replacing the app code if of another app with 442 and it shows up as yours. Went through app registration and closed app. Waiting for next refresh to see if error pops up again.

 [app:442](http://10.0.2.38/logs/past#app442)2019-04-07 03:28:39.303 pm[error](http://10.0.2.38/installedapp/configure/442)java.lang.StringIndexOutOfBoundsException: String index out of range: 6 on line 428 (ssdpHandler)

[app:442](http://10.0.2.38/logs/past#app442)2019-04-07 03:28:39.286 pm[error](http://10.0.2.38/installedapp/configure/442)java.lang.StringIndexOutOfBoundsException: String index out of range: 6 on line 428 (ssdpHandler)

[app:442](http://10.0.2.38/logs/past#app442)2019-04-07 03:28:38.939 pm[error](http://10.0.2.38/installedapp/configure/442)java.lang.StringIndexOutOfBoundsException: String index out of range: 6 on line 428 (ssdpHandler)

Need debug data. Not seeing error here. Have updated SmartApp to allow debug logging selection. you will need to change near the top of the file:

> ===== HUBITAT INTEGRATION VERSION ===========================*/
> //	state.debugLogging = true
> 	state.debugLogging = false
> 	def appVersion() { return "2.1.01" }
> definition(

to
>
> ===== HUBITAT INTEGRATION VERSION ===========================*/
> state.debugLogging = true
> // state.debugLogging = false
> def appVersion() { return "2.1.01" }
> definition(

?Hubitat_Samsung-WiFi-Audio/Samsung WiFi Audio App.groovy at master · DaveGut/Hubitat_Samsung-WiFi-Audio · GitHub?

I haven't seen anymore issues with the app. But the queue in the Samsung Speaker device has become frozen. No additional logs available besides the screenshot below of the device and the queue backed up.

That should not happen. However, SAVE PREFERENCES or run the TEST QUEUE. Both will reset the queue and the variable state.playingTTS (to false - which starts the queue action.

I will look at a design that precludes this problem - but it is not likely.

Dave

1 Like