I’m a brand new user, I discovered the solution 2 days ago. I went throught a lot of videos and tutorials but I still need help to figure it out how to configure HassOS 4.15 0.116.4 in the most efficient way.
For a project, I need to play 2 different music files (they can be triggered independently), mixed them together and stream them over HTTP.
To do that, I’m using 3 different instances of VLC running on a windows machine, 2 for independent playback outputting to a virtual output. Then the virtual output is routed to a virtual input used by the 3rd instance to transcode and stream over HTTP. That part is working like a charm except for the 2 seconds delay to transcode the stream.
So far, I managed to control the 2 different playback instances of VLC remotely under Home Assistant using the vlc_telnet platform.
First thing that I’m trying to do is to be able to launch remotely a batch file, to run the VLC instances, using a switch. I’m struggling to find a proper solution. The documentation nor examples on the Internet are not really user friendly and self-explanatory but if you can give me some clues, I’ll be grateful.
Second thing, less important, would be to go further in the playback management. I would love to manage to lower the volume of the first media file for few seconds while playing the second. I’m looking for the events and scripts but I’m not at this step yet.
What I did so far is to install FreeSSHd on my Windows machine. Add a user called ‘xav’ with Shell usage, Disable the password authentication and force the public key authentication. I’ve created the private and public keys using PuttyGen. Copied the public key into freesshd’s public folder under the same user name ‘xav’ and place the private key into /config/.ssh/xavPrivateNo.ppk (tried with and without passphrase)
When using the SSH add-on to debug the remote access using the same command I’m still having issues
By the way, I had to change permissions by typing: chmod 0600 /config/.ssh/xavPrivateNo.ppk otherwise I got a warning: UNPROTECTED PRIVATE KEY FILE.
Now ssh command result is giving an error that I don’t know how to fix:
load key “/config/.ssh/xavPrivateNo.ppk” invalid format
I’m going to check with keys generated by built-in ssh add-on but if you guys have any idea…
Thanks
EDIT:
I generated new keys using the command “ssh-keygen -t rsa -N “” -f my.key”
now the command below gives no ‘invalid format’ error anymore and I can connect after restarting the FreeSSHd server
I finally ended up using a scheduler on the windows machine to launch my .bat file.
For some unknown reasons, launching the bat manually works, lauching the bat from ssh command using the add-on works but using the same command within comand_line switches and shell_command stop in the middle of the .bat. Meaning that some actions are done but not the entire .bat file. I didn’t get it.