chiaki icon indicating copy to clipboard operation
chiaki copied to clipboard

Headless mode - Single keypad actions from the cli

Open mdoersam opened this issue 4 years ago • 3 comments

What platform does your feature request apply to? Linux primarily, but all that support headless operation

Is your feature request related to a problem? Please describe. Right now, all home automation solutions I could find only use the reverse engineered "Second Screen" functionality which is quite limited. Having the full range of keypad-input available would make it so much more useful. This feature plus an additional MQTT-Adapter would make it possible to control a PS4 from any range of home-automation devices.

Describe the solution you'd like Having the possibility to send single key-presses from the console eg. "chiaki-cli send-key key="Moon" --host=192.168.1.2 --registkey=123abc12". Not sure about the lag if the application would be started and had to connect every single time.

I am happy to try my hands at implementing one, but not being that proficient in C/C++ need some guidance on where to start.

Describe alternatives you've considered At this point, I don't see any to be honest.

mdoersam avatar Jul 21 '20 07:07 mdoersam

It would be quite slow indeed and the ps4 always rejects new connections about 10 seconds after a previous one has been closed. But I think this could be combined with #278 and input could be piped into chiaki on stdin. This way you can send multiple keys in a row.

thestr4ng3r avatar Jul 21 '20 10:07 thestr4ng3r

Thank you for your fast feedback on this!

I think #278 definitely shares the fact, that you open a long-lasting session via the cli. Am I correct to assume, that the mapping "stdin-command" -> "message to PS4" would need to be implemented?

mdoersam avatar Jul 21 '20 11:07 mdoersam

Yes

thestr4ng3r avatar Jul 21 '20 18:07 thestr4ng3r