thanks for your reply,
I have one Windows Pc and one linux machine (hass.io on docker)
What kind of software I can install in the pc to be a media player from point of view of home assistant ?
Best regards
thanks for your reply,
I have one Windows Pc and one linux machine (hass.io on docker)
What kind of software I can install in the pc to be a media player from point of view of home assistant ?
Best regards
As long as you have home assistant open in a web browser on the device you could use this:
Do we need to say it louder? music player daemon. https://www.musicpd.org/doc/html/user.html#compiling-for-windows
TTS typically returns an mp3 ( in my experience) therefor any media player daemon will work, such as…MPD.
Other than Music Player Daemon, are there any other that will run on a PC? MPD is not really that straight forward on Windows. E.g. Getting errors about ‘wildmidi’ is unavailable. Trying to get TTS working on a regular PC speaker as I’m not liking the fact I cannot disable the Playback Sounds on my Google Home/Mini like I can on my Chromecast Audio. Super annoying!
Have you considered this?
I did see this in earlier in the thread, but was looking for something that ran more like a service and didn’t rely on the browser running on that PC all the time.
Are you looking for full media player services or just for tts? Thinking of building a small python program to play a url via mqtt.
In my case, just for TTS notifications.
I am working on a python program that uses vlc for audio, It runs on a windows system and perform this function (along with others).
I currently have it supporting the following MQTT messages (currently). Would you be willing to test it?
Examples
{"command": "pause"}
{"command": "stop"}
{"command": "play"}
("volume": 100}
{"play":"http://192.168.0.250:8123/local/mp3/horn.mp3"}
{"tts": "The quick Brown Fox Jumped Over the Lazy Dog"}
Sure thing, I’m willing to test. I’m assuming I’ll be able to just run VLC as a service as in the link below?
@Sireone (and any other brave souls).
I have created a build for my windows pc based notification app (HApyAudio).
Program is capable of running in the system tray (not really a service so use the windows startup apps)
This is built in Python and all the code is available for review here [be kind ;-)]
jumps, not jumped (otherwise there is no “s”)
LOL, I will open an issue.
So I got the program running and pointed it to my Home Assistant MQTT broker, with VLC installed (v. 3.0.16) It does show Published!, Connected! & Subscribed! with my topic MERCURY/HApyAudio/control.
I tried to publish a packet in HA with the topic name above and {“tts”: “The quick Brown Fox Jumped Over the Lazy Dog”}, but I hear nothing. I also tried playing the mp3 file, nothing. Jumped over to Node-Red, setup an mqtt out node with an Inject node which included the msg.payload (json/string) {“tts”: “The quick Brown Fox Jumped Over the Lazy Dog”} and msg.topic (string) MERCURY/HApyAudio/control. Added a debug node which showed the results, but no sound.
Is there any VLC configuration needed? What am I missing?
Try issuing a volume command. {“volume”: 80} then try the tts again.
Same, no response from my PC running HApyAudio and nothing in the status window besides Connected!. If I manually play something in VLC I hear the output. How can I tell if HApuAudio is connected to VLC?
Here’s the node-red output.
8/23/2021, 10:49:06 PM node: 4b0a8e7f294896d5
MECURY/HApyAudio/control : msg : Object
object
_msgid: "61026ab3f49248de"
payload: " {“volume”: 80} "
topic: "MECURY/HApyAudio/control"
The application uses a vlc dependency for python so there is nothing to configure and I don’t think the application will actually run without it. Did you edit the settings.json file? Does the application report the correct broker and port in the window? If the mqtt message is received by the application it will also show in the window. I may need to add some debugging logs to assist.
Yep, pointed to my MQTT broker IP in HA which shows New connections from the HApyAudio IP. As mentioned, I do not see see any info in the status window when a message is sent to the topic configured. How would I go about gathering debug logs for this?
There are no debug logs in the program at this point beyond what is shown in the status windows. I did confirm however that the program will not run if MQTT does not connect so I would say you are connected to your Broker. What port do you have configured for MQTT?
Can you try something like this on your windows PC to ensure you are getting the published data with a tool other than my program? http://mqtt-explorer.com/
At this point it looks like HApyAudio is connecting to the broker but not receiving any data on its subscribed topic. I will look to make a couple button items on the qui to test the tts and other items to ensure that that portion is working as expected.