Custom PS3 Integration: Testing & Development

Hi everyone!

I am opening up a new topic as to discuss development and testing of my new custom Playstation 3 integration. Previous messages in regards to the development can be found here.

The integration can be downloaded here: GitHub - SDR3078/ps3-home-assistant.

The integration only works with PS3 systems that run custom firmware (or PS3HEN) and have webman mod installed.

Currently supported features in Home Assistant:

  • System state reading: Idle/Playing/Off

  • Media player: show games that are being played and being able to start/stop selected games from Home Assistant (29/04/2024)

  • Temp reading: CPU, RSX

  • Full fan control: all fan modes supported, dynamic temp control with climate entity, direct fan speed control

  • Notification service: notifications can be sent from Home Assistant which will be shown by the PS3. Notification icon and sound can be customized.

  • Decent implementation of device and entity registry so devices and entities can be edited and assigned to rooms/areas in Home Assistant. (24/05/2024)

  • On/Off switch for system: making sure that the system can be turned off and on from Home Assistant. (24/05/2024)

On the roadmap:

  • Remote control entity to really be able to utilize the PS3 system as a media center without even needing a controller. (29/04/2024)

I will be updating this post to show the latest developments. Thanks for testing!

I updated my list of to do’s and wrote the date of the last update in cursive next to the changed lines.

1 Like

@Dunkelschunkel, to reply to your previous post:

I will indeed be implementing the display of game covers/icons in the media player, currently doing some more research on that. The selection and launching of games will also be available soon! :slight_smile:

1 Like

Hi @SDR3078 ,

It should be noted, that a PS3hen-enabled PlayStation 3 is sufficient. No need for a cfw PS3 since not all PS3 models do support cfw. But PS3hen can be done on any model wen using a hfw, ps3hen and webman-mod.
I am currently testing with this exact setup, super slim model, and it works well.

I am wondering whether it is a good idea to get a post started over at https://psx-place.com since this is my goto place and my recommendation for all ps3 cfw, hfw, ps3hen and webman-mod related questions.

Dunkelschunkel

Thanks, changed the post!

You are welcome :grin:

Pretty good timing, I’m trying to automate as many of my consoles as possible, so it’s good to see we’ll have a solution for modded PS3 that doesn’t rely on PSN.

Now if only I could get modded PS4 connections working with third party software.

Also great to see all the extra functionality and reporting. When you start from nothing, even just having the ability to start up the console from HA is a HUGE win.

I have a fat and slim model to test with, both with CFW 4.91 from Evilnat and webmanMOD installed.

1 Like

Hi all,

I have done some further development on the media player and I have committed the changes to the media_player branch of the repo. If you want to test it, clone the files from that branch. After testing thoroughly I will merge it into main!

The next step for me will be to make sure that the device registry and the entity registry are being handled correctly, so that Home Assistant recognizes the PS3 as a device. I will also put some effort in the feature that has been requested the most so far: an on/off switch :stuck_out_tongue: .

However, it unfortunately comes with a major caveat. The implemented functionalities are made possible by the webman application which essentially acts as a webserver for the PS3. When the PS3 system is turned off, the server is inactive and no functionalities are exposed. This makes it very tricky to implement a ‘turn on’ button.
Initially I experimented a bit with WoL (Wake-on-Lan) and remote play, but I could not get it to work. When you have PEX firmware on your PS3, apparently you can enable WoL, but since I have a CEX system, I was not able to test that. However, this issue can be circumvented.

I have been doing some research into HDMI-CEC, which is essentially a protocol that allows devices with HDMI connections to communicate over the HDMI cable. So for example, you could configure that when you turn on your TV and change it to the HDMI channel where the PS3 is connected, it will automatically turn on the PS3. Different manufacturers have different names for the setting on the TV’s, but once you enable ‘Control for HDMI’ on the PS3 and the specific setting on the TV, you should be able to turn on your PS3 system by changing to the relevant HDMI channel.

The idea now would be to allow the selection of a ‘turn on’ Home Assistant script during initial configuration. All users would then be able to configure their custom startup sequence for the PS3. In my case the script would turn on the TV and change the channel to the relevant HDMI channel, which I think will be the most common case. However, for other people who do have a PEX system with WoL enabled, the script might send a WoL message to the internal IP address. By integrating this startup script in the integration, the experience should be seamless.

There even is a solution for the users who don’t have PEX firmware or whose PS3 system is not connected to a HDMI-CEC enabled monitor. The following guide described how you can build your own HDMI-CEC bridge in your cable with Tasmota and less than 10 euro of hardware!

Let me know what you think! Have fun testing! :slight_smile:

Just signed up for psx-place! I would like to do a first release on HACS after fixing on/off functionality and the device registry. I think it would be good to wait for the release until posting at PSX :slight_smile:

1 Like

Hi @SDR3078 ,

this are great news. Finally this discussion is gaining some momentum.
WakeOnLAN is working great. You need a Evilnat PEX Firmware installed as an update over Evilnat CEX. After that you ave to convert it to DEX vie the CFW menu options. The important bits are the debug otions. They offer WOL functionality which stays activated, even if you fully convert back to CEX by disabling it.
https://www.reddit.com/r/ps3homebrew/comments/knr822/ps3_wake_on_lan/


