Panasonic UB BR Players integration

Hello there!
I’m happy to share the first version of my custom integration for Panasonic UB series Bluray players (eg. UB820, UB9000).

I know that some integrations already exists, but I found they missed some of the available commands or lacked the possibility to enable/disable authentication.
Since not everyone runs a hacked firmware to remove the authentication, I thought that this could be helpful to other people like me.
The “Secret” key is not easily available online, but can be obtained.

I also included the YAML used to build a “virtual remote” using universal-remote-card and button-card.

Here’s the Github repo, feel free to test the integration:
https://github.com/matteoraf/ha-panasonic_ub

Feedback and contributors are more than welcome!

2 Likes

This looks really neat. How does one go about looking for the dev key for a UB 420?

I am not sure if the UB420 follows the same specs of UB820 and UB9000 in terms of control protocol.
Can you get in touch privately so we can try to sort this?

This works amazing!

I am not able to get this working. I had to manually create a “panasonic_ub” folder into my custom components folder and add each file from the git 1 by 1. But when I go to search for it via integrations, nothing shows up. I also had to manually download each file from the git as there seemed to be no download folder.

Did you reboot Home Assistant after downloading the integration files?

Hi Mrteo,
I’m Vincenzo from Catania, Italy.
I’ve installed home assistant and I would like to integrate my ub820.
Can you help me to obtain the secret key?
TIA,

Vincenzo

Turns out I had it installed into the wrong custom integration folder. I got it working. Kind of. But now
I need the api key. Google has been no help. I don’t understand why the creator of the integration doesn’t explain what it is or how to get it.

I’m the creator of the integration, no need to refer to me as an external entity.
I developed the integration for myself and then I decided to make it available to other people, but that doesn’t mean that I am supposed to provide guidance to obtaining the API key.

Panasonic took kind of a good effort to protect the key inside their firmware, so I guess that they don’t want it to be publicly available. For that reason, I am not going to just share the key on a public forum…

But, besides that, I put together a CTF. Does any of you like CTFs? I am looking for someone to test it and get a good reward…

Sorry. I meant no offense. I was not really directing that post at you specifically. Just in general.

Could you at least tell us what the API key is? Most of us don’t even know where to begin ti look for it, or what it actually is. Googling leads one to think it’s actually the ESN, but it’s hard to know for sure.

What is a CTF?

To make it simple, it’s a “secret key” that you need to use to prove to the Panasonic Player that you are authorized to send remote control commands.
Without that key, the player doesn’t accept any remote command.

Some people on another AV related forum hacked the device firmware (at the risk of bricking it) to disable this check and let you send remote commands without any authentication.
I didn’t want to take the risk of bricking my device, so I found another way to obtain the key.

CTF stands for “Capture the Flag”. It’s kind of a funny game for cybersecurity nerds or hackers wannabe…

I installed this yesterday after patching the firmware.

Works great once I got it configured.

I had to edit the code to bypass the required AUTH KEY, even though I unchecked the AUTH.

Not near the player at the moment, does the media player support playback state (duration and current place)?

Thanks for the cool work.

Thanks for the feedback! Would you mind sharing some details about the issue with Auth disabled? So I can try to fix the code.
The player doesn’t return any info about the current playing media, except for the current position. Media position is already implemented in the media player entity.

So I didn’t fix the code, I just bypassed it.

You have
vol.Required(CONF_KEY): str, # No default value

I don’t have the key, so I changed it to

            vol.Optional(CONF_KEY): str,  # No default value

There are 2 occurrences in the config_flow

I changed this in the init

key = ‘’

I also commentes this out.

#if not secret_key or len(secret_key) != 32:
# raise ValueError(
# f"Invalid Secret Key: Must be 32 characters long. Got {len(secret_key) if secret_key else 0}."
# )

This basically let the config flow complete without errors and the integration worked for me.

So my guess would make the key checks dependant on AUTH_ENABLED and make that required.

If AUTH_ENABLED is false, don’t enforce the key checks.

Hopes this makes sense.

I’d love to try the CTF! I have a DP-UB420 on firmware 1.82 and have already spent a good deal of time trying to extract the key from the firmware (which turns out to be fully encrypted I assume). I’m keen to give your challenge a go.

I tried the firmware file and looking for a version of a compressed file in it. I hoped it was a jffs2 filesystem but although I thought I found the start of the jjfs2, it turned out to be not the case.

The app for an iPhone is not available anymore, so sniffing the network does not work either.

I also tried finding long strings resembling keys but the file appears to have a entropy of almost 1 so I have to do something else with it, but for now, I am out of ideas.

So I am up for the next challenge :grinning:

Thanks for the reply and information. I do wish we could get some info on how to get started to find that key!

I have heard about the firmware hack, but I can’t bring myself to take the risk doing it. (Not to mention I just replaced my 6 year old UB820 a few weeks ago due to mine no longer reading triple later discs.)

Not wanting to try the custom firmware is why I was so excited about your new UB Integration. But unfortunately the key thing is a major roadblock.

I've stumbled on this integration and would love to use it for my UB420 but also need help finding the API key (I'd prefer not to jailbreak the firmware). Any insight on how it can be found, OP?

Do you offer how to get the key by participating
In your CTF?

Hey there! I'm sorry, I've been away for a while. I will send you the CTF link via DM.

Hi mrteo, I would like to ask you if you might be so kind to send me the CTF, or better the API option directly :smiley:
Really appriciate your help here, thanks a lot.