I could not help myself to help you guys testing out this integration. Got really excited.
I’m not a coder but have some knowledge and try to help out where I can to make these things come to life.
I was on an old Rebug FW but updated the PS3 to the latest EvilNat. 4.91
My findings so far:
Got Wake On Lan working fine after the REX > DEX conversion. > Thanks @Dunkelschunkel for pointing me in the right direction on this.
The Webman ‘shutdown’ http command makes the PS3 shut down in a pretty hard way. Don’t know if you are aware, but after that command is sent, the WOL magic packet won’t work anymore. The fix is to send this http request to shutdown the PS3: http://*PS3IPADRESS*/shutdown.ps3?vsh
instead of http://*PS3IPADRESS*/shutdown.ps3
(After testing it seems like you are sending the ‘regular hard command’, the addition of ?vsh makes it do some kind of softer shutdown.
I think your approach to having the script for power on behavior is a good solution to help everyone. But one does need some knowhow. Then again, most people diving in to this will have some knowhow about these kind of things.
I have installed the integration trough the media_player branch, and I could see the entities but the media player entity would not react. I could not see the on/off state, game title. After fiddling around with some of the fan controls in HASS everything started working. Not sure if this is a work in progress / expected behavior / bug. (Webman is in EN).
I can’t see artwork for a game that’s playing. How did you get this working @Dunkelschunkel?
Again, really appreciate the work that was put into this so far and I wil also try to monitor this topic and test out any changes you make to the project.
I got the covers working after upgrading Webman to the latest version and installing the main branch of the integration.
On topic of the integration:
With the latest version of Webman the shutdown command seems to be working OK, not preventing WOL after shutdown. However my sugested command still works. implementing the ‘/shutdown.ps3?vsh’ command would be backwards compatible with older versions of Webman.
Seems like a shame that whilst Webman supports full cover art to only show the logo of the game. They get cropped off alot of the time. I think @Dunkelschunkel mentioned it before but it would be alot more “eye candy” if the covers that are showed in the Webman frontend get showed in the media player entity.
- My system seems to crash more often when I’m using the intigration to load games. I’m not sure if this is related to the Webman update or the intigration, but tought it was worth a mention.
EDIT: Nope, it was the later versions of Webman causing the crashes. 1.47.40 is the latest version that works stable on my system.
Regarding the initial hiccups during setup and displaying the logo: I have not ran into these issues myself, even when resetting my devcontainer of HA to a fresh install. I will try to replicate this behaviour on my end to solve it, but for the moment it might have been a single event.
I know that the script method might seem a bit cumbersome, but I indeed believe that it is the most accessible solution for everyone for the moment. I will try to document it as best as possible and might change it to a more streamlined experience in a future update.
The feedback on the shutdown command is very relevant, I will change this in the next upload, thanks for noticing!
Regarding the cover art, again very valuable feedback! However, since this seems like a nice extra, I will also postpone it towards a future update on the roadmap.
In any case, Nearly ready to upload my final ‘alpha’ version before rolling a ‘beta’ version out on HACS. I suggest that as of the beta phase and the release on HACS, we start logging issues on the github page: Issues · SDR3078/ps3-home-assistant · GitHub since it’s easier for me to track and follow up. We can still use this platform to discuss ideas, updates and future development!
Thanks for testing, this feedback is enormously helpful!
It’s funny that you ask about the media player entity. I was goofing around just now and could not get the entity to appear again, since it was working fine last night.
I installed the media player branch again and now the entity is back.
I guess this was some kind of Home Assistant cache sticking around. I have no idea how everything kept working last night – even the media player entity – when I had the main branch installed.
I noticed that the script selector was also still visible when setting up the device using the main branch. and that should also not be there. So I guess it was probably just a hickup or mistake on my end.
It’s working fine now.
Regarding the covers displaying. I am experimenting a bit with how covers are “scraped” in your Intigration. Would it be ok for you if I open an issue on Github and place all my findings there, so you have some info when you start working on this? I would not want you overwhelmed.
I just pushed a big update to main! These are some of the changes:
Complete rewrite of backend api class, to incorporate server request blocking. When too much requests were sent to the playstation, it would crash and possibly corrupt the file systems. The backend will now block any additional request when it does not recognize any change in its state (with a timeout).
The entities are now officially registered and recognized as part of the playstation 3 device!
Turning on/off functionality has been added. Turning on happens with a user defined Home Assistant script which is then called within the integration. Turning it off is also updated to make use of the softer shutdown command (thanks to @Midifreakz )
A couple of sensors have been removed as they were redundant. I also made the call to remove the separate temp sensors. They are now added as attributes under the climate entity and can still be turned into sensors with a template: Template - Home Assistant. Furthermore, during testing I noticed that the temp control of the PS3 is not based on the CPU temp, but rather to an approximation of the total system temp, which is why I changed the reported temperature of the climate entity to the highest temp of the rsx or cpu. This temp seems to be representing the temperature that webman is taking into consideration for its controls. I can change this behaviour in the future if the demand is there to change it back.
I have merged everything in main and I recommend deleting the previous files completely to install the integration from scratch. Enjoy!!!
Amazing work! Having a proper Device with entities makes it all look super clean!
Power on/off behaviour works perfect now and plays well with WOL.
I get less warning and error messages in the bottom left corner of HASS. So i think the rewrite indeed made things better when sending commands in rapid succession.
The climate entity and fan control entity seems like more than enough. In my opinion these are the only useful sensors for most users. Not all users will be debuggers. For users like me, even the fan control is more of a gimmick. but a cool one nonetheless. – pun intended.
In my opinion it’s ready for a HACS release after addressing just this one little thing:
I also have written out my findings on the whole cover artwork thing:
Proud the say that I released the first version! I also took all steps to have it published in HACS, but unfortunately there is quite a backlog of projects to be reviewed, so it will probably take a while, but in the meantime you can add it through custom repositories!
After enabling WOL on your playstation you are past the hardest steps.
You can add this to your configuration.yaml file:
Note that if you have created switch entities before, you need to place the switch below the ones you already have configured.
# Enable WakeOnLan Service
wake_on_lan:
# PS3 Wake On Lan Switch
switch:
- platform: wake_on_lan
mac: a8:e3:ee:a7:39:2d
name: “PS3-WakeOnLan”
Offcourse change the mac adress with the one from your PS3. I think the PS3 shows it somewhere in network settings, or just check in your router’s config UI.
When you have done this, restart home assistant and it should have created an on/off switch entity. When turning this switch on your ps3 should turn on. turning the switch off will do nothing, but that’s not needed for this integration.
Once you have the switch working, you can add it in a simple script like the screenshot below.Turning the WOL switch on, and turning it off again immediately, so it’s ready for the next time you want to turn it on.
Make this script the ‘ON’ script when configuring the PS3 integration.
Hello, good man! Thank you for this wonderful integration! My ancient PS sparkled with new colors thanks to you!
I wanted to ask about the dumps and lack of synchronization with the player in HA. sometimes (for a strange reason) the player from HA does not want to synchronize with the state of the console. This happens completely randomly, and my network is in normal condition. Does anyone else have dumps? Are there any recommendations regarding this?
Hi @f1x6r , it’s my pleasure! Could you maybe log an issue on GitHub when it happens? It would be easier to troubleshoot what specific state the console and the integration are in when this happens, thanks!
So, I tried everything and found the cause of my problem.
For some strange reason, PS3 constantly falls off the network. The cable is new, the set-top box was serviced about 6 months ago (replacing thermal paste and thermal pads, cleaning the cooling system). I have Huawei Mesh 3 routers and this turned out to be the problem.
I don’t know how the order of the ports affects this, but in my case this was the problem. I connect the PS3 “under” the Home Assistant server and everything finally worke properly. The HASS server is connected to port 2, and the PS3 is connected to port 3. I don’t know how the position of the devices in the ports affects the Internet drops in the PS3, but in my case, for some strange reason it works.
I tried to return everything as it was: the PS3 is located “above” the Home Assistant server and the problems with the Internet in the PS3 returned again… This means that the position of the devices in the router matters. Moreover, it is when the PS3 is below the HASS server that everything is stable.
My problem was solved and the issue turned out not to be an integration at all. Thank you for your responsiveness and thanks again for the excellent program and It’s thanks to people like you that the open community continues to exist and people can breathe new life into their favorite old devices❤️
Excuse me for asking a question.
I am trying to use this integration and I am having trouble with the script to turn on PlayStation3 when I add a device, there is no option.