I’ve added screenshots from of the settings menu of a converted pex console showing the wol functionality. As mentioned above it is still working even after switching back the console from dex to cex.

Regarding the media integration you have added good features - launching Games from homeassistant ist a breeze.

It is possible to use the DNS name under the console is reachable during setup. Thus said using any other language during setup other than English will result in entities which do not update or control status or device information.

I’ll add everything I find later.

Dunkelschunkel

1 Like

Hi!

I have heard of the WoL functionality on PEX! However, for people running HEN, people running CEX or people with Phat systems, WoL is unfortunately not available.

I do believe that with my proposed solution, I democratize the turn on functionality for everyone. People that have access to WoL can just define a script in the initial configuration that sends a WoL message to the ip address, therefore still being able to use that functionality to turn on their system. People without access to WoL will be able to configure the script that selects the right HDMI channel to turn on the PS3 system with HDMI CEC for example.The goal is that the user can select their specific Home Assistant script in a dropdown during setup.

For example, the image above shows the Home Assistant script that I use to turn on my computer with WoL. Scripts like this will be listed in the config flow so that the user can choose a script that contains this functionality.

Could you elaborate regarding the DNS issue? I will fix it asap but at the moment I’m not yet fully understanding the problem.

@SDR3078 I do not have a CEC capable HDMI setup in lack of propper hardware. Thus said I do get the idea you are proposing. Even the tasmota modification is a neat solution suitable for all kind of scenarios.
Do you think it would be feasible to select either an existing HA-script or even a existing HA-switch?

No DNS problem - I wasn’t aware that I could enter a DNS name in the input field since you are asking for an IP-address.

What is a problem though is the observed behavior. Entities aren’t reading and presenting live data if you use any other language than English on Webman mod. It looks like it sometimes works if set other fan modes on the climate entity (auto).

As i am typing my kids are playing a game and I am just no seeing a nice cover of the game being played. Nicely done.

Dunkelschunkel

@Dunkelschunkel,

This is exactly what I am developing right now :smiley: . I am including a dropdown menu in the initial setup screen to select your relevant script. Since your system has WoL enabled, you could make a script that is comparable with what I posted above and select that script in the setup. When you would turn on the PS3 from Home Assistant with the Media Player power button, it would run that script and turn on the PS3 with WoL!

Regarding the language issue on webman, unfortunately it will not have an easy fix. The integration reads its values by extracting data from certain HTML tags in the webman frontend. If you change the language, these tags also change. The only solution would be to write custom logic for each language or to get in touch with aldostools and convince him to expand webman so the values can be read by custom API get methods. I will put this issue on the roadmap, but for now I would advise to keep webman in English.

Happy to hear that testing is going well and that you are enjoying the integration :smiley:!

Just in case: CEC is only supported on Slim and Super-Slim systems.

WoL does require the PEX firmware, but you don’t have to change to DEX to enable it. You can enable the DEX Debug settings without changing types and the WoL option will appear in the System’s Settings menu’s Debug options and can be turned on.

I’ll try to hook my system up tomorrow and get a step-by-step to turn it on (menu by menu)

BTW, check out this bit of code… Wake PS3 (and PS4 and PS5) using Bluetooth:

2 Likes

Hi!

I wanted to give a short update. This weekend, I’ve been able to implement the turn on/off functionality based on the above scripting method. The integration now requests a list of your existing Home Assistant scripts and allows you to select one for starting up the system.

Furthermore, the integration will also monitor when the XMB from the PlayStation is loaded to ensure that the startup sequence has been carried out successfully. In the meantime, it will not allow you to launch the script a second time for a certain timeout period.

I have implemented this because of the multiple methods of turning on the system: launching a second WoL message and a second Bluetooth wake message does not matter, but systems relying on HDMI-CEC with a sequence relying on other devices might benefit from this.

Let’s say I want to turn on my system by turning on my TV, pushing the HDMI source button twice for HDMI-CEC to turn on my PS3 on the right HDMI channel. If I would push the button twice within Home Assistant, the script would run twice, therefore not turning on the PS3 and going to a completely wrong HDMI channel on my TV. This failsafe should make you wait until the XMB is loaded to run the startup script again (or until a Timeout is reached).

I haven’t put the code online yet because I’m still testing some stuff, let me know what you think!

1 Like

I thought I had made at least one reply here in the past week but… it’s not showing up now? Odd.

If you get the code checked in, I’m happy to give it a test. my PS3 systems are now connected full-time to my switching gear and network.

1 Like

In case you hadn’t seen it, you can also send commands to WebManMod running on the PS3 to do all kinds of things: shut down the PS3, search for games, list games in a grid, start specific games, etc.

Hi @HVR88 , sorry for the late reply, had other obligations the past week. If you change the GitHub branch to media_player you can already browse games, change the game and launch/stop them! Just download the files from there to your custom components folder.

I am currently done with turning on/off functionality and a request blocking system to not overload the ps3, but I did not upload it yet, will do so soon! Then it’s just a matter of getting the device/entity registry working and then it’s time for a first release on HACS :blush:

2 Likes

Hi @SDR3078

that sounds promising. I am monitoring this thread and install any update provided.

Dunkelschunkel

I was looking for something like this for a while…

Thank you for all the hard work you put into this so far. I’m gonna wait just a bit for the HACS release to give this a spin but nice work!

1 Like