The component I modified was created by vkorn to support his hass.io (= docker) add-on, which uses a REST wrapper around ps4-waker. So you should only use this custom component if you’re running a docker container with the REST wrapper (either vkorn’s hass.io addon or you can use one of my images.
@Bieniumy config uses the ip with protocol for the host incl. port and the plain ip for the PS4. So it looks like this:
host: http://0.0.0.0:3031 ### IP of the docker container and port of the ps4-waker REST wrapper
ps4_ip: 0.0.0.1 ### My PS4’s IP
I can still use ps4-waker commands in terminal and get the correct results. However my media_player.ps4 is not showing in states. The most I can achieve now is a popup that says
Playstation 4
Enter credentials
Howto generate credentials
(Line for credentials populated with “PS4 Waker credentials json”)
I have tried moving my credentials around into different folders always the same result. I have entered paths, user credentials, the full text from the json all result the same way.
In my case it unfortunately doesn’t help. The component doen’t react to changes in the PS4 status. Anyone have working version of this component for HA 0.64.x (virtualenv instalation)?
@Knapoc I will switch to using your rest wrapper docker and see if I can get it working. (I had it working with this docker). Will report back later tonight. Thanks
The component component I posted depends on ps4-hass-waker by @vkorn (a REST wrapper around ps4-waker). A typical use-case would be if ps4-hass-waker and hass run on different hosts. ps4-hass-waker is available within vkorn’s hass.io repository or within my docker image (you can build it yourself though). Why is ps4-hass-waker (REST wrapper) even necessary? ps4-waker has an API, but doesn’t expose its service to the network (if I understood that correctly?!). Since docker best-practice is to run one application per container, I chose to build my own docker image with ps4-hass-waker only and didn’t just use the image hnicolaisen/home-assistant (@glassbase be sure that you still run a “pure” home-assistant container and check out the readme of my image on how I generated the ps4-config.json).
Hope I could help you somehow, even though I’m not an expert .
first of all, I have to say thank you very much. your playstation4 custom component works very well and very good.
It is a little bit hard to install because need ps4 walker and some other setting involved. If move to official release, I hope it will not hard to install.
As now, it is still works well on HA 0.64.1
I’ve upgraded to HA 0.64.3 (Hassbian), replaced ps4.py with latest version and followed every instruction in the thread that I could find. But the the commands still do nothing, I only get the PS4 state, like what’s playing.
Here is an error log for media_player.turn_off command.
And media_player.media_play_pauseerror log.
thats strange, could you try running the command from the command line then?
would look something like this :
python3 /usr/local/bin/ps4-ctrl -v -H 10.254.2.107 -C 903a0d538cd5029172d15d0d711d7bb0f4e09974779a22c351b0f6c125fca498 wakeup
that should wakeup the ps4 (at least it does locally when I test it)