simbaja / ha_oppoudp

Home Assistant Integration - Oppo UDP-20x
MIT License
7 stars 2 forks source link

Integration not working with HA Core 2025.1 due to deprecated constants #5

Open 35gh opened 7 months ago

35gh commented 7 months ago

As seen in the logs:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1520
First occurred: 11:43:55 (1 occurrences)
Last logged: 11:43:55
Entity None (<class 'custom_components.oppo_udp.media_player.OppoUdpMediaPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|SEEK|VOLUME_SET|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|VOLUME_STEP|SELECT_SOURCE|STOP|PLAY|SHUFFLE_SET|REPEAT_SET: 318911>, please report it to the author of the 'oppo_udp' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

Thanks!

maff76 commented 7 months ago

not sure if this is maintained anymore, but as a complete novice i am making progress to convert, struggling with repeat and shuffle functions currently but basic playback controls work, also fixed the volume up bug

will at least share once finished or can't go further and those functions removed for at least basic playback controls,

va-lemon commented 6 months ago

@maff76 I came across another HA custom integration where they recently made changes to fix the deprecated commands. This may help. Thanks for working on this! https://github.com/Sennevds/media_player.template/pull/48/commits/b3157342bc06b67b191f9bc8c9c5b005d7b217c5

maff76 commented 6 months ago

okay so this is what i have so far, time has been limiting but this will allow the integration to work, allows the default controls and also remote controls to be sent which is how i use it

search, repeat, shuffle do not work but for now let me know if something doesn't work and I'll see what I can do

couple methods to get the code changes

download the media_player.py and replace the copy in custom_components, remember to back up https://drive.google.com/file/d/1P9qwc5_c_7BhNbVffNm1CU9PNaYdJXWF/view?usp=drive_link

open your copy of media_player.py remove old code and paste this into it and save https://pastebin.com/DAvMEgPN

35gh commented 6 months ago

@maff76 would you be able to submit a PR? thanks.

maff76 commented 5 months ago

probably not as i just mess around with the raw files sorry

maff76 commented 5 months ago

that was relatively easy PR made but again not complete but might find a solution to the rest

y2jdmbfan commented 4 months ago

I'm pulling my hair out, how do we get the navigation arrows added? Not being able to select menus is infuriating! LOL

maff76 commented 3 months ago

your probably just using the integration which has basic controls only, you will need to create buttons to send those commands an example of my remote config for the button is below and here you will find all commands that can be sent http://download.oppodigital.com/UDP203/OPPO_UDP-20X_RS-232_and_IP_Control_Protocol.pdf

          tap_action:
            action: call-service
            service: remote.send_command
            service_data:
              command: NDN
              entity_id: remote.oppo_udp
y2jdmbfan commented 3 months ago

your probably just using the integration which has basic controls only, you will need to create buttons to send those commands an example of my remote config for the button is below and here you will find all commands that can be sent http://download.oppodigital.com/UDP203/OPPO_UDP-20X_RS-232_and_IP_Control_Protocol.pdf

          tap_action:
            action: call-service
            service: remote.send_command
            service_data:
              command: NDN
              entity_id: remote.oppo_udp

Thank you for this! I did find a list of Oppo commands from the OpenHab website, but I had no idea how to implement them. I'm new to Home Assistant, just got it setup with the basics and using an unfolder circle Remote Two as the physical interface. I haven't created custom buttons or remotes yet, just been using the media player plugins for my Onkyo receiver and then this package for the Oppo. This helps get me in the right driection. Off to search for some remote / button creation tutorials now.

LeoeLeoeL commented 2 months ago

I think the dead end was earlier: 2024.6 and not 2025.1. In my case the integration began to work badly this month. I had to update media_player.py. Tks for your work.