Open buentead opened 2 years ago
Are there any errors in logs?
No, unfortunately not. I checked in /config/logs and on hassio/system.
I run the API by POSTMAN myself:
HTTP POST https://api.smartthings.com/v1/devices/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/commands
{
'commands': [
{
'component': 'main',
'capability': 'mediaInputSource',
'command': 'setInputSource',
'arguments': [
'wifi'
]
}
]
}
Which returns:
HTTP status: 200 OK
{
"results": [
{
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"status": "ACCEPTED"
}
]
}
Although the status returned is ACCEPTED, the device remains in the previous input source. It can be confirmed by the device status, that the source hasn't changed. Now, I assume it is a problem on the Soundbar Q80R itself and not in your component.
Do you know what the problem may be?
Sometimes they act wonky, you can try resetting it and it might be ok after adding it to SmartThings again
I have exactly the same problem on my HW-Q70R (HW-Q76R). I belive this worked a while ago, but the last weeks/month i can no longer change input to wifi from this component. I have tried to factory reset the soundbar, but the issue still persists. Change of input from the SmartThings app works, so that makes it even more strange.
After some "try and error" hours, I came up with the following solution:
Installation / Configuration
SmartThings Soundbar
from @PiotrMachowski (my entity ID: media_player.smartthingq80r
)media_player.av_samsung_soundbar_q80r
)Script to listen to Internet radio stations on Samsung Q80R through WiFi
radio_on:
alias: radio_on
sequence:
- service: media_player.turn_on
data: {}
target:
entity_id: media_player.smartthingq80r
- service: media_player.volume_set
data:
volume_level: 0.35
target:
entity_id:
- media_player.smartthingq80r
- service: media_player.play_media
data_template:
entity_id: "{% if is_state(\"input_select.dlna_render\", \"Wohnzimmer\") %}\n\
\ media_player.av_samsung_soundbar_q80r\n{% elif is_state(\"input_select.dlna_render\"\
, \"Büro\") %}\n media_player.av_samsung_soundbar_q80r\n{% endif %}\n"
media_content_id: "{% if is_state(\"input_select.radio_station\", \"SRF1\")\
\ %}\n http://stream.srg-ssr.ch/m/regi_zentr/aacp_96\n{% elif is_state(\"\
input_select.radio_station\", \"SRF2\") %}\n http://stream.srg-ssr.ch/m/drs2/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SRF3\") %}\n http://stream.srg-ssr.ch/m/drs3/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SRF4\") %}\n http://stream.srg-ssr.ch/m/drs4news/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SwissPop\") %}\n http://stream.srg-ssr.ch/m/rsp/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SwissJazz\") %}\n http://stream.srg-ssr.ch/m/rsj/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SwissClassic\") %}\n http://stream.srg-ssr.ch/m/rsc_de/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"Musikwelle\") %}\n http://stream.srg-ssr.ch/m/drsmw/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"SRFVirus\") %}\n http://stream.srg-ssr.ch/m/drsvirus/aacp_96\n\
{% elif is_state(\"input_select.radio_station\", \"RadioPilatus\") %}\n http://radiopilatus.ice.infomaniak.ch/pilatus128.mp3\n\
{% endif %}\n"
media_content_type: music
Using the DLNA entity to play a media from the Internet, the Samsung Q80R switches to WiFi itself. However, the display of the device may not show WiFi. But it works :-)
When I switch off the radio, I set the source to 'digital' using the entity ID media_player.smartthingq80r
. This is required, as the TV is connected through the optical interface.
@buentead thank you for the guide however I was not able to set the media renderer in point 3, can you help to clarify.
How did you set the samsung as DLNA Renderer ? I have missing soundbar in the list in HA however my samsung is visible in network, also in smartthings and have working integration from PiotrMachowski
You need to add the DLNA Digital Media Renderer. Then, the Soundbar will be discovered automatically.
You need to add the DLNA Digital Media Renderer. Then, the Soundbar will be discovered automatically.
Actualy this is what I did and got the output above...samsung soundbar did not showed up in the list of supported devices. Have you enabled the dlna for samsung somewhere ?
No. Not that I'm aware off. Could it be, that your device is ignored
or disabled
from the HA Integration?
In my situation, the soundbar just showed up; I got a message, that a new device was discovered and it was listed there.
Is your soundbar in the same LAN subnet as HA so it can be 'seen'?
It is indeed, I can ping it.
I tried the disabled as you suggested and it is not there, I do not get it because other devices are showing up.
Could it be that I have HW-900a and it does not support DLNA ? How to find out if device support DLNA ?
Thanks
I'm using the iPhone App uPnP Mate
(Version 1.1.3) from YLWong Consulting to discover and verify the my UPNP/DLNA devices.
Using uPnP devices showed up interesting thing, looks like HW-Q900a does not support DLNA which is very suprising considering that this is one of the Samsung high end subwoofers :(
Device is specified like dialreceiver not MediaRenderer, I am waiting for feedback from support to clarify...
Thanks for the feedback. I never saw 'dialreceiver' as a device in my environment. Is this a device using the Discovery and Launch (DIAL) protocol developed by Netflix and YouTube with the help from Sony and Samsung? Will be interesting to hear from Samsung support.
I got a feedback that Q900a does not support DLNA. However I made a request to the development team to make Q900a DLNA capable but doubt that this will happen
Using the service
media_player.select_source
I can switch the input source of my Samsung Q80R soundbar tohdmi1
andhdmi2
. But I'm unable to switch towifi
. Also I'm unable to switch todigital
.Note: I'm able to switch to any input source using the Samsung SmartThings App on my mobile phone.
Thank you for your work done!