New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Upnp volume control/status to SamsungTV #68663
Conversation
Hey there @chemelli74, mind taking a look at this pull request as it has been labeled with an integration ( |
cc @bdraco, @sermayoral I still need to add tests, and parse the source list. |
I have removed the Upnp app_list request - I can add in a follow-up PR |
@epenet. What do you need? |
For this PR => just confirmation that these three work correctly for you:
|
For Upnp app-list, maybe you can ping me on discord (https://discord.com/invite/home-assistant - epenet#1188) to discuss further |
Not A Number: Here is the full log: https://pastebin.com/rV1HyFx9 |
@sermayoral I have set a default value for the TVs that do not respond on url I am not sure how to handle TVs that have Upnp on a different URL. |
We need to add |
ssdp needs to change as well |
Testing looks good I'll split this after some sleep |
A reauth flow is no longer required to detect the need for encryption as it can now be detected during setup Fixes being able to setup legacy TVs since the encrypted check previously would prevent them from proceeding Improves the failure case where the user cannot hit the button to allow Home Assistant connect to the TV in time by allowing them to retry
Changes split into #68717 |
Fixed the conflicts |
In testing found a case where reauth was requested when it wasn't needed. If you turn off the tv during an update
I'll open another PR for that: #68762 |
return | ||
|
||
get_volume, get_mute = await asyncio.gather( | ||
service.action("GetVolume").async_call(InstanceID=0, Channel="Master"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is in line with our design requirements. Protocol details should stay in a 3rd party library. The library should handle the UPnP setup and command details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured this was ok since we have the similar pattern in the upnp and dlna* integrations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it's possible, and I'm out of time to dig in more for today, but maybe we create a new profile for Samsung Tv
async_upnp_client.profiles.samsungtv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider them exceptions as they are general integrations similar to mqtt.
The Samsung TV integration is not that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epenet async_upnp_client.profiles.samsungtv or a new library? It doesn't seem to fit in any of the existing ones.
Not sure what is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked into the details, and I won't be back home for a while so but I wonder if we could actually get subscriptions working as well so we could get push updates.
#68717 needs to be merged first
Proposed change
Add Upnp volume control/status to SamsungTV
Adds
SUPPORT_VOLUME_SET
to_attr_supported_features
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: