[Release] Samsung Multiroom WiFi Audio

CAL.Hub. i will work yours today to determine issue.

CrisD. In Hubitat Environment, Select Settings >> Hub Details. At the bottom of the settings is Default Text To Speech (TTS) Voice. I use Nicole, Female, Australian. Really a kick and I really loved my 1 year in Oz.

Dave

1 Like

R1 Speaker, Bluetooth, and TTS

Investigation of using TTS with Bluetooth indicates the following behavior
Setup: Connected to my Samsung S8 via Bluetooth and playing a song. TTS sent via Hubitat interface of Play Text and Resume.

a. Speaker switches to WiFi and announces "WiFi is Connected"
b. The TTS string plays.
c. Speaker switches back to Speker and anounces "Bluetooth is Ready".

Problem: The speaker does not reconnect to the S8 and does not restart audio. This may be either the S8 (is there an auto Bluetooth Connect function?????).

Implications: TV Sound Connect would act similarly. Need confirmation. If not restarting TV audio, it is a limit in the TV.

Dave

1 Like

Not sure this helps, but here's my observations:
When using a group of Samsung speakers as surround speakers for a Samsung TV, the TV-configuration takes precedense and any "normal" grouping you've made will break.

This is what it looks like in the Samsung app (sorry for the Swedish, I think you get the geist):

I have therefore separated the 4 X WiFi TV-audio speakers from my normal/day to day streaming surround-audio set-up.

One problem I have is: when using TTS announcements on a group of speakers that are intended for non-TV use, the announcement will only play on the master-speaker and any previously playing WiFi source will not re-commence.

In the log, I'm also getting constant warning messages for
2018-12-16 14:36:56.174 warnNo route to host (Host unreachable)

Will look into over the next few weeks. It worked in the past. The No route to host implies that the WiFi connectivity issues. I get the same when I unplug the speaker.

Dave

1 Like

Thanks for the investigation! The above is further than I got. Once the speakers are connected to the TV (via Wi-Fi), I could not make a connection to Hubitat. In the Multiroom app, it says the speakers are connected to the TV and I have to disconnect before connecting to Hubitat. Maybe because both are Wi-Fi?

By "separated" do you mean you have a set of speakers dedicated to the TV and a set dedicated to other uses?

Yes, that is correct.
I've found that once I configured WiFi speakers to be used for surround sound on the TV, and also grouping them for other uses, the preference on the TV breaks, forcing me to re do the TV set up.

Working on adding buttons for Preset Channels
One of the features of the Samsung Multiroom is a number of embedded applets that connect to WiFi music and radio services. This driver provides eight channel presets that can be set via the UI. However, this has not been accessible to to the Dashboard. This week I will release an update that includes buttons:

0 - triggers the next action to assign the preset number to the currently playing channel.
1-8 - if not triggered, plays the selected preset.

Note, that may also add buttons 9 - 11. If not triggered, starts the selected group number. If triggered, creates a group from the current group and assigns it to the group number.

Also interested if anyone is interested in other functions to be available as buttons:
toggleShuffle
toggleRepeat
toggleEqualizerPreset
toggleInputSource

Also, holdable buttons will be implemented for groups and presets - but will be useless on the Hubitat Dashboard.

Any interest in incorporating any of this into the Hubitat 2.0 baseline????

Dave

3 Likes

+1 for music/radio presets AND group presets with user definable group names (not just numbers).

I run a fairly large setup with speakers in all rooms and would love to enable the different groups and stations from the dashboard.

For the toggles: I personally don't use them

Likewise.

Hubitat does not support adding attribites to buttons. I do provide attributes and you could create an attribute tile below each button to provide the name of the group or channel player station.

My intention is to have the speaker(s) on my main page with a link to a preset page. The presets page would include a link back to the main page.

Dave

1 Like

One does what one can given the circumstances :wink:

@patrick - here's a good example why users would want to give specific names to dashboard buttons , manually or via attributes.

In work. I have groups working as well as presets. Still need to validate Stereo and Surround (soundbar only).

2 Likes

Updated to Include Dashboards. See initial post for details. Final sample dashboard (viewed in portrait and landscape on my Amazon Fire Tablet):

Landscape

Portrait

2 Likes

Great update Dave :+1: works great!!
On the eqPreset, any reason why I'm getting a null: on the tile?

image

Cheers
Roy

Will fix today. I updated the "attributes" in the system so the button page display made sense. Needs fixing!!!!!

1 Like

I had already fixed. The current driver corrected the problem. Just in case, I reloaded.

Since this is an update, be sure to press refresh. Also, try pressing a button to update the attribute state. It was impractical to update all attributes to current.

See new dashboard below:

Dave

1 Like

Getting this info spamming the log for the Samsung WiFi Audio App:

app:732019-01-16 21:17:56.474 errorjava.lang.NullPointerException: Cannot invoke method updateData() on null object on line 174 (ssdpHandler)
app:732019-01-16 21:17:56.464 errorjava.lang.NullPointerException: Cannot invoke method updateData() on null object on line 174 (ssdpHandler)
app:732019-01-16 21:17:56.384 errorjava.lang.NullPointerException: Cannot invoke method updateData() on null object on line 174 (ssdpHandler)
app:732019-01-16 21:16:56.234 warnNo route to host (Host unreachable)
app:732019-01-16 21:16:47.583 warnNo route to host (Host unreachable)
app:732019-01-16 21:16:47.582 warnNo route to host (Host unreachable)
app:732019-01-16 21:16:47.581 warnNo route to host (Host unreachable)
app:732019-01-16 21:16:47.579 warnNo route to host (Host unreachable)
app:732019-01-16 21:11:56.244 warnNo route to host (Host unreachable)
app:732019-01-16 21:11:47.583 warnNo route to host (Host unreachable)
app:732019-01-16 21:11:47.582 warnNo route to host (Host unreachable)
app:732019-01-16 21:11:47.580 warnNo route to host (Host unreachable)
app:732019-01-16 21:11:47.579 warnNo route to host (Host unreachable)
app:732019-01-16 21:06:56.284 warnNo route to host (Host unreachable)
app:732019-01-16 21:06:47.586 warnNo route to host (Host unreachable)
app:732019-01-16 21:06:47.584 warnNo route to host (Host unreachable)
app:732019-01-16 21:06:47.583 warnNo route to host (Host unreachable)
app:732019-01-16 21:06:47.581 warnNo route to host (Host unreachable)
app:732019-01-16 21:02:21.614 warnConnection timed out (Connection timed out)
app:732019-01-16 21:02:16.494 warnConnection timed out (Connection timed out)
app:732019-01-16 21:02:14.414 warnConnection timed out (Connection timed out)
app:732019-01-16 21:02:13.934 warnConnection timed out (Connection timed out)
app:732019-01-16 21:02:13.293 warnConnection timed out (Connection timed out)
app:732019-01-16 21:02:12.998 warnConnection timed out (Connection timed out)

For the speakers this message is constantly repeated:

dev:92019-01-16 21:51:48.147 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:46:48.243 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:41:48.160 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:36:48.145 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:31:48.239 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:26:48.157 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:21:48.148 infosetTrackDescription: Updated trackDesciption to WiFi null

dev:92019-01-16 21:16:48.153 infosetTrackDescription: Updated trackDesciption to WiFi null

Anything I can do on my end to ease the logging burden?

The not route to host is generated by Hubitat (not my code) when the speaker is unreachable (i.e., off). The same is true for the others. Keep the units powered on. I will work on some long-term checking - but will take some creativity.

I will test locally and see if I can trap/avoid the error logging.

Ok, will check but the speakers are constantly powered and WiFi setting is only used.

Another thing popped up - I have a trash day reminder that announced as it should, but the previously playing stream did not resume, even though the logs informs differently (besides the repeated "updated appVersion to 2.0.01") :

dev:112019-01-16 20:17:56.449 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 20:17:56.274 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 19:47:56.508 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 19:47:56.494 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 19:30:08.406 inforestorePlayer: Restoring play to [level:20, inputsource:wifi]

dev:112019-01-16 19:30:00.385 infoplayTrackAndResume: Resume = 0, Track = [duration:2, uri:http://192.168.1.143:8080/tts/2ac821c9e142f997853f9ee2fad6bc09.mp3], Volume = 33

dev:112019-01-16 19:17:56.474 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 19:17:56.457 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 18:47:56.397 infoupdateData: updated appVersion to 2.0.01

dev:112019-01-16 18:47:56.353 infoupdateData: updated appVersion to 2.0.01

The "playTrackAndResume" message indicates that you are playing through either PlayTrackAndRestore or PlayTextAndRestore (Resume = 0). PlayTextAndResume or PlayTrackAndResume resume the playback. Logic:

PlayTrackAndRestore:
a. Command received with track.
b. state.resumePlay set to 0
c. call playTrackAndResume

PlayTrackAndResume:
a. command received with track data.
b. If state.resumePlay = 1, set up resume function
1) Skip set up resume function if stateResumePlay = 0
c. Play the track
d. set stateResumePlay = 